 Open Access
 Total Downloads : 259
 Authors : Sureshkumar Natarajan, Snigdha Saxena
 Paper ID : IJERTV3IS080755
 Volume & Issue : Volume 03, Issue 08 (August 2014)
 Published (First Online): 01092014
 ISSN (Online) : 22780181
 Publisher Name : IJERT
 License: This work is licensed under a Creative Commons Attribution 4.0 International License
Adaptive Window Size Median Based Filter for Impulse Noise Removal in Digital Images
Sureshkumar Natarajan Snigdha Saxena
Department of Electronics & Telecommunication Department of Mathematics Vishwaniketans Institute of Management Pillais Institute of Information Technology Enterprenuership and Engineering Technology New Panvel, Maharashtra, India [iMEET], Khalapur, Panvel, Maharashtra,India
Abstract: In this paper, a new nonlinear filter called adaptive window size median based filter for removing salt and pepper noise and random valued impulse noise with edge and detail preservation is presented. In the proposed method, the corrupted pixels are replaced by the median value of the uncorrupted pixels in the filtering window after identifying the impulse pixel based on threshold values. Since the proposed algorithm takes a decision whether the pixel under test is corrupted or not, it works well up to a noise density as high as 70% with much lower computation time compared to the other standard techniques. Experimental results clearly indicate that the proposed method surpasses many of the existing methods such as standard median filter, weighted median filter, centre weighted median filter, recursive weighted median filter, progressive switching median filter and other proposed decision based algorithm in terms of visual quality and quantitative measures.
Keywords: Salt and pepper noise, Random valued noise, Median filter.

INTRODUCTION
Generally, image acquired by camera sensors and image transmission through communication channels adds impulse noise in an image [1]. The intensity of impulse noise has the tendency of being either relatively high or relatively low. Thus, it could severely degrade the image quality and cause some loss of information details to remove impulse noise, image denoising is very important for further image processing. Impulse noise are classified as random valued impulse noise and fixed value impulse noise. Random valued impulse noise can take any value in the dynamic range of the image. Fixed value impulse noise also called as salt and pepper noise can take either minimum value (i.e.0) or maximum value (i.e.255) in the dynamic range [2].
In the past, various filtering techniques have been proposed for removing impulse noise. It is wellknown that linear filters could produce serious image blurring. As a result, nonlinear filters [1], [2] have been widely exploited due to their much improved filtering performance, in terms of impulse noise attenuation and edge/details preservation The standard median filter replaces every pixel by its median value from its neighborhood and often removes desirable details in the image. Specialized median filters such as weighted median filter[1] and central weighted
median filter [1] recursive weighted median filter [3] were proposed to improve the performance of the median filter by giving more weight to some selected pixels in the filtering window. But they are still implemented uniformly across the image without considering whether the current pixel is noise free or not.
Therefore, noisedetection process to discriminate between uncorrupted pixels and the corrupted pixels prior to applying nonlinear filtering is highly desirable. Some of the decision based algorithm such as progressive switching median filter [4], median type noise detector [5], and decision based algorithm [6] has been reported in the literature. This algorithm first detects the noisy pixels and removes it by applying either standard median filter or its variants. These filters are effective in removing low to medium density impulse noise. Detail Preserving Median Based filter For Impulse Noise Removal In Digital Images has also been studied [7], but it does not give clear details about the threshold value for the random valued impulse noise. In the present work we have also estimated the execution time taken in case of all filtering window size.
In this paper, adaptive window size median based filter for impulse noise detection and removal is proposed to remove low to medium density salt and pepper noise and random valued impulse noise with edge and fine detail preservation. The proposed algorithm takes a decision whether the pixel under test is corrupted or not before applying the median filter. In order to improve the noise removal capability of the proposed filter, adaptive window length technique is incorporated in the filtering stage.
The organization of the paper is as follows: Section 2 gives the noise model used in this paper. The proposed algorithm is described in the section 3, illustration of the algorithm is given in section 4 and results and discussions is described in section 5 and section 6 concludes the paper.

NOISE MODEL
The salt and pepper (SP) noise is also called as fixed valued impulse noise will take a gray level value either minimal (0) or maximum (255) in the dynamic range [0 255]. It is generated with equal probability. In case of salt and pepper noise, the image pixels are randomly corrupted by either 0 or 255. Salt and pepper noise is mathematically represented as:
f (x, y) with probability p 1 d

