Content uploaded by B Mohammed Imran
Author content
All content in this area was uploaded by B Mohammed Imran on Dec 30, 2014
Content may be subject to copyright.
Removal Of High And Low Density Impulse Noise
From Digital Images Using Non Linear Filter
T.M.Benazir1, B.M.Imran2
1M.Tech Student, 2Professor
Department of P.G, Applied Electronics, ICET, Muvattupuzha
1benazirmytheen@gmail.com, 2abbabeta@gmail.com
Abstract
Noise Suppression from images is one of the most
important concerns in digital image processing. Impulsive
noise may occur during image acquisition, transmission or
storage. Noise should be removed in such a way that
important information of image should be preserved. We
can use so many algorithms for getting the original image,
by removing salt and pepper noise from the corrupted
images. In this paper an algorithm is proposed for the
restoration of gray scale images that are highly corrupted
by impulse noise (salt and pepper noise). There are two
phases in the proposed algorithm. First phase detects
whether the processing pixel is corrupted or not. In the
Second phase it recreates the corrupted pixel by means of
the proposed algorithm. This algorithm shows better
results than the Standard Median Filter (MF),Center
Weighed Median Filter(CWM), Adaptive Median
Filter(AMF), Adaptive Center Weighed Median Filter
(ACWM), Decision Based Algorithm (DBA) and Modified
Decision Based Unsymmetrical Trimmed Median Filter
Algorithm(MDBUTMF). Obtained results with different
grayscale images shows that proposed algorithm gives
better Peak Signal-to-Noise Ratio (PSNR) and less
Computational time and works well in removing salt and
pepper noise at low, medium and high noise densities.
Key words: median filter, mid-point filter, salt and
pepper noise, decision based unsymmetrical median.
I. INTRODUCTION
Noise is an unwanted information that corrupts
an image. In digital images various types of noises are
there. Different noise models which can corrupt images
are Gaussian, Impulse, Rayleigh or an erlang and
speckle noise. An image can be corrupted by means of
Impulse noise, because of faulty camera sensors, errors
in data acquisition systems, and transmission through
noisy channel. In Impulse noise, intensity of the
corrupted pixels will be either relatively high or low [1]-
[3]. There are two types of impulse noise, they are salt
and pepper noise and random valued noise. In Salt-and-
pepper noise, the gray level value of some of the pixels
of an image will be either 255, maximum or 0 ,
minimum. The appearance of noise is as white and
black dots superimposed on the image and hence the
name salt and pepper noise. In the presence of salt and
pepper noise information in the image may be get
corrupted. Therefore, removal of this type of noise is
critical for the extraction of reliable and accurate
information from a digital image [2].
II. BACKGROUND WORK
Several nonlinear filters have been proposed
for restoration of images corrupted by salt and pepper
noise. Among these standard median filter is the simple
method to remove the salt and pepper noise without
damaging the edge details. But for this, when the noise
level is above 50% the edge details of the original image
will not be preserved, works only at low noise
densities[3].In Weighed median (WM) filter and Center
Weighed Median filter (CWM) weights are assigned to
selected pixels in the filtering window in order to
control the filtering behavior. These filters not checking
whether the processing pixel is corrupted or not and
process all pixel elements. So at high noise density level
these filters fails to reproduce the original image with
edge details. In order to avoid the drawback of CWM
filter we can go for Adaptive centre weighted median
(ACWM) filter. But in this filter we need some
threshold values [1],[4].
In adaptive median filter (AMF) window size
increases and is effective only at low noise densities [2].
Decision based filter checks for noise in each processing
pixel. If the processing pixel is 0 or 255 it is considered
as noise and is processed. At high noise density level
the DBA filter replaces the noisy pixel by means of the
neighborhood pixel [5]. At high noise density level
DBA filter produces streaks in the output image because
of the continuous replacement and an improved DBA is
proposed to avoid this drawback [7]. In DBUTMF
instead of replacing with neighborhood pixel
unsymmetrical trimmed median value is used. But at
high noise densities, in selected window all the pixel
elements may be either or both 0 or 255. In this case
unsymmetrical trimmed median will be either 0 or 255,
which is again noise. To avoid this drawback we go for
Modified decision based un-symmetric trimmed median
filter (MDBUTMF). In this when the above mentioned
case occurs, mean of the selected window will be found
and replaced [8][9]. All these algorithms fail at high
noise density. To remove salt and pepper noise at high
noise density, a new algorithm is proposed in this paper.
The rest of the paper is structured as follows.
Section III describes about the proposed algorithm and
different cases of proposed algorithm. The detailed
explanation of the proposed algorithm with an example
is presented in Section IV. Simulation results with
different images are presented in Section V. Finally in
Section VI conclusions are given.
III. PROPOSED ALGORITHM
In a trimmed filter a 3×3 window is selected
and the corrupted pixels are rejected. Alpha Trimmed
Mean Filtering (ATMF) is a symmetrical filter where
the trimming is done symmetrically at both ends.
Trimming of uncorrupted pixels takes place in this
method and so loss of image detail and image blurring
will occur. An Unsymmetric Trimmed Median Filter
(UTMF) is proposed to overcome the above mentioned
drawback. In this UTMF, a 3× 3 window is selected and
the elements are arranged in either ascending or
descending order. From this the noisy pixel elements 0s
and 255s are eliminated, which are responsible for salt
and pepper noise and the median value of the remaining
pixels were taken. The corrupted pixel is replaced by
this median value. Since the pixel values 0s and 255s
are eliminated from the selected window it is called as
trimmed median filter. This method is better than
ATMF, because it identifies the noise and is
removed[9].
The proposed algorithm processes the
corrupted images by first detecting the impulse noise.
The pixel value is processed to check whether it is
corrupted or not. If the gray level value lies in-between
0 and 255 it is not corrupted and is left unchanged. Else
it is a corrupted pixel and is processed by the proposed
filter. The steps of the algorithm are as follows.
ALGORITHM
Step 1: Select 2-D window of size 3 × 3. Let P (i,j) be
the processing pixel .
Step 2: Check whether processing pixel P ( i,j) is
corrupted or not.
Step 3: If P (i,j) is an uncorrupted pixel then its value is
left unchanged. This is illustrated in
Case iii) of Section IV.
Step 4: If P (i,j) is a corrupted pixel then two cases are
possible as given in Case i) and ii).
Case i): If the selected window contains all the elements
with the mean of the
preprocessed neighborhood pixels by means of a
midpoint filter.
Case ii): If the selected window contains not all
elements as
and find the median value of the remaining elements.
Replace with the median value.
Step 5: Repeat steps 1 to 4 until all the pixels in the
entire image are processed.
The pictorial representation of each case of the proposed
algorithm is shown in Fig.1. The detailed description of
each case of the flow chart shown in Fig.1 is illustrated
through an example in Section IV.
Fig 1: Proposed algorithm
IV. ILLUSTRATION OF PROPOSED
ALGORITHM
The proposed algorithm consists of two phases.
First phases detects whether the processing pixel is
corrupted or not. In the second phase the corrupted
pixels are reconstructed using the proposed algorithm.
Each and every pixel of the image is checked for the
presence of salt and pepper noise. Different cases are
illustrated in this Section. If the processing pixel is
noisy and all other pixel values
illustrated in Case i). If the processing pixel is noisy
pixel that is 0 or 255 is illustrated in Case ii). If the
processing pixel is not noisy pixel and its value lies
between 0 and 255 is illustrated in Case iii).
Case i): If the selected window contains salt and pepper
noise as processing pixel (i.e., 255/0 pixel value) and
neighboring pixel values contains all pixels that adds
salt and pepper noise to the image: An example is
illustrated.
0
255
0
0
<255>
255
255
0
255
Where (i,j). Since all
If one takes
the median value it will be either 0 or 255 which is
again noisy. To solve this problem, the mean of the
previously processed neighborhood pixels from the
selected window is found and the processing pixel is
replaced by the mean value. And for finding this mean
value we go for a midpoint filter. Let P is the processing
window in the processing matrix as shown below.
P ( i-1,j-1 )
P ( i-1,j )
P ( i-1,j+1 )
P ( i,j-1 )
< P ( i,j ) >
P ( i,j+1 )
P ( i+1,j-1 )
P ( i+1,j )
P ( i+1,j+1 )
Fig 2: 3×3 window in the processing matrix
When processed till P (i,j) the processed matrix will be
as shown below.
P’ ( i-1,j-1 )
P’ ( i-1,j )
P’( i-1,j+1 )
P’ ( i,j-1 )
< P ( i,j ) >
P ( i,j+1 )
P ( i+1,j-1 )
P ( i+1,j )
P ( i+1,j+1 )
Fig 3: 3×3 window in the processing matrix
In cases where the processing pixel is
corrupted and all the surrounding pixels are noisy, we
replace that processing pixel by finding the mean of the
previously processed neighborhood pixels. Here we find
-1,j---
( i,j-1 ) ], previously processed neighborhood elements,
with the help of a midpoint filter and will replace the
processing pixel by that value.
i.e ; i,j ) =mid -1,j--1,j ),
( i--1 ) }
= {max{ -1,j- - ( i- -
1)i-1,j-1)( i-1,j ),( i- -1 )
}} /2
Case ii): If the selected window contains salt or pepper
noise as processing pixel (i.e., 255/0 pixel value) and
neighboring pixel values contains some pixels that adds
salt (i.e., 255 pixel value) and pepper noise to the
image:
78
90
0
120
<0>
255
97
255
73
Where P(i,j). Now eliminate
the salt and pepper noise from the selected window.
Here the
elimination is unsymmetric and so it is unsymmetrical
trimming. The 1-D array of the above matrix is [78 90 0
120 0 255 97 255 73]. After elimination
will be
[78 90 120 97 73]. Here the median value is 90. Hence
replace the processing pixel by 90.
Case iii): If the selected window contains a noise free
pixel as a processing pixel, it does not require further
processing. For example, if the processing pixel is 90
then it is noise free pixel:
43
67
70
55
<90>
79
85
81
66
P(i,j) .
a noise free pixel it does not require further processing.
V. RESULTS AND COMPARISON
The performance of the proposed algorithm is
tested with different grayscale images. The value of
noise density is varied from 10% to 90% for the image.
Denoising performances are quantitatively measured by
the PSNR and MSE as defined in (1) and (2),
respectively.
PSNR in dB =
(1)
MSE =
(2)
Where MSE stands for mean square error, M×N is size
of the image, Y represents the original image and
denotes the denoised image.
The PSNR and MSE values of the proposed
algorithm are compared against the existing algorithms
by varying the noise density from 10% to 90% for Lena
image were shown in Table I and Table II. From the
Tables I and II, it is observed that the performance of
the proposed algorithm is better than the existing
algorithms at both low and high noise densities. A plot
of PSNR and MSE against noise densities for Lena
image is shown in Fig. 4.
Noise
in %
MF
ACW
M
AMF
DBA
MDB
UTM
F
PA
10
29.05
30.98
33.92
36.33
35.9
36.11
20
26.47
27.36
31.47
32.88
32.9
33.83
30
22.26
22.33
29.87
30.42
30
31.72
40
18.11
18.5
27.32
27.48
28.69
30.14
50
14.62
14.81
24.35
25.83
27.49
28.86
60
12
12.18
19.61
23.87
26.34
27.51
70
9.65
9.71
15.02
21.82
25.17
25.95
80
7.77
7.79
11.50
19.33
23.68
24.52
90
6.28
6.31
8.05
16.31
18.66
22.33
Table I
Comparison of PSNR values of different algorithms for
Lena image at different noise densities
The qualitative analysis of the proposed
algorithm against the existing algorithms at different
noise densities for Lena image is shown. Results
obtained for Lena image at 50% and 90% noise density
for different algorithms and proposed algorithm were
shown in the figure 6 and fig 7. The proposed algorithm
is tested against images namely Cameraman, Baboon
and Lena. These
noise and the PSNR values of these images
using different algorithms are given in Table III. From
the table, it is clear that the PA gives better PSNR
values irrespective of the nature of the input image.
Computational time for the PA is compared against the
MDBUTMF and is shown in Table IV. And a plot of
computational time versus noise density is given in fig
5. From this we can see that the PA takes less
computational time than the MDBUTMF. And the result
obtained for 90%noise density for Baboon image is
shown in Fig 8.
Table II
Comparison of MSE values of different algorithms for
Lena image at different noise densities
(a)
(b)
Fig 4: comparison of (a) MSE and (b) PSNR at different
noise densities foe Lena image
Noise
in
%
MF
ACW
M
AMF
DBA
MDB
UTM
F
PA
10
80.87
64.07
26.35
15.15
19.17
15.89
20
146.5
3
119.3
4
46.36
33.48
32.93
26.9
30
386.0
8
380.6
8
66.89
59.01
64.97
43.77
40
1005.
22
918.0
0
120.2
7
116.0
8
87.85
62.9
50
2244.
43
2149.
66
238.7
9
169.8
4
115.9
84.45
60
4097.
91
3938.
48
711.2
6
267.0
1
150.8
8
115.3
7
70
7042.
56
6944.
95
2043.
66
427.5
8
197.7
8
164.8
8
80
10558
.47
10805
.65
4623.
25
758.1
4
278.4
8
229.6
5
90
15290
.41
15195
.85
10183
.34
1521.
19
791.6
5
389.0
5
Test
imag
es
PSNR in dB
MF
AC
WM
AMF
DBA
MD
BUT
MF
PA
Cam
eram
an
6.12
6.25
7.93
16.47
16.96
21.59
Lena
6.82
6.78
8.54
17.65
18.66
22.33
Babo
on
6,26
6.32
8.05
16.31
17.45
21.12
Table III
Comparison of PSNR values of different
Test images at noise density of 90%
Noise
density
in %
Computational time in
seconds
MDBUTMF
PA
10
.6163
.3446
20
.6586
.5357
30
.8216
.6751
40
1.0131
.8833
50
1.2329
1.0484
60
1.3111
1.2146
70
1.4961
1.3676
80
1.7072
1.4253
90
1.8352
1.2802
Table IV
Comparison of computational time in seconds for the PA
with MDBUTMF for Lena image at different noise
densities
Fig 5: Comparison graph of computational time at
different noise densities for Lena image
Fig 6: Results of different algorithms for Lena image (a)
input image (b) output of MF (c) output of ACWM (d)
output of AMF (e) output of DBA (f) output of DBUTMF
(g) output of PA at 50% noise density
Fig 7: Results of different algorithms for Lena image (a)
input image (b) output of MF (c) output of ACWM (d)
output of AMF (e) output of DBA (f) output of DBUTMF
(g) output of PA at 90% noise density
Fig 8: Results of different algorithms for Baboon image
(a) input image (b) output of MF (c) output of ACWM (d)
output of AMF (e) output of DBA (f) output of DBUTMF
(g) output of PA at 90% noise density
VI. CONCLUSION
In this paper the proposed algorithm presents a
new approach to improve PSNR of highly corrupted
images. This method gives an acceptable and
recognizable restoration of image corrupted with noise
as high as 90%. Unlike some filtering mechanisms
which require iterations, and thus consumed lengthy
processing time, the proposed filter only need to be
applied once and is very efficient with its computational
time. According to the experimental results, the
proposed method is superior to the conventional
methods in perceptual image quality, and it can provide
quite a stable performance over a wide variety of
images with various noise densities. One of the
advantages of this method is that this method does not
need the threshold parameter. Simulation results shows
that this method always produces good output, even
when tested with high level of noise. Thus, the proposed
filter is able to suppress low to high density of salt and
pepper noise, at the same time preserving fine image
details, edges and textures well. In future this algorithm
can be extended for color images, videos and also for
removing random valued impulse noise.
REFERENCES
[1
median filters and their applications to image
vol. 38, no. 9, pp. 984-993.
[2
median filters: ne
transactions on image processing, Vol.no:4, pp.499-502.
[3] J. Astola and P. Kuosmaneen, Fundamentals of
Nonlinear Digital Filtering.1997.
[4
Detection Using Center-Weighted Median
IEEE Signal Processing Letters, Vol. 8, No. 1, January
2001.
[5
Letters., vol. 9, no. 11, pp. 360363, Nov. 2002.
[6] Rafel.C.Gonzalez, and Richard.E.Woods, (2007).
Digital Image Processing, Second Edition.
and Efficient Decision-Based Algorithm for Removal of
High-
Letters, Vol.no:14, pp.189 192.
[8] Madhu S. Nair, K. Revathy, and Rao Tatavarti,
Removal of Salt-and Pepper Noise in Images: A New
Decision-Based Algorithm Proceedings of the
International MultiConference of Engineers and
Computer Scientists 2008 Vol I, IMECS 2008, 19-21
March, 2008, Hong Kong
[9] S. Esakkirajan, T. Veerakumar, Adabala N.
Subramanyam, and C. H. PremChand, Removal of
High Density Salt and Pepper Noise Through Modified
Decision Based Unsymmetric Trimmed Median Filter,
IEEE Signal Processing Letters, Vol. 18, No. 5, May
2011