You are on page 1of 5

Elins Journal

Elins International Journal of Science Engineering & Management (EIJSEM), Volume-1, Issue-1, May 2016
_____________________________________________________________________________________________________________________

Analysis of Threshold Optimal Value of Switching Weighted Median Filter For


different Impulse Noise Density levels
Devesh Bhalla1, Juvin Agrawal2
Rustamji Institute of Technology, Tekanpur, Gwalior (Madhya Pradesh), India
deveshbhalla22@gmail.com1, juvinagrawal@gmail.com2

Abstract:- Median filters are widely used to recover corrupted digital images. Standard median filter performs operation
on each and every pixel which results in loss of edges and details of the image and blurred it. To rectify this issue
switching median filter is proposed. Switching median filter first detect the noise and then apply operation only on the
detected noisy pixels, which successfully recover the image without losing edges and details of the image. An important
parameter in noise detection technique is threshold value. Experimentation on threshold value suggests that at higher
impulse noise density lower threshold value gives better Peak signal to noise ratio and image quality and vice versa.
Optimal value comes out from this analysis if applied in switching filter then it greatly improves the filtered outcomes.
Key-Words:- SWMF (switching weighted median filter), SMF (Switching Median Filtering), WM (weighted median), CWM (center
weighted median), PSNR (Peak signal to noise ratio).

I.

INTRODUCTION

Digital images are usually corrupted while transferring


and sharing due to camera sensors or noisy channels [1].
Median filter [1],[2] is used to recover the image and
improves its quality. Standard median filter is effective
in reducing noise but ineffective in preserving edges
because it filters each and every pixel in the image. SMF
(Switching Median Filtering) [1] is proposed for
improving the filtering effect and preserving the edges.
There are two sequential stepsnoise detection and
filtering in this approach [1],[3]. The detector is based
on a priori threshold value [1] to decide if a median filter
is to be applied or not, this filter only replaced corrupted
pixels and does not modify uncorrupted pixels, thus the
precision in impulse detection increases. The objective
of impulse noise removal is to suppress the noise by
preserving the integrity of edges and detail information
for which the non-linear digital filters are used. The
effective removal of impulse noise often leads to images
with blurred and distorted features. Hence the filtering
should be applied only to corrupted pixels while leaving
uncorrupted pixels intact [2].
Nonlinear filters [5] have been widely used because of
their much improved filtering performance, in terms of
impulse noise detection and edge preservation. Various
modifications have been performed to improve standard
median filter such as the WM (weighted median) [6]
filter and the CWM (center weighted median) [7] filter.
Center weighted median filter preserves the edges in
image therefore its concept is included in SMF to create
SWMF (switching weighted median filter) filter.
Threshold value in SWMF performs a major role in
impulse detection. At same threshold value with change
in noise density does not provide good filtering results.
It is seen that threshold values provide good results on
some particular density of noise. Here this analysis is
performed and discussed and named as optimum value
analysis.
Manuscript No. EIJM0516002

SWMF FILTER

II.

Switching median filter uses a threshold value to detect


the noise in the pixel. If the intensity difference between
the center pixel value and median value in the window is
greater than the threshold value then center pixel is
considered as a noisy pixel and replaced by median
value, otherwise center pixel is considered as non-noisy
and remain unchanged [1].
Difference in intensity between the center pixel value
and median value in the window is given by,

| ,
| (1)
where median value in the window
,
(2)

,
Here

is given by

,.

, ,.

is the weight of the center pixels.

Suppose {X} is the noisy image and (2N+1) (2N+1) is


the sliding window size, centered at (i, j). The
adjustment of the center pixel is given by following
equation,
,
,
(3)
, ,
,

is the recoverd image with preserve edges.

QUALITY FACTOR
Peak Signal to Noise Ratio: If
, is the original
image,
, is the corrupted image then PSNR of the
corrupted image is given by following formula [1], [5],

III.

10 log

(4)

Here M and N denotes the resolution of the image.


Resolution of Cameraman image is 256x256 therefore
M=N=256 and Imax is the maximum gray scale level that
is 255 which represents white color.
IV.
Optimum Value Analysis
In SWMF, noise detection is done by using the threshold
comparison technique and its equation is shown in (3),
the value of threshold (T) is set in such a way so that we
get the best PSNR for any amount of noise density. Two
standard gray scale

images, cameraman and castle are used for


experimentation as shown in figure 2 and figure 3
respectively. In Table 1 and Table 2, Threshold values
are varied from 30 to 120 for noise density from 1% to
30% for Cameraman and Castle image respectively.
This tabulated data is analyzed and optimal threshold
values are found and shown in table 3 for different noise
densities and it is plotted in figure 6.

Figure 2: Original Image of Cameraman

Figure 3: Original Image of Castle

