To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

# Non-local means

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

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.[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.[5]

## Definition

Suppose ${\displaystyle \Omega }$ is the area of an image, and ${\displaystyle p}$ and ${\displaystyle q}$ are two points within the image. Then, the algorithm is:[6]

${\displaystyle u(p)={1 \over C(p)}\int _{\Omega }v(q)f(p,q)\,\mathrm {d} q.}$

where ${\displaystyle u(p)}$ is the filtered value of the image at point ${\displaystyle p}$, ${\displaystyle v(q)}$ is the unfiltered value of the image at point ${\displaystyle q}$, ${\displaystyle f(p,q)}$ is the weighting function, and the integral is evaluated ${\displaystyle \forall q\in \Omega }$.

${\displaystyle C(p)}$ is a normalizing factor, given by:

${\displaystyle C(p)=\int _{\Omega }f(p,q)\,\mathrm {d} q.}$

## Common weighting functions

The purpose of the weighting function, ${\displaystyle f(p,q)}$, is to determine how closely related the image at the point ${\displaystyle p}$ is to the image at the point ${\displaystyle q}$. It can take many forms.

### Gaussian

The Gaussian weighting function sets up a normal distribution with a mean, ${\displaystyle \mu =B(p)}$ and a variable standard deviation:[7]

${\displaystyle f(p,q)=e^{-{{\left\vert B(q)-B(p)\right\vert ^{2}} \over h^{2}}}}$

where ${\displaystyle h}$ is the filtering parameter (i.e., standard deviation) and ${\displaystyle B(p)}$ is the local mean value of the image point values surrounding ${\displaystyle p}$.

## Discrete algorithm

For an image, ${\displaystyle \Omega }$, with discrete pixels, a discrete algorithm is required.

${\displaystyle u(p)={1 \over C(p)}\sum _{q\in \Omega }v(q)f(p,q)}$

where ${\displaystyle C(p)}$ is given by:

${\displaystyle C(p)=\sum _{q\in \Omega }f(p,q)}$

Then, for a Gaussian weighting function,

${\displaystyle f(p,q)=e^{-{{\left\vert B(q)-B(p)\right\vert ^{2}} \over h^{2}}}}$

where ${\displaystyle B(p)}$ is given by:

${\displaystyle B(p)={1 \over |R(p)|}\sum _{i\in R(p)}v(i)}$

where ${\displaystyle R(p)\subseteq \Omega }$ and is a square region of pixels surrounding ${\displaystyle p}$ and ${\displaystyle |R(p)|}$ is the number of pixels in the region ${\displaystyle R}$.

## Efficient implementation

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.[8]