Realm

oa::image::fast_nl_means_denoising

Non-local means denoising over a search window, following cv::fastNlMeansDenoising. Each output pixel is the weighted mean of samples in the (search_window)^2 neighbourhood with weights exp(-d / h^2), where d is the patch SSD over an odd template_window normalized by its area; the center weight equals the largest neighbour weight so a uniform region stays untouched. Returns an image with identical shape, layout, and format. Errors Returns an error unless input is a nonempty FP32 NCHW/CHW image, h is finite and positive, and both windows are odd and at least 3.

FnRust public API

Function Documentation

pub fn fast_nl_means_denoising( input: &Image, h: f32, template_window: u32, search_window: u32 ) -> Result<Image>
Non-local means denoising over a search window, following cv::fastNlMeansDenoising. Each output pixel is the weighted mean of samples in the (search_window)^2 neighbourhood with weights exp(-d / h^2), where d is the patch SSD over an odd template_window normalized by its area; the center weight equals the largest neighbour weight so a uniform region stays untouched. Returns an image with identical shape, layout, and format. Errors Returns an error unless input is a nonempty FP32 NCHW/CHW image, h is finite and positive, and both windows are odd and at least 3.