Non-local means

Unlike "local mean" filters, which take the mean value of a group of pixels surrounding a target pixel to smooth the image, non-local means filtering takes a mean of all pixels in the image, weighted by how similar these pixels are to the target pixel.

This results in much greater post-filtering clarity, and less loss of detail in the image compared with local mean algorithms.

[1] If compared with other well-known denoising techniques, non-local means adds "method noise" (i.e. error in the denoising process) which looks more like white noise, which is desirable because it is typically less disturbing in the denoised product.

[2] Recently non-local means has been extended to other image processing applications such as deinterlacing,[3] view interpolation,[4] and depth maps regularization.

is the filtered value of the image at point

is the unfiltered value of the image at point

is the weighting function, and the integral is evaluated

is a normalizing factor, given by The purpose of the weighting function,

, is to determine how closely related the image at the point

The Gaussian weighting function sets up a normal distribution with a mean,

and a variable standard deviation:[7] where

is the filtering parameter (i.e., standard deviation) and

is the unfiltered value of the image at point

and is a square region of pixels surrounding

The computational complexity of the non-local means algorithm is quadratic in the number of pixels in the image, making it particularly expensive to apply directly.

Several techniques were proposed to speed up execution.

One simple variant consists of restricting the computation of the mean for each pixel to a search window centred on the pixel itself, instead of the whole image.

Another approximation uses summed-area tables and fast Fourier transform to calculate the similarity window between two pixels, speeding up the algorithm by a factor of 50 while preserving comparable quality of the result.

Application of non-local means to an image corrupted by Gaussian noise