[][src]Function opencv::photo::fast_nl_means_denoising

pub fn fast_nl_means_denoising(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    h: f32,
    template_window_size: i32,
    search_window_size: i32
) -> Result<()>

Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations. Noise expected to be a gaussian white noise

Parameters

  • src: Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
  • dst: Output image with the same size and type as src .
  • templateWindowSize: Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
  • searchWindowSize: Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels
  • h: Parameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise

This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter.

C++ default parameters

  • h: 3
  • template_window_size: 7
  • search_window_size: 21