image to CIELAB colorspace and then separately denoise L and AB components with different h
parameter.
*/
-CV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst, std::vector<float> h,
- int templateWindowSize = 7, int searchWindowSize = 21);
+ CV_EXPORTS_W void fastNlMeansDenoising( InputArray src, OutputArray dst,
+ const std::vector<float>& h,
+ int templateWindowSize = 7, int searchWindowSize = 21);
/** @brief Perform image denoising using Non-local Means Denoising
algorithm <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/>
image to CIELAB colorspace and then separately denoise L and AB components with different h
parameter.
*/
-CV_EXPORTS_W void fastNlMeansDenoisingAbs( InputArray src, OutputArray dst, std::vector<float> h,
- int templateWindowSize = 7, int searchWindowSize = 21);
+CV_EXPORTS_W void fastNlMeansDenoisingAbs( InputArray src, OutputArray dst,
+ const std::vector<float>& h,
+ int templateWindowSize = 7, int searchWindowSize = 21);
/** @brief Modification of fastNlMeansDenoising function for colored images
*/
CV_EXPORTS_W void fastNlMeansDenoisingMulti( InputArrayOfArrays srcImgs, OutputArray dst,
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
sequence where consequtive images have been captured in small period
*/
CV_EXPORTS_W void fastNlMeansDenoisingMultiAbs( InputArrayOfArrays srcImgs, OutputArray dst,
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
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 hn = h.size();
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 hn = h.size();
void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _dst,
int imgToDenoiseIndex, int temporalWindowSize,
- std::vector<float> h,
+ const std::vector<float>& h,
int templateWindowSize, int searchWindowSize)
{
std::vector<Mat> srcImgs;
void cv::fastNlMeansDenoisingMultiAbs( InputArrayOfArrays _srcImgs, OutputArray _dst,
int imgToDenoiseIndex, int temporalWindowSize,
- std::vector<float> h,
+ const std::vector<float>& h,
int templateWindowSize, int searchWindowSize)
{
std::vector<Mat> srcImgs;
}
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)
{
const WT maxEstimateSumValue = searchWindowSize * searchWindowSize *
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 type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);