Changed parameter type of fastNlMeansDenoising[Multi][Abs] from std::vector<float> to const std::vector<float>&
This commit is contained in:
@@ -160,7 +160,8 @@ image in different colorspaces. Such approach is used in fastNlMeansDenoisingCol
|
|||||||
image to CIELAB colorspace and then separately denoise L and AB components with different h
|
image to CIELAB colorspace and then separately denoise L and AB components with different h
|
||||||
parameter.
|
parameter.
|
||||||
*/
|
*/
|
||||||
CV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst, std::vector<float> h,
|
CV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst,
|
||||||
|
const std::vector<float>& h,
|
||||||
int templateWindowSize = 7, int searchWindowSize = 21);
|
int templateWindowSize = 7, int searchWindowSize = 21);
|
||||||
|
|
||||||
/** @brief Perform image denoising using Non-local Means Denoising
|
/** @brief Perform image denoising using Non-local Means Denoising
|
||||||
@@ -212,7 +213,8 @@ image in different colorspaces. Such approach is used in fastNlMeansDenoisingCol
|
|||||||
image to CIELAB colorspace and then separately denoise L and AB components with different h
|
image to CIELAB colorspace and then separately denoise L and AB components with different h
|
||||||
parameter.
|
parameter.
|
||||||
*/
|
*/
|
||||||
CV_EXPORTS_W void fastNlMeansDenoisingAbs( InputArray src, OutputArray dst, std::vector<float> h,
|
CV_EXPORTS_W void fastNlMeansDenoisingAbs( InputArray src, OutputArray dst,
|
||||||
|
const std::vector<float>& h,
|
||||||
int templateWindowSize = 7, int searchWindowSize = 21);
|
int templateWindowSize = 7, int searchWindowSize = 21);
|
||||||
|
|
||||||
/** @brief Modification of fastNlMeansDenoising function for colored images
|
/** @brief Modification of fastNlMeansDenoising function for colored images
|
||||||
@@ -290,7 +292,7 @@ value preserves details but also preserves some noise
|
|||||||
*/
|
*/
|
||||||
CV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputArray dst,
|
CV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputArray dst,
|
||||||
int imgToDenoiseIndex, int temporalWindowSize,
|
int imgToDenoiseIndex, int temporalWindowSize,
|
||||||
std::vector<float> h , int templateWindowSize = 7, int searchWindowSize = 21);
|
const std::vector<float>& h , int templateWindowSize = 7, int searchWindowSize = 21);
|
||||||
|
|
||||||
/** @brief Modification of fastNlMeansDenoising function for images
|
/** @brief Modification of fastNlMeansDenoising function for images
|
||||||
sequence where consequtive images have been captured in small period
|
sequence where consequtive images have been captured in small period
|
||||||
@@ -353,7 +355,7 @@ value preserves details but also preserves some noise
|
|||||||
*/
|
*/
|
||||||
CV_EXPORTS_W void fastNlMeansDenoisingMultiAbs( InputArrayOfArrays srcImgs, OutputArray dst,
|
CV_EXPORTS_W void fastNlMeansDenoisingMultiAbs( InputArrayOfArrays srcImgs, OutputArray dst,
|
||||||
int imgToDenoiseIndex, int temporalWindowSize,
|
int imgToDenoiseIndex, int temporalWindowSize,
|
||||||
std::vector<float> h, int templateWindowSize = 7, int searchWindowSize = 21);
|
const std::vector<float>& h, int templateWindowSize = 7, int searchWindowSize = 21);
|
||||||
|
|
||||||
/** @brief Modification of fastNlMeansDenoisingMulti function for colored images sequences
|
/** @brief Modification of fastNlMeansDenoisingMulti function for colored images sequences
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, float h,
|
|||||||
templateWindowSize, searchWindowSize);
|
templateWindowSize, searchWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, std::vector<float> h,
|
void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vector<float>& h,
|
||||||
int templateWindowSize, int searchWindowSize)
|
int templateWindowSize, int searchWindowSize)
|
||||||
{
|
{
|
||||||
int hn = h.size();
|
int hn = h.size();
|
||||||
@@ -123,7 +123,7 @@ void cv::fastNlMeansDenoisingAbs( InputArray _src, OutputArray _dst, float h,
|
|||||||
templateWindowSize, searchWindowSize);
|
templateWindowSize, searchWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cv::fastNlMeansDenoisingAbs( InputArray _src, OutputArray _dst, std::vector<float> h,
|
void cv::fastNlMeansDenoisingAbs( InputArray _src, OutputArray _dst, const std::vector<float>& h,
|
||||||
int templateWindowSize, int searchWindowSize)
|
int templateWindowSize, int searchWindowSize)
|
||||||
{
|
{
|
||||||
int hn = h.size();
|
int hn = h.size();
|
||||||
@@ -299,7 +299,7 @@ void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _ds
|
|||||||
|
|
||||||
void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _dst,
|
void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _dst,
|
||||||
int imgToDenoiseIndex, int temporalWindowSize,
|
int imgToDenoiseIndex, int temporalWindowSize,
|
||||||
std::vector<float> h,
|
const std::vector<float>& h,
|
||||||
int templateWindowSize, int searchWindowSize)
|
int templateWindowSize, int searchWindowSize)
|
||||||
{
|
{
|
||||||
std::vector<Mat> srcImgs;
|
std::vector<Mat> srcImgs;
|
||||||
@@ -375,7 +375,7 @@ void cv::fastNlMeansDenoisingMultiAbs( InputArrayOfArrays _srcImgs, OutputArray
|
|||||||
|
|
||||||
void cv::fastNlMeansDenoisingMultiAbs( InputArrayOfArrays _srcImgs, OutputArray _dst,
|
void cv::fastNlMeansDenoisingMultiAbs( InputArrayOfArrays _srcImgs, OutputArray _dst,
|
||||||
int imgToDenoiseIndex, int temporalWindowSize,
|
int imgToDenoiseIndex, int temporalWindowSize,
|
||||||
std::vector<float> h,
|
const std::vector<float>& h,
|
||||||
int templateWindowSize, int searchWindowSize)
|
int templateWindowSize, int searchWindowSize)
|
||||||
{
|
{
|
||||||
std::vector<Mat> srcImgs;
|
std::vector<Mat> srcImgs;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ static int divUp(int a, int b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename FT, typename ST, typename WT>
|
template <typename FT, typename ST, typename WT>
|
||||||
static bool ocl_calcAlmostDist2Weight(UMat & almostDist2Weight, int searchWindowSize, int templateWindowSize, FT *h, int hn, int cn,
|
static bool ocl_calcAlmostDist2Weight(UMat & almostDist2Weight, int searchWindowSize, int templateWindowSize, const FT *h, int hn, int cn,
|
||||||
int & almostTemplateWindowSizeSqBinShift, bool abs)
|
int & almostTemplateWindowSizeSqBinShift, bool abs)
|
||||||
{
|
{
|
||||||
const WT maxEstimateSumValue = searchWindowSize * searchWindowSize *
|
const WT maxEstimateSumValue = searchWindowSize * searchWindowSize *
|
||||||
@@ -78,7 +78,7 @@ static bool ocl_calcAlmostDist2Weight(UMat & almostDist2Weight, int searchWindow
|
|||||||
return k.run(1, globalsize, NULL, false);
|
return k.run(1, globalsize, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ocl_fastNlMeansDenoising(InputArray _src, OutputArray _dst, float *h, int hn,
|
static bool ocl_fastNlMeansDenoising(InputArray _src, OutputArray _dst, const float *h, int hn,
|
||||||
int templateWindowSize, int searchWindowSize, bool abs)
|
int templateWindowSize, int searchWindowSize, bool abs)
|
||||||
{
|
{
|
||||||
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user