
Non-local means is an algorithm in image processing for
image denoising. 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.
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. Recently non-local means has been extended to other image processing applications such as
deinterlacing, view interpolation, and depth maps regularization.
Definition
Suppose
is the area of an image, and
and
are two points within the image. Then, the algorithm is:
:
where
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
:
Common weighting functions
The purpose of the weighting function,
, is to determine how closely related the image at the point
is to the image at the point
. It can take many forms.
Gaussian
The
Gaussian weighting function sets up a normal distribution with a mean,
and a variable standard deviation:
:
where
is the filtering parameter (i.e., standard deviation) and
is the local mean value of the image point values surrounding
.
Discrete algorithm
For an image,
, with discrete pixels, a discrete algorithm is required.
:
where, once again,
is the unfiltered value of the image at point
.
is given by:
:
Then, for a Gaussian weighting function,
:
where
is given by:
:
where
and is a square region of pixels surrounding
and
is the number of pixels in the region
.
Efficient implementation
The
computational complexity
In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it. Particular focus is given to computation time (generally measured by the number of needed elementary operations) ...
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
A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in th ...
to calculate the similarity window between two pixels, speeding up the algorithm by a factor of 50 while preserving comparable quality of the result.
See also
*
Anisotropic diffusion
*
Digital image processing
*
Noise reduction
Noise reduction is the process of removing noise from a signal. Noise reduction techniques exist for audio and images. Noise reduction algorithms may distort the signal to some degree. Noise rejection is the ability of a circuit to isolate an und ...
*
Nonlocal operator
*
Signal processing
*
Total variation denoising
*
Bounded variation
*
Total variation
References
External links
Recent trends in denoising tutorialNon-local image denoising, with code and online demonstrationPatents citing 2005 IEEE paper where NLM was claimed as a new technique
{{Noise, state=uncollapsed
Image processing
Image noise reduction techniques