Table 1
PSNR values of recovered CAMERAMAN image for multiple values of noise density and threshold value using
DWM filter
Threshold
Percentage of Noise Density
value
1
5
10
15
20
25
30
30
27.67
27.36
26.36
25.55
24.62
23.1
21.58
40
28.31
27.64
26.98
26.05
24.61
23.34
21.56
50
28.5
28.2
27.01
25.91
24.84
23.35
21.88
60
29.1
28.43
27.2
26.07
24.85
23.25
21.82
70
29.43
28.55
27.44
25.8
24.38
23.11
21.73
80
29.77
28.24
26.25
25.14
23.46
22.4
20.72
90
29.81
27.49
25.31
23.53
22.25
20.88
19.47
100
29.55
26.2
23.98
22.16
20.81
19.61
18.46
110
29.4
25.75
23.08
21.37
19.94
18.95
17.84
120
28.86
24.77
22.01
20.22
18.97
17.85
16.9

Table 2
PSNR values of recovered CASTLE image for multiple values of noise density and threshold value using DWM
filter
Threshold
value
30
40
50
60

Manuscript No. EIJM0516002

1
24.77
25.58
26.31
26.98

5
24.53
25.29
25.96
26.04

10
24.01
24.61
25.13
25.23

Percentage of Noise Density


15
20
25
23.62
22.89
21.80
24.06
23.07
22.20
24.25
23.20
22.37
24.40
23.36
22.05

30
20.81
20.74
21.00
20.81

70
80
90
100
110
120

27.51
27.99
28.45
28.29
28.15
27.87

26.39
26.13
25.42
25.05
24.53
24.10

25.43
24.36
23.76
22.59
21.85
21.40

24.05
23.10
22.03
20.98
20.16
19.69

22.83
21.59
20.91
19.86
19.07
18.31

21.62
20.70
19.70
18.82
17.79
17.12

20.41
19.61
18.70
17.75
16.74
16.37

Table 3
Optimum value of threshold for noise density vary
from 1% to 30%
Noise
percentage

10

15

20

25

30

Optimum
value

90

70

70

60

60

50

50

Figure 5: Threshold Vs PSNR plot with varying noise


density for castle image

Figure 4: Threshold Vs PSNR plot with varying noise


density for cameraman image

Figure 6: Optimum threshold value for different


noise density for cameraman & castle image

Table 4
PSNR values of recovered CAMERAMAN image for multiple values of noise density and threshold value using
DWM filter
Noise Percentage
Noisy image
Optimum value
Maximum value

20

Manuscript No. EIJM0516002

25

30

Table 5
PSNR values of recovered CASTLE image for multiple values of noise density and threshold value using DWM
filter
Noise Percentage
Noisy image
Optimum value
Maximum value

20

25

30

PSNR versus Threshold value plot is done is shown in


figure 4 and figure 5 for cameraman and castle images
for noise density from 1% to 30%. Images are shown in
Table 4 and Table 5 for visually analyzed the effect of
threshold value on the quality of image. Images are
shown for 20%, 25% and 30% impulse noise density and
then filtered images are given one at optimum value and
another at maximum value which clearly shows that
image filtered by taking optimum value has much better
quality than images taken at maximum value.

Manuscript No. EIJM0516002

Conclusion
Switching median filters are very efficient in detecting
impulse noise. Optimal value analysis shows the
importance of threshold value in detecting impulse noise
and hence comes out with very impressive result. After
experimentation optimum values of threshold are
deduced for various noise densities. Switching median
filter is tested with optimum value analysis for two
different standard gray scale image and both the images
give same optimum values. If value of threshold is
changed with change in noise density in digital images

V.

then results will be successfully


qualitatively and quantitatively.

improve

both

[4]

[5]

REFERENCES
[1]

[2]

[3]

Wei Wang and Peizhong Lu, An Efficient Switching Median


Filter Based on Local Outlier Factor, IEEE SIGNAL
PROCESSING LETTERS, VOL. 18, NO. 10, OCTOBER 2011.
S.Kalavathy and R.M.Suresh, A Switching Weighted Adaptive
Median Filter for Impulse Noise Removal, International Journal
of Computer Applications (0975 8887) Volume 28 No.9,
August 2011.
Fei Duan and Yu-Jin Zhang, Senior Member, IEEE , A Highly
Effective Impulse Noise Detection Algorithm for Switching
Median Filters, IEEE SIGNAL PROCESSING LETTERS,
VOL. 17, NO. 7, JULY 2010.

Manuscript No. EIJM0516002

[6]

[7]

Research Article: V Jayaraj and D Ebenezer, A New SwitchingBased Median Filtering Scheme and Algorithm for Removal of
High-Density Salt and Pepper Noise in Images, EURASIP
Journal on Advances in Signal Processing 2010.
Xuming Zhang and Youlun Xiong, Impulse Noise Removal
Using Directional Difference Based Noise Detector and Adaptive
Weighted Mean Filter, IEEE SIGNAL PROCESSING
LETTERS, VOL. 16, NO. 4, APRIL 2009.
Pei-Eng Ng and Kai-Kuang Ma, Senior Member, IEEE, A
Switching Median Filter With Boundary Discriminative Noise
Detection for Extremely Corrupted Images, IEEE
TRANSACTIONS ON IMAGE PROCESSING, VOL. 15, NO.
6, JUNE 2006.
Bherooz Ghandeharian, Hadi Sadoghi Yazdi and Faranak
Homayouni, Modified Adaptive Center Weighted Median Filter
for Suppressing Impulsive Noise in Images, International
Journal of Research and Reviews in Applied Sciences, VOL. 1,
NO.3, DECEMBER 2009.

You might also like