Separation of uncorrupted pixel and corrupted pixels can
f (x, y) 0
p d / 2
(1)
be done by using following step,
SPN
1
p d / 2
X *
1,
0,
ij
ij
1
0
(6)
where d is the noise density


PROPOSED ALGORITHM
The proposed algorithm is basically a two stage algorithm, in which the first stage is used to detect impulse noise and second stage is used to replace the corrupted pixels with median value of uncorrupted pixel in the filtering window. This algorithm works both for fixed valued impulse noise and random valued impulse noise.
Let X denote the noise corrupted image of size MxN

Apply a filtering window of initial size 3×3 to the noisy pixels whose values are zero in the matrix ( X * ) and
replace the noisy pixel with the median value of the uncorrupted pixel in the window.

If the number of uncorrupted pixels in the window is at least three, otherwise window size is increased to 5×5. Table 1 shows the noise density with corresponding window size.
Table I. Noise density Vs window size
Noise Density
Window size
10% < < 30%
3×3
40% < < 60%
5×5
70% < < 90%
7×7
(i.e.1 i M , 1
j N ) and for each pixel
X (i, j)
denoted as xij , a sliding window of size
( (2L 1)x(2L 1) ) centered at
X ij
is defined. The
steps of the algorithm are as

Get the noisy image as X .

Let
xij
be the current pixel to be processed; Wij is the
sliding window of size (2L 1)x(2L 1) centered at xij . The elements of this window


ILLUSTRATION OF ALGORITHM
Wij
{xi j,uv ,

L u, v L}
(2)

Apply a 3×3 noise detection filtering window to the entire pixels in the image.

Find the absolute difference (AD) between the centre pixel values with the neighboring pixels in the corresponding window as
A 5×5 image segment from a 10% noise corrupted Lena image is considered.
Original Image Noisy Image
Segent Segment(SPN)
1,
0 xi j,uv xij T
31
63 145
80 14 6
31
63 145
80 1 46
i j,uv
8
0,
otherwise
(3)
37 81 126
175
37 81 126 0 8
36 31
61 26
94 36 31 61 26
255

Count the number of pixels whose absolute difference
lies in between zero to particular threshold
34 22
76 11
84 34 22 76 0
84
( 0 AD T ). For optimum performance the threshold value ( T ) chosen to be 40 for salt & pepper noise (SPN)
5
110
80 192
169
5
110
80 192
169
and 10 for random valued impulse noise (RVIN).
Applying 3 X 3 Noise Detection Filtering Window on
ij
i j,uv
Lu,vL
(4)
Noisy Image Segment.
where ij
denotes the number of pixels which are similar
to that of center pixels.

Let us assume ij
as same size of the filtering window
and assigned to one when
T2 . .
ij
is greater than a threshold
ij
1,
ij
T2
(5)
Absolute difference between center pixel and surrounding
0, otherwise
pixels are AD = {61, 26, 255, 76, 84,80,192,169}. Hence,
where T2 is a predefined threshold is chosen to be 2 for
i j,uv {0,1, 0, 0, 0, 0, 0, 0} . Therefore,
optimum performance.
ij 1
indicates a noise free
ij
1 and
ij
is set to zero because count is lesser
pixel. than the threshold value 2. Then multiply the noisy image
segment with
ij
which is shown below. In this example,
the center pixel is corrupted, hence center pixel is replaced by median value of uncorrupted pixel in the filtering window (i.e. 61, 26, 76). Here the center is replaced by the median value 61. If the center pixel is uncorrupted then that center pixel is retained.


RESULTS AND DISCUSSION
In this section, the proposed algorithm is tested for four different test images such as Lena, Mandrill, bridge and pepper of size 512×512, 8 bits/pixel. All these images are corrupted with different noise densities and applied to the proposed filter. The performance of the proposed filter is compared with the existing filters such as standard median filter (SMF), center weighted median filter (CWMF), weighted median filter (WMF), and recursive weighted median filter (RWMF), Progressive Switching median filter (PSMF) and Decision Based Algorithm (DBA). A quantitative comparison is performed between the various filters and the proposed filter on the basis of four objective quality measures such as peak signal to noise ratio, mean absolute error, structural similarity index and universal quality index as defined as
2552
PSNR 10 log10 MSE
(7)
MAE
M
x1
N
y1
f(x, y) f (x, y) MxN
(8)
Fig.1 (a) Original Lena image(b) Noisy image (SPN=60%). Restoration results of (c) SMF (d) WMF (e) CWMF (f) RWMF (g) PSMF (h) DBA (i) Proposed Algorithm
SSIM (x, y)
(2x y C1 )(2 xy C2 )
( 2 2 C )( 2 2 C )
(9)
x y 1 x y 2
where
f(x, y)
and
f (x, y)
denote the pixel values
of the restored image and the original image, respectively.
MxN is the size of the image. x
and
y represent
the mean of the original and restored images.
x and

