Beruflich Dokumente
Kultur Dokumente
CS766 Homework #4
Fall 2005
Westley Evans
Abstract
Over the years a variety of methods have been introduced to remove noise from digital
images, such as Gaussian filtering, anisotropic filtering, and Total Variation minimization.
However, many of these algorithms remove the fine details and structure of the image in addition
to the noise because of assumptions made about the frequency content of the image. The nonlocal means algorithm does not make these assumptions, but instead assumes that the image
contains an extensive amount of redundancy. These redundancies can then be exploited to
remove the noise in the image. This project will implement the non-local means algorithm and
compare it to other denoising methods using the method noise measurement.
1.0 Introduction
All digital images contain some degree of noise. Often times this noise is introduced by
the camera when a picture is taken. Image denoising algorithms attempt to remove this noise
from the image. Ideally, the resulting denoised image will not contain any noise or added
artifacts.
Major denoising methods include Gaussian filtering, Wiener filtering, and wavelet
thresholding. Many more methods have been developed; however, most methods make
assumptions about the image that can lead to blurring. This paper will explain these assumptions
and present a new method, the non-local means algorithm that does not make the same
assumptions. The non-local means method will then be compared to other denoising methods
using several measurements on the output images. One of the measurements used will be the
method noise, which is the difference between the image and denoised image [2].
and q2 and their respective neighborhoods. The neighborhoods of pixels p and q1 are similar,
but the neighborhoods of pixels p and q2 are not similar. Adjacent pixels tend to have similar
neighborhoods, but non-adjacent pixels will also have similar neighborhoods when there is
structure in the image [1]. For example, in Figure 1 most of the pixels in the same column as p
will have similar neighborhoods to p's neighborhood. The self-similarity assumption can be
exploited to denoise an image. Pixels with similar neighborhoods can be used to determine the
denoised value of a pixel.
Figure 1: Example of self-similarity in an image. Pixels p and q1 have similar neighborhoods, but pixels p and q2
do not have similar neighborhoods. Because of this, pixel q1 will have a stronger influence on the denoised value of
p than q2.
w p ,q V q
q V
(1)
where V is the noisy image, and weights w(p,q) meet the following conditions 0 w p , q
and
w p ,q
1 . Each pixel is a weighted average of all the pixels in the image. The
weights are based on the similarity between the neighborhoods of pixels p and q [1, 2]. For
example, in Figure1 above the weight w(p,q1) is much greater than w(p,q2) because pixels p and
q1 have similar neighborhoods and pixels p and q2 do not have similar neighborhoods. In order
to compute the similarity, a neighborhood must be defined. Let Ni be the square neighborhood
centered about pixel i with a user-defined radius Rsim. To compute the similarity between two
neighborhoods take the weighted sum of squares difference between the two neighborhoods or as
a formula d p , q
V Np
V Nq
2
2, F
squared difference of the neighborhoods and will be further discussed later in this section. The
weights can then be computed using the following formula:
1
e
Z p
w p ,q
d p ,q
h
e
q
d p, q
h
Rsim
1 2 i 1
i m
where m is the distance the weight is from the center of the filter. The filter gives more weight to
pixels near the center of the neighborhood, and less weight to pixels near the edge of the
neighborhood. The center weight of F has the same weight as the pixels with a distance of one
[3]. Despite the filter's unique shape, the weights of filter F do sum up to one.
Equation (1) from above does have a special case when q = p. This is because the weight
w(p,p) can be much greater than the weights from every other pixel in the image. By definition
this makes sense because every neighborhood is similar to itself. To prevent pixel p from overweighing itself let w(p,p) be equal to the maximum weight of the other pixels, or in more
mathematical terms w p , p
max w p , q
p q
[3].
small, too many similar neighborhoods will be found. Common values for Rsim are 3 and 4 to
give neighborhoods of size 7x7 and 9x9, respectively [1, 2].
The third parameter, Rwin, is the radius of a search window. Because of the inefficiency
of taking the weighted average of every pixel for every pixel, it will be reduced to a weighted
average of all pixels in a window. The window is centered at the current pixel being computed.
Common values for Rwin are 7 and 9 to give windows of size 15x15 and 19x19, respectively [1,
2]. With this change the algorithm will take a weighted average of 152 pixels rather than a
weighted average of N2 pixels for a NxN image.
4.0 Conclusion
As expected, Gaussian filtering performed poorly on all the test cases. The resulting
images show little detail and still contain noise. The method noise for the Gaussian filter
contained extensive structure and detail from the image.
The Wiener filter performed marginally better than the Gaussian filter. More noise was
removed by this method, but the images were still blurry. Once again the method noise
contained detail and structure from the image.
The SUSAN filter performed much better than the other two filters. The results from the
Walter and Camera cases show no noise and smooth edges. The SUSAN filter performed better
when there is less noise in the image. However, despite the good results the method noise still
contained some structure from the image.
The non-local means method performed exceptionally well. As expected, the non-local
means did a better job of preserving edges than the other methods. It performed best on periodic
textures like the stripped pants from the Barb test case. In the Camera and Walter test cases
where no noise was added, the denoised images looked clear and smooth. In all test cases for the
non-local means method, the method noise contained little structure from the image. The nonlocal means algorithm accomplished its goals of removing noise and preserving detail.
References
[1]
A. Buades, B. Coll, and J Morel. On image denoising methods. Technical Report 200415, CMLA, 2004.
[2]
A. Buades, B. Coll, and J Morel. A non-local algorithm for image denoising. IEEE
International Conference on Computer Vision and Pattern Recognition, 2005.
[3]
[4]
A. Efros and T. Leung. Texture synthesis by non parametric sampling. In Proc. Int.
Conf. Computer Vision, volume 2, pages 1033-1038, 1999.
[5]
[6]
[7]
[8]
The Ohio State University Signal Analysis and Machine Perception Lab. Image database.
http://sampl.ece.ohio-state.edu/database.htm
[9]
University of Southern California Signal and Image Processing Institute. Image database.
http://sipi.usc.edu/database/database.cgi?volume=sequences