An adaptive method for noise removal from real world images
Transcript of An adaptive method for noise removal from real world images
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
112
AN ADAPTIVE METHOD FOR NOISE REMOVAL FROM REAL
WORLD IMAGES
Krishnan Kutty1, Lipsa Mohanty
2
1(Center for Research in Engineering Sciences and Technology, KPIT Cummins, Pune, India,
[email protected]) 2(Center for Research in Engineering Sciences and Technology, KPIT Cummins, Pune, India,
ABSTRACT
Noise removal is an important aspect in image processing. However, reduction of
noise from images that contain textured regions or which have very fine details is difficult.
Gaussian noise is very often encountered in acquired images. This paper presents a method to
denoise the images corrupted by Additive White Gaussian Noise (AWGN). The noise
removal technique proposed here is based on the modification of the well known bilateral
filter, which encompasses both the spatial distance and amplitudinal distance between a
centre point and its neighboring points. The proposed filter adapts its strength depending on
the amount of local noise present in the image. The proposed technique attempts to smooth
the image without deteriorating other visual aspects of the image. Experimental results show
that the proposed method performs well with different types of images and for a large range
of noise deviation. It is effective in removing additive Gaussian noise present in an image
along with enhancing the perceptual quality, by virtue of retaining true edges and performing
selective smoothing, of the image both qualitatively and quantitatively.
Keywords: Noise Removal, Additive White Gaussian Noise, Spatial distance, Amplitudinal
distance, Perceptual quality
1. INTRODUCTION
Noise in an image, invariably degrades the interpretability of data present in the
image. Image noise may be caused by different intrinsic and extrinsic conditions, which most
of the times, becomes difficult to avoid. Therefore, realizing a smart filter enabling successful
noise reduction without affecting the fine image details is of great importance. The noise
reduction filter must be adaptive so as to change its strength of filtering according to the
amount of noise present in the image.
INTERNATIONAL JOURNAL OF ELECTRONICS AND
COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)
ISSN 0976 – 6464(Print)
ISSN 0976 – 6472(Online)
Volume 4, Issue 1, January- February (2013), pp. 112-124 © IAEME: www.iaeme.com/ijecet.asp
Journal Impact Factor (2012): 3.5930 (Calculated by GISI)
www.jifactor.com
IJECET
© I A E M E
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
113
Among many techniques that exist in the open literature, a conventional linear filter
such as Gaussian filter [3] helps to smooth noises effectively but also tends to blur edges.
Vijaykumar et al [1] proposed a method in which they keep increasing the window size until
the number of elements within a factor multiplied with the image standard deviation is below
a particular threshold. However, this method will cease to work in case the image inherently
has high frequency component in it. The method proposed by Padole et al [6, 7] tends to over
smooth the image as is shown in their results thereby losing out on retaining the edges after
noise removal. Since the goal of filtering is not only to suppress the noise but also to
preserve the edge and detail information of the image, the nonlinear approaches generally
provide more satisfactory results than the linear approaches. Thus, there have been many
attempts to design digital filters which have the abilities of noise attenuation along with edge
preservation. In [4] C. Tomasi and R. Manduchi have proposed a bilateral filter to remove
Gaussian noise. In [8], Elad has detailed on improvements to the bilateral filtering technique.
The bilateral filter is a nonlinear filtering technique utilizes both spatial and amplitudinal
distances. Here a local filter is defined based on the combination of spatial distances and
amplitudinal distances between a centre point at (x, y) and its neighboring points. However
the edge preservation performance of bilateral filter is debatable for images with fine details
and for those that have a low signal to noise ratio (SNR). Moreover, it retains most of the
false edges from the original noisy image. In this paper, we have proposed a new modified
bilateral filter for reduction of Gaussian noise, wherein the noise standard deviation is known
a-priori. This filter shows improved performance in terms of MSE, PSNR and edge retention
over bilateral filter for the regions of input image that contains fine details.
The paper is organized as follows: next section describes the assumed noise model.
Section 3 illustrates the proposed noise removal method. Section 4 shows noise removal
experimental results and discussions, followed by conclusion in Section 5.
2. NOISE MODEL
Noise is modeled as Additive White Gaussian Noise (AWGN) where all the image
pixels deviate from their original values following a Gaussian curve. The probability density
function for the zero-mean Gaussian distribution is given by:
���� � ��� �
�� (1)
For each image pixel with the intensity value O (i, j) (1 ≤ i ≤ M, 1 ≤ j ≤ N for an M x N
image), the corresponding pixel of the noisy image X(i, j) is given by: ���,�� � ���,�� � ���,�� (2)
Where, each noise value G (i, j) is drawn from the zero-mean Gaussian distribution.
3. PROPOSED METHOD
The proposed noise reduction approach involves selective smoothening of image,
wherein edges are relatively better preserved. The performance of our algorithm is dependent
on prior knowledge about the standard deviation σ of the noise corrupted image. In this paper,
we have used Swati et al’s [5] method of transfer function based technique for estimating
noise standard deviation.
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
114
Having estimated the noise standard deviation, the proposed approach works in two
phases:
1. Estimate the smoothening parameter and
2. Generate the modified bilateral filter.
3.1. ESTIMATE THE SMOOTHENING PARAMETER
In order to estimate the smoothing parameter, blocks of three different window sizes
are considered. This helps in estimating the strength of noise at diverse regions in the noisy
image based on a varying window size around the pixel of interest. Based on the strength of
the Gaussian noise in the noise corrupted image, the smoothening parameter is estimated.
The detailed algorithm for estimation of smoothening parameter is summarized
below:
STEP 1: Initialise the block sizes. We have experimented with three window of sizes for the
block B (around the pixel of interest (i, j)), viz. 5×5, 7×7 and 9×9. Applying larger block
sizes could result in over estimation of smoothing parameter. The blocks are defined as:
B � x|y|z (3)
Where,
x = ���,�������:���;�����:��� y = ���,��������:����;������:���� z = ���,��������:����;������:����
We first select the block B � �.
STEP 2: We then compute the absolute difference D between the central pixel and its
neighborhood for the considered block. The local standard deviation !"#,$% is calculated for
the same block. &�',(� � |'��,�� *(��,��|(��,���+|,|- (4)
Where, c = central pixel
m = neighbouring pixel
�&"',(% � . �/� +|,|-∑ �&1 * 2�/1�� (5)
Where, k is the total number of elements
3 denotes the mean value within the window and is given by:
2 � �/∑ &1/1�� (6)
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
115
STEP 3: Compute the range filter 45 to determine the amplitudinal distance for the
considered block B.
67 � �+8 9* �:�'�� :�' (���&"',(% ; (7)
STEP 4: Here, we are taking into account the fact that for a Gaussian distributed variable
with mean µ and variance 2, 95.5% of the samples (drawn from the normal distribution) lies
within the range"µ* 2σ, µ� 2σ%. By applying this observation we compute P0, where P0 is the number of pixels ≤ 0.95.
=> � � ? � +|,|- � @ >. BC (8)
We then estimate ‘Noise Strength Factor (NSF)’D E� F|G|H , which is the ratio between P0 and
total number of elements k in the block.
I? � +|,|- � =>/?� +|,|- (9)
STEP 5: Similarly, we repeat Step 2, 3 and 4 for other window sizes, viz. B� J and B� K.
STEP 6: We now compute difference di where i=1, 2 and determine the smoothing factor fact.
L� � I? � , * I? � + (10)
L � I? � - * I? � , (11)
The differences d1 and d2 are used to analyse the strength of noise in the blocks where B � x|y|z. This provides three different conditions that will assist in estimation of fact. The
conditions that can possibly arise are as follows:
Case 1: The normalized noise strength factor (NSF) present in the region of 5x5 block is
higher as compared to 7x7 and 9x9 blocks. This denotes that the strength of noise gradually
decreases with increase in the block size.
Fig. 1: Noise strength factor (Case 1)
For such condition, we use block size of 5x5 for estimating the smoothening factor (fact).
Case 2: The normalized NSF in 5x5 block is the lowest. The strength gradually increases for
7x7 block and then again decreases for 9x9 block. Thus, the NSF is highest for 7x7 block.
0
0.5
1
1.5
(5x5) (7x7) (9x9)
No
ise
str
en
gth
fact
or
Block sizes
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
116
Fig. 2: Noise strength factor (Case 2)
For such condition, we use block size of 7x7 for estimating the smoothening factor (fact).
Case 3: The 5x5 block has the least normalized NSF and the 9x9 block has relatively more
NSF. The strength of noise increases with increase in the block size.
Fig. 3: Noise strength factor (Case 3)
For such condition, we use block size of 9x9 for estimating the smoothening factor (fact).
Thereafter, to calculate fact it is essential to know a-priori the level of Gaussian noise MNO present in the image. As discussed earlier, we use the approach detailed in [5] to
estimate MNO. Based on Step 6, if PQ R 0, this indicates that in 5x5 block, the level of noise is much more
than 7x7 block (Case 1).
T�'1 � �U� V IW � X� V Y ��Z1�&"',(%[ (12)
Similarly, if P\ R 0, this indicates that the amount of noise is more in 7x7 block as compared
to 9x9 block (Case 2).
T�'1 � ]U V IW �,^ V Y ��Z1�&"',(%[ (13)
Otherwise, it specifies that the strength of noise is higher in block of size 9x9 (Case 3).
0
0.5
1
1.5
(5x5) (7x7) (9x9)No
ise
str
en
gth
fact
or
Block sizes
0
0.5
1
1.5
(5x5) (7x7) (9x9)
No
ise
str
en
gth
fact
or
Block sizes
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
117
T�'1 � �U� V I? � -� V Y ��Z1�&"',(%[ (14)
Where, we have considered
_Q � `abc , _\ � `dac , _b � `edc for our experiments.
Looking at the way we calculated this factor, it is evident that it is some kind of weighted
average of its neighbours.
The value of fact is affected by two criteria:
• How close (spatially) are the neighbouring pixels and centre pixel for a given
block.
• How similar (in terms of gray value) are the neighbouring pixels and the
centre pixel for a given block.
STEP 7: Consider the block of size 5×5 of the noisy image and repeat Step 2. We obtain f�#,$� and !"#,$% as given in Eqn. (4) and (5). We now compute the new local standard
deviation gMh for the considered block:
���i � &"',(% V T�'1 (15)
We then repeat Step 3 to obtain 45 from Eqn. (7).
STEP 8: Convolve the noisy image with the Laplacian mask given in Eqn. (16) to generate a
Laplacian image. This helps in suppression of a large amount of smooth regions in the noisy
image, mostly leaving behind the high frequency noisy regions.
Laplacian mask = j � * �* � *� * � k (16)
We then consider a 5x5 block BLap of the Laplacian image and calculate the local standard
deviation σlmn.
3.2. GENERATE MODIFIED BILATERAL FILTER
Conventional bilateral filter [4] is a non-linear and non-iterative filtering technique
which utilizes both spatial and amplitudinal distances to preserve the image details.
In the Gaussian case, the bilateral filter can be defined as follows:
�o"/% � ∑ p"/,�%:"/��%q�r q∑ p"/,�%q�r q (17)
Where,
pZ"/, �% � �+8 s* ��Zt (18)
pu"/, �% � �+8 v* �:"/%�:"/��%��u w (19)
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
118
p"/, �% � pZ"/, �% · pu"/, �% (20)
Ws [k, n] computes the spatial distance and Wr[k,n] computes the amplitudinal distance.
W[k, n] is a local filter defined by combination of both spatial and amplitudinal distances.
In our approach, we have used the Laplacian image (generated in Step 8) for determining the
amplitudinal distances 45_z{|"#,$% for BLap, which is given as: 67_}�8"',(% � 67"',(%�}�8 (21)
Compute the spatial distance using the domain filter 4~"#,$% for the noisy image with block
B � �.6�"',(% � �+8 s* '��Z�t (22)
Combine the two filters 45_z{|"#,$% and 4~"#,$% to create a local filter 4"#,$% . 6"',(% � 6�"',(% V 67_}�8"',(% (23)
The modified bilateral filter is now defined as:
T"'%� � �∑ 6"',(%��'r � ∑ �6"',(%��'� �� q"'�(%� (24)
4. RESULTS AND DISCUSSIONS
4.1. CONFIGURATION
In this section we compare the performance of our proposed approach (PA) with other
standard noise reduction filters.
Some of the test images that we have used are as shown in Fig. 4. The performance of
the proposed algorithm is tested for various levels of noise (with standard deviation varying
from 5 to 40) and the results are compared with standard filters like Gaussian filter [3],
bilateral filter [4] and Wigner filter [6]. In addition to the visual quality, the performance of
the proposed algorithm and other standard algorithms are quantitatively measured.
Leaves Flower Lena
.
Baboon Barbara
Fig. 4: Test Images
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
119
All the filters are implemented in MATLAB 7.1. The filtering window used for
Gaussian filter and bilateral filter is of size 5×5 and that for Wigner filter is 7×7.
4.2. DENOISING PROPERTY
The denoising performance of the proposed algorithm and other standard methods are
tested for gray scale images. In order to quantitatively evaluate the performance of our
approach we have used two metrics, Mean Square error (MSE) and Peak Signal to Noise
Ratio (PSNR).
MSE � ��V� ∑∑∑∑ ∑∑∑∑ ����������,����� * ������,��������� �����>�����> (25)
=�qI � �>. ����>�7����U
� >. ����> �7��√��U (26)
Where,
m×n = size of the image
MAXI = maximum intensity value of the image
I = noise free original image
K = noisy test image
The results of the proposed algorithm are presented in the Fig. 5 and Fig. 6.
(a) (b) (c)
(d) (e) (f)
Fig. 5: (a) Input Image (b) Noisy image (σ =30) (c) Gaussian Filter output (d) Proposed
approach output (e) Bilateral Filter output (f) Wigner Filter output
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
120
(a) (b) (c)
(d) (e) (f)
Fig. 6: (a) Input Image (b) Image with high noise (σ =40) (c) Gaussian Filter output (d)
Proposed approach output (e) Bilateral Filter output (f) Wigner Filter output
The quantitative performance in terms of PSNR and MSE with different values of sigma
for mentioned standard filters and the proposed approach are shown in Fig. 7, Fig. 8, Fig. 9
and Fig. 10.
Fig. 7: Comparison of MSE of [3], [4] and PA for test images with σ = 10
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
121
Fig. 8: Comparison of PSNR of [3], [4], [6] and PA for test images with σ = 10
Fig. 9: Comparison of MSE of [3], [4] and PA for test images with σ = 20
0.00E+00
5.00E+01
1.00E+02
1.50E+02
2.00E+02
2.50E+02
3.00E+02
3.50E+02
4.00E+02
4.50E+02
Noisy Gaussian Bilateral Proposed
Approach
Me
an
Sq
ua
re E
rro
r (M
SE
)
Noise Reduction method
Comparision of MSE for test images with σ =20
LEAVES
FLOWER
LENA
BARBARA
BABOON
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
122
Fig. 10: Comparison of PSNR of [3], [4], [6] and PA for test images with σ = 20
4.3. EDGE RETENTION
Fig. 11 shows the comparison and analysis of the proposed approach and other
standard filters for edge preservation.
(a) (b) (c)
(d) (e) (f)
Fig. 11: (a) Input Image (b) Noisy image (σ =20) (c) Gaussian Filter output (d) Proposed
approach output (e) Bilateral Filter output (f) Wigner Filter output
0
5
10
15
20
25
30
Noisy Wigner Gaussian Bilateral Proposed
Approach
Pe
ak
Sig
na
l to
No
ise
Ra
tio
(P
SN
R)
Noise Reduction method
Comparision of PSNR for test images with σ =20
LEAVES
FLOWER
LENA
BARBARA
BABOON
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
123
In the Fig. 11, we can notice that the edges are better preserved in our proposed
algorithm as compared to methods proposed in [3], [4] and [6]. For instance the fine edges of
the hat are retained more precisely in 4(d) than in 4(c), 4(e), 4(f).
The quantitative edge retention performance of the proposed approach (PA) and [3],
[4], [6] is shown in Table I in terms of percentage of Edge Preserved factor (EP), Edge Lost
factor (EL), False Edge factor (FE) and number of Edges Not Match (ENM) with respect to
the edges present in the original image.
The EP, EL and FE tests are performed by “pixel to pixel” comparison of the original
input image and the filtered output image. The edge at a particular pixel position in the
original input image is being matched with that of the processed image. If an edge exists
there then, it’s considered as edge preserved else the edge is lost. And if there exist an edge at
a particular pixel position in the processed image but there does not exist a corresponding
edge at that particular pixel position in the original image then, we consider it as false edge.
The constraint behind “pixel to pixel matching” method is that it does not hold good if
there is any pixel shifting for the processed output image. Therefore, in order to obtain a
proper quantitative result for edge preservation, we have proposed an approach where we first
estimate the number of edges that do not match (ENM) in the processed image with respect to
the original image for a particular pixel position. Taking into consideration the pixel shift, we
then consider the 8 neighbours of the pixel. If there is an edge found in this eight neighbours
of the pixel, it is regarded as the sought after pixel and is marked so that the same edge is not
accounted for the next consideration. Thus, this approach assists in determining the number
of edges preserved in the processed output image with respect to the original image.
Table I. Comparison of percentage of EP, EL, FE and ENM of [3], [4], [6] and PA for σ =5
and σ =15 of test images
International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 4, Issue 1, January- February (2013), © IAEME
124
As seen in Table I, the Edge Preserving factor (EP) of the proposed algorithm is
higher than those in [3], [4], and [6]. At the same time, the Edge Lost factor (EL) and the
False Edge factor (FE) is low for the proposed approach. Moreover, the number of Edges not
matched (ENM) is low for the proposed method. All this, along with the fact that the MSE is
low and the PSNR is high substantiates the enhanced performance of the proposed algorithm
both in terms of noise removal as well as edge retention.
5. CONCLUSION
The proposed noise estimation technique performs well for images with wide range of
noise deviation and also gives encouraging results for noisy images that have inherent high
frequency or textured regions in it. The proposed approach removes Gaussian noise with edge
preservation for a wide range of Gaussian noise corrupted images and has improved
performances in terms of MSE and PSNR. Experimental results show that the proposed
method also preserves better the fine details of the processed image as compared to the
standard Gaussian filter, bilateral filter and Wigner filter. This approach can be easily
extended to color images as well.
REFERENCES
[1] V.R.Vijaykumar, P.T.Vanathi, P.Kanagasabapathy, Fast and Efficient Algorithm to
Remove Gaussian Noise in Digital Images, IAENG International Journal of Computer
Science, 37:1, IJCS_37_1_09, Feb 2010.
[2] A.K.Jain, “Fundamentals of Digital Image Processing”, Prentice Hall, Englewood cliffs,
1989.
[3] Gonzalez and woods,” Digital image Processing”, Prentice Hall, 2nd
edition, 2001.
[4] C.Tomasi, R.Manduchi, “Bilateral Filtering for Gray and Colour Images”, Proceedings
of 1998 IEEE International Conference on Computer Vision, Bombay, India.
[5] Krishnan Kutty, Swati Ojha, “A Generic Transfer Function Based Technique for Noise
Estimation”, IJCA Journal, Volume 51- Number 10, 2012.
[6] Padole, C.N.; Vaidya, V.G.; "Image restoration using Wigner distribution for night vision
system" 9th Int. Conf. on Signal Processing, 2008. ICSP 2008. Page(s): 844 - 848
[7] Vinay Vaidya, C Padole," Night Vision Enhancement using Wigner Distribution", IEEE
3rd International Symposium on Communications, Control and Signal Processing, 2008.,
ISCCSP2008, March, pp 1268-1272
[8] M. Elad, “On the origin of the bilateral filter and ways to improve it”, IEEE Trans. Image
Process. 11 (10) (2002) 1141–1151.
[9] Mr. J.Rajarajan and Dr. G.Kalivarathan, “Influence Of Local Segmentation In The
Context Of Digital Image Processing – A Feasibility Study” International journal of
Computer Engineering & Technology (IJCET), Volume 3, Issue 3, 2010, pp. 340 - 347,
Published by IAEME.