y represent the standard deviation of the original and
restored images.

xy
represent the standard deviation of
the original and restored image. C1
and C2
are small
constant which and are added to avoid instability [8].
Fig.2(a) Noisy image (RVIN=40%). Restoration results of (b) SMF (c) WMF (d) CWMF (e) RWMF (f) PSMF (g) DBA (h) Proposed Algorithm
New Approach (M=1296)
(inside training)
36.02
dB
34.44
dB
32.95
dB
31.77
dB
30.49
dB
New Approach (M=1296)
(outside training)
36.64
dB
34.72
dB
32.95
dB
31.52
dB
29.99
dB
Proposed Algorithm
41.38
dB
40.45
dB
39.74
dB
39.05
dB
38.05
dB
Table II. Comparative restoration results in PSNR for various percentage of randomvalued impulse noise of Lena image.
Algorithm
Percentage of RandomValued Impulse Noise
10%
15%
20%
25%
30%
Median Filter(3×3)
32.14
dB
31.01
dB
29.76
dB
28.01
dB
26.20
dB
New Approach (M=2) no
training
35.18
dB
33.94
dB
32.47
dB
31.18
dB
29.87
dB
Table III. Comparative restoration results in PSNR of various filters for pepper image corrupted by salt and pepper noise at different noise densities
Table IV. MAE of various filters for pepper image corrupted by salt and pepper noise at different noise densities
Table V. Comparative restoration results in SSIM of various filters for Lena image corrupted by salt and pepper noise at different noise densities
Algorithms
SSIM
SMF( 3 X 3 window size)
0.04868
WMF( 5 X 5 window size)
0.20708
CWMF( 5 X 5 window size)
0.09442
RWMF(2 iteration)
0.3398
PSMF
0.7113
DBA
0.6875
Proposed Algorithm
0.9
Table VI. Variation of Execution Time (seconds) for various images with respect to noise density for random valued impulse noise


IMPLEMENTATION
Adaptive window size median based filter for impulse noise removal in digital images is presented to remove salt and pepper noise and randomvalued impulse noise with edge and fine detail preservation. The proposed algorithm is implemented in MATLAB 7.0 equipped in a Pentium IV PC. The proposed algorithm is tested with 4 different images such as Lena, Mandrill, Pepper and Bridge,

CONCLUSION
The visual quality clearly indicates that it performs much better than other existing filters. The restoration results in terms of PSNR and MAE also confirm better performance of the filter as compare to other existing filters. PSNR of Lena image corrupted with randomvalued impulse noise with noise density in the range of 10% to 30% have been calculated. Execution time for various images has also been calculated and it has been observed that the algorithm proposed in the present paper takes less execution time as compared to other existing work.
REFERENCES

J. Astola and P. Kuosmanen, Fundamentals of nonlinear digital filtering, Boca Raton, FL: CRC,1997.

Abreu E., Lightstone M. and Mitra S.K., A new efficient approach for the removal of impulse noise from highly corrupted images, IEEE Trans. on image processing, vol. 5, No.6, pp. 10121025, 1996.

Arc G. and Paredes J., Recursive weighted median filters admitting negative weights and their optimization, IEEE Trans. on signal process., vol. 48,No. 3, pp. 768779, 2000.

Z. Wang and D. Zhang, "Progressive switching median filter for the removal of impulse noise from highly corrupted images," IEEE Transactions on Circuits and Systems II, 46, pp. 7880., 1999.

R. H. Chan, C.W. Ho, and M. Nikolova, Salt and pepper noise removal by median type noise detectors and detail preserving regularization, IEEE Trans. Image Process. vol. 14, no. 10, pp. 14791485, Oct.2005.

K.S.Srinivasan and D.Ebenezer, A new fast and efficient decision based algorithm for removal of high density impulse noises, IEEE Signal Process. Let., vol. 14, no. 3, pp. 189192, Mar 2007.

V.R. Vijaykumar,D.Ebenezer and P.T.Vanathi, Detail preserving median based filter for removal in digital images, ICSP proceedings, 2008.

Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image quality assessment: from error visibility to structural similarity," IEEE Trans. on Image Processing, vol. 13, no. 4, pp. 600612, 2004.