I am working over implementation of Non Local Means noise reduction algorithm in C++ . There are papers on this algorithm (such as this paper), but they are also not very clear on it.
I know, it is using the weighted mean but I don't know what is the use of research window here and how is it related to comparison window.
Being a new user, StackOverflow is not allowing me to upload images. but, you can find formula under the nl means section the link provided above.
From the paper you refer to, when determining the result value for a given pixel p, all the other pixels of the image will be weighted and summed according to the similarity between their neighborhoods and the neighborhood of the pixel p.
But that is computationally very expensive. So the authors restrict the number of pixels which will contribute to the weighted sum; that must be what you call the search window. This search window is a 21x21 region centered on the pixel p. The neighborhoods being compared are of size 7x7 (section 5).
I could make a prototype quickly with Mathematica and I confirm it becomes very costly when the size of the search window increases. I expect the same behavior when you implement in C++.
There's some GPL'd C++ code along with a brief writeup of the algorithm by the original authors here: http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With