Non-local means

From HandWiki
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 [math]\displaystyle{ \Omega }[/math] is the area of an image, and [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] are two points within the image. Then, the algorithm is:[6]

[math]\displaystyle{ u(p) = {1 \over C(p)}\int_\Omega v(q) f(p,q)\,\mathrm{d}q. }[/math]

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

[math]\displaystyle{ C(p) }[/math] is a normalizing factor, given by

[math]\displaystyle{ C(p) = \int_\Omega f(p,q)\,\mathrm{d}q. }[/math]

Common weighting functions

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

Gaussian

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

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

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

Discrete algorithm

For an image, [math]\displaystyle{ \Omega }[/math], with discrete pixels, a discrete algorithm is required.

[math]\displaystyle{ u(p)= {1 \over C(p)}\sum_{q \in \Omega}v(q)f(p,q) }[/math]

where, once again, [math]\displaystyle{ v(q) }[/math] is the unfiltered value of the image at point [math]\displaystyle{ q }[/math]. [math]\displaystyle{ C(p) }[/math] is given by:

[math]\displaystyle{ C(p)= \sum_{q \in \Omega}f(p,q) }[/math]

Then, for a Gaussian weighting function,

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

where [math]\displaystyle{ B(p) }[/math] is given by:

[math]\displaystyle{ B(p)= {1 \over |R(p)|}\sum_{i \in R(p)}v(i) }[/math]

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

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]

See also

References

  1. Buades, Antoni (20–25 June 2005). "A non-local algorithm for image denoising". 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05). 2. 60–65. doi:10.1109/CVPR.2005.38. ISBN 978-0-7695-2372-9. 
  2. Buades, Antoni. "On image denoising methods". http://123seminarsonly.com/Seminar-Reports/029/42184313-10-1-1-100-81.pdf. 
  3. Dehghannasiri, R.; Shirani, S. (2012). "A novel de-interlacing method based on locally-adaptive Nonlocal-means". 2012 Conference Record of the Forty Sixth Asilomar Conference on Signals, Systems and Computers (ASILOMAR). pp. 1708–1712. doi:10.1109/ACSSC.2012.6489324. ISBN 978-1-4673-5051-8. 
  4. Dehghannasiri, R.; Shirani, S. (2013). "A view interpolation method without explicit disparity estimation". 2013 IEEE International Conference on Multimedia and Expo Workshops (ICMEW). pp. 1–4. doi:10.1109/ICMEW.2013.6618274. ISBN 978-1-4799-1604-7. 
  5. Martinello, Manuel; Favaro, Paolo. "Depth Estimation From a Video Sequence with Moving and Deformable Objects". IET Image Processing Conference. http://www.manemarty.com/Publications_files/Martinello_DepthSingleVideo.pdf. 
  6. Buades, Antoni (2011). "Non-Local Means Denoising". Image Processing on Line 1: 208–212. doi:10.5201/ipol.2011.bcm_nlm. http://www.ipol.im/pub/art/2011/bcm_nlm/. 
  7. Buades, Antoni. "On image denoising methods (page 10)". http://123seminarsonly.com/Seminar-Reports/029/42184313-10-1-1-100-81.pdf. 
  8. Wang, Jin; Guo, Yanwen; Ying, Yiting; Liu, Yanli; Peng, Qunsheng (2006). "Fast non-local algorithm for image denoising". pp. 1429–1432. 

External links