[ieee 2011 international conference on multimedia, signal processing and communication technologies...

4
Salt and Pepper Noise Removal in Video using Adaptive Decision Based Median Filter T.Veerakumar 1 S.Esakkirajan 2 and Ila Vennila 3 1 Department of Electronics and Communication Engineering, PSG College of Technology, [email protected] 2 Department of Instrumentation & Control Engineering, PSG College of Technology, [email protected] 3 Department of Electrical and Electronics Engineering PSG College of Technology, [email protected] Abstract—This paper proposes a new algorithm to remove salt and pepper noise in video. The adaptive decision algorithm first checks whether the selected pixel in the video sequence is noisy or noise free. Initially the window size is selected as 3 X 3. If the selected pixel within the window is 0’s or 255’s, and some of other pixels within the window are noise free, then the selected pixel value is replaced by trimmed median value. If the selected pixel is 0 or 255 and other pixel values in a selected window (3 X 3) all are 0’s and 255’s, then change the selected window size as 5 X 5, then the selected pixel value is replaced by trimmed median value. In the selected new window (5 x 5), all the elements are 0’s or 255’s then the processing pixel is replaced by the previous resultant pixel. Finally, the performance of the proposed algorithm is compared with the existing algorithms like Median Filter; Decision Based Filter and Progressive Switched Median Filter. The proposed algorithm gives better PSNR and IEF results than the existing algorithms. I. INTRODUCTION Frequently, digital videos are corrupted by undesirable random variations in intensity values called noise. The presence of noise is due to faulty image sensor, channel noise during the transmission of image and video sequences. The problem of removing image noise is still of acute and in fact growing importance with the prevalence of webcams and mobile phone cameras. The common type of noise is impulse noise, widely known as salt and pepper. This kind of noise randomly changes intensities of some pixels to the maximum or minimum values of the intensity range on the image/video. Several nonlinear filters have been proposed for restoration of images contaminated by salt and pepper noise. Among these standard median filter has been established as reliable method to remove the salt and pepper noise without damaging the edges. However the major drawback of Standard Median Filter (SMF) is that the filter is effective only at low noise densities [1]. When the noise level is over 50% the edge details of the original image will not be preserved by standard median filter. The improvement of standard median filter is Adaptive Median Filter (AMF), which performs well at low noise densities [2]. But at high noise densities the window size has to be increased which may lead to blurring the image [3]. Also these filters will not take into account the local features as a result of which details and edges may not be recovered satisfactorily, especially when the noise level is high. To overcome this drawback, decision based algorithm [4] is proposed in the literature. In this algorithm, size of the sliding window is 3 x 3. If the processing pixel value is 0 or 255 it is processed or else it is left unchanged. At high noise density the median value will be 0 or 255 which is noisy. In such case, neighboring pixel is used for replacement. This repeated replacement of neighboring pixel produces streaking effect [5]. In order to overcome this drawback, we propose a new algorithm called Adaptive Decision Based Median Filter (ADBMF). This proposed method gives better Peak Signal to Noise Ratio (PSNR) and Image Enhancement Factor (IEF) values than the existing algorithms. This paper is organized as follows. Section II provides the basics of decision based algorithm. Section III describes the proposed algorithm. The experimental results are given in section IV. Finally, conclusion is given in Section V. II. DECISION BASED ALGORITHM In most of the existing algorithm including SMF and AMF, only median values are used for the replacement of the corrupted pixels. The decision based algorithm first detects the impulse noise in the image. The corrupted and uncorrupted pixels in the image are detected by checking the pixel element value against the maximum and minimum values in the window selected. The maximum and minimum values that the impulse noise takes will be in the dynamic range (0, 255)[6] [7]. If the pixel being currently processed has a value within the minimum and maximum values in the window of processing, then it is an uncorrupted pixel and no modification is made to that pixel. If the value does not lie within the range, then it is a corrupted pixel and will be replaced by the median pixel value of the neighborhood processed pixels. At high noise density, the decision based algorithm fails to preserve the edge information which leads to blurring of the image. 87 2011 International Conference on Multimedia, Signal Processing and Communication Technologies

Upload: ila

Post on 27-Jan-2017

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: [IEEE 2011 International Conference on Multimedia, Signal Processing and Communication Technologies (IMPACT) - Aligarh, India (2011.12.17-2011.12.19)] 2011 International Conference

Salt and Pepper Noise Removal in Video using Adaptive Decision Based Median Filter

T.Veerakumar1 S.Esakkirajan2 and Ila Vennila3

1 Department of Electronics and Communication Engineering, PSG College of Technology, [email protected] 2 Department of Instrumentation & Control Engineering, PSG College of Technology, [email protected]

3 Department of Electrical and Electronics Engineering PSG College of Technology, [email protected]

Abstract—This paper proposes a new algorithm to remove salt and pepper noise in video. The adaptive decision algorithm first checks whether the selected pixel in the video sequence is noisy or noise free. Initially the window size is selected as 3 X 3. If the selected pixel within the window is 0’s or 255’s, and some of other pixels within the window are noise free, then the selected pixel value is replaced by trimmed median value. If the selected pixel is 0 or 255 and other pixel values in a selected window (3 X 3) all are 0’s and 255’s, then change the selected window size as 5 X 5, then the selected pixel value is replaced by trimmed median value. In the selected new window (5 x 5), all the elements are 0’s or 255’s then the processing pixel is replaced by the previous resultant pixel. Finally, the performance of the proposed algorithm is compared with the existing algorithms like Median Filter; Decision Based Filter and Progressive Switched Median Filter. The proposed algorithm gives better PSNR and IEF results than the existing algorithms.

I. INTRODUCTION Frequently, digital videos are corrupted by undesirable

random variations in intensity values called noise. The presence of noise is due to faulty image sensor, channel noise during the transmission of image and video sequences. The problem of removing image noise is still of acute and in fact growing importance with the prevalence of webcams and mobile phone cameras. The common type of noise is impulse noise, widely known as salt and pepper. This kind of noise randomly changes intensities of some pixels to the maximum or minimum values of the intensity range on the image/video. Several nonlinear filters have been proposed for restoration of images contaminated by salt and pepper noise. Among these standard median filter has been established as reliable method to remove the salt and pepper noise without damaging the edges. However the major drawback of Standard Median Filter (SMF) is that the filter is effective only at low noise densities [1]. When the noise level is over 50% the edge details of the original image will not be preserved by standard median filter.

The improvement of standard median filter is Adaptive Median Filter (AMF), which performs well at low noise

densities [2]. But at high noise densities the window size has to be increased which may lead to blurring the image [3]. Also these filters will not take into account the local features as a result of which details and edges may not be recovered satisfactorily, especially when the noise level is high. To overcome this drawback, decision based algorithm [4] is proposed in the literature. In this algorithm, size of the sliding window is 3 x 3. If the processing pixel value is 0 or 255 it is processed or else it is left unchanged. At high noise density the median value will be 0 or 255 which is noisy. In such case, neighboring pixel is used for replacement. This repeated replacement of neighboring pixel produces streaking effect [5]. In order to overcome this drawback, we propose a new algorithm called Adaptive Decision Based Median Filter (ADBMF). This proposed method gives better Peak Signal to Noise Ratio (PSNR) and Image Enhancement Factor (IEF) values than the existing algorithms.

This paper is organized as follows. Section II provides the basics of decision based algorithm. Section III describes the proposed algorithm. The experimental results are given in section IV. Finally, conclusion is given in Section V.

II. DECISION BASED ALGORITHM In most of the existing algorithm including SMF and

AMF, only median values are used for the replacement of the corrupted pixels. The decision based algorithm first detects the impulse noise in the image. The corrupted and uncorrupted pixels in the image are detected by checking the pixel element value against the maximum and minimum values in the window selected. The maximum and minimum values that the impulse noise takes will be in the dynamic range (0, 255)[6] [7]. If the pixel being currently processed has a value within the minimum and maximum values in the window of processing, then it is an uncorrupted pixel and no modification is made to that pixel. If the value does not lie within the range, then it is a corrupted pixel and will be replaced by the median pixel value of the neighborhood processed pixels. At high noise density, the decision based algorithm fails to preserve the edge information which leads to blurring of the image.

87

2011 International Conference on Multimedia, Signal Processing and Communication Technologies

Samar
Text Box
978-1-4577-1107-7/11/$26.00 ©2011 IEEE
Page 2: [IEEE 2011 International Conference on Multimedia, Signal Processing and Communication Technologies (IMPACT) - Aligarh, India (2011.12.17-2011.12.19)] 2011 International Conference

Hence, we have to go for the adaptive decision based algorithm to remove the above mentioned drawback.

III. ADAPTIVE DECISION BASED MEDIAN FILTER The proposed adaptive decision based median filter

(ADBMF) processes the corrupted videos by first detecting the impulse noise. The processing pixel is checked whether it is corrupted or uncorrupted. That is, if the processing pixel lies between maximum and minimum gray level values then it is uncorrupted pixel, then no modification is made to that pixel. If the processing pixel takes the maximum or minimum gray level then it is corrupted pixel which is processed by ADBMF. The steps of the ADBMF are given below.

A. ADBMF Algorithm Step 1: Extract the frame in the noisy video.

Step 2: Select 2-D window of size 3 x 3. Assume that the pixel being processed is Pij.

Step 3: If 2550 << ijP then Pij is an uncorrupted pixel and its value is left unchanged.

Step 4: If Pij is zero or Pij is 255 then Pij is a noisy pixel then two cases are possible.

Step 4a: If the selected window contains not all the elements as 0 or 255. Then eliminate the 0 and 255 in the selected window. Replace Pij with the median value of the remaining elements. Go to step 5, else continue.

Step 4b: If the selected window contains all the elements as 0 or 255. Then select the new window size as 5 X 5.

Step 4c: If the selected window contains not all the elements are 0 or 255. Then eliminate the 0 and 255 in the selected new window. Replace Pij with the median value of the remaining elements.

Step 4d: If the selected window contains all the elements are 0 or 255. Then, replace the Pij by Pi-1,j-1.

Step 5: Repeat steps 3 to 4 until all the pixels in the entire image are processed.

Step 6: Repeat steps 2 to 5 until all the frames in the entire video are processed.

B. Pseudocode for ADBMF Algorithm The pseudocode for the proposed algorithm is:

Input Video Vin Number of Frame N 0 Out for i = 1 to N Frame(i) Vin(i) Sizeof(Frame(i)) [m n] for j = 1 to m for k = 1 to n if Frame(i)(j,k)>0&Frame(i)(j,k) < 255 Frame(i)(j,k) Out(i)(j,k) else % Select 3 X 3 Neighborhood pixels Frame(i)(3 X 3) Win

if All Values in Win == 0 | All Values in Win == 255 % Select 5 X 5 Neighborhood pixels Frame(i)(5 X 5) WinNew if All Values in WinNew == 0 | All Values in WinNew == 255 Out(i)(j-1,k-1) Out(i)(j,k) else Remove 255 and 0 in Win WinTrim Median(WinTrim) Out(i)(j,k) end end end

end end

IV. SIMULATION RESULTS The performance of the proposed algorithm is tested against Trevor video sequence with 150 numbers of frames. The noise density is varied from 10 to 90%. The performance of the denoising video is quantitatively measured by the average PSNR and average IEF. The average Peak Signal to Noise Ratio (PSNR) is given by

Average PSNR in dB = N

MSElog ⎟

⎟⎠

⎞⎜⎜⎝

⎛ 2

1025510

(1)

where MSE = nm

))j,i(X̂)j,i(X(i j

×

−∑∑ 2

, m x n is the size

of frame, N is the total number of frames in a video. X represents the original frame and X̂ is the denoised frame. MSE stands for Mean Square Error.

TABLE I. PSNR RESULTS OF PROPOSED AND EXISTING ALGORITHMS FOR TREVOR VIDEO

Noise Density

in %

Average PSNR in dB

MF AMF DBA MDBA PSMF ADBMF

10 26.79 24.01 27.16 27.16 27.46 30.62

20 24.90 24.20 26.77 26.77 25.94 29.46

30 21.65 24.24 26.22 26.23 24.18 28.49

40 17.94 23.75 25.49 25.51 22.01 27.52

50 14.63 21.55 24.58 24.58 19.17 26.50

60 11.88 18.66 23.39 23.42 13.25 25.34

70 9.64 14.82 21.91 21.95 10.28 23.86

80 7.82 11.12 20.07 20.04 7.77 21.78

90 6.34 7.88 17.46 17.21 6.32 18.68

88

2011 International Conference on Multimedia, Signal Processing and Communication Technologies

Page 3: [IEEE 2011 International Conference on Multimedia, Signal Processing and Communication Technologies (IMPACT) - Aligarh, India (2011.12.17-2011.12.19)] 2011 International Conference

The Image Enhancement Factor (IEF) is calculated by

Average IEF ∑∑∑∑

=

i j

i j

))j,i(X)j,i(X̂(

))j,i(X)j,i((

N 2

2

(2)

where η is the noisy frame. N is the total number of frames in a video.

TABLE II. IEF RESULTS OF PROPOSED AND EXISTING ALGORITHMS FOR TREVOR VIDEO

Noise Density

in %

Average IEF

MF AMF DBA MDBA PSMF ADBMF

10 14.93 8.65 16.29 16.29 17.43 37.26

20 19.59 18.33 29.92 29.94 24.79 56.87

30 13.79 27.88 39.74 39.84 25.01 68.15

40 7.71 32.55 45.25 45.29 20.11 73.51

50 4.49 25.78 45.76 46.04 13.14 72.96

60 2.86 13.85 42.38 42.63 4.62 67.82

70 1.99 6.56 35.34 35.57 2.47 57.00

80 1.49 3.19 26.63 26.22 1.48 40.82

90 1.20 1.70 16.48 15.30 1.19 22.23

(a) PSNR

(b) IEF

Figure 1. Performance graph of proposed and existing algorithms for Trevor video

The PSNR and IEF values of the proposed algorithm are compared against the existing algorithms by varying the noise density form 10 to 90% and are shown in table I and II. From the tables I and II, it is observed that the proposed algorithm is better than the existing algorithms both at low and high noise densities.

A plot of PSNR and IEF against noise densities for Trevor video is shown in figure 1. From the figure, it is obvious that the proposed algorithm is better than the existing algorithms in terms of PSNR and IEF at both low and high noise densities.

(a) Original Frame (b) Noisy Frame

(c) Denoised Frame by MF (d) Denoised Frame by AMF

(e) Denoised Frame by DBA (f) Denoised Frame by MDBA

(g) Denoised Frame by PSMF (h) Denoised Frame by Proposed

Figure 2. Original, Noisy and Denoised 10th frame of Trevor video

The original, noisy, and denoised frame of different algorithms of 10th frame of Trevor video is shown in figure 2. The noise density is chosen as 50%. From the figure, it is

89

2011 International Conference on Multimedia, Signal Processing and Communication Technologies

Page 4: [IEEE 2011 International Conference on Multimedia, Signal Processing and Communication Technologies (IMPACT) - Aligarh, India (2011.12.17-2011.12.19)] 2011 International Conference

possible to observe that the quality of the denoised frame using proposed algorithm is better than the existing algorithm.

(a) Original Frame (b) Noisy Frame

(c) Denoised Frame by MF (d) Denoised Frame by AMF

(e) Denoised Frame by DBA (f) Denoised Frame by MDBA

(g) Denoised Frame by PSMF (h) Denoised Frame by Proposed

Figure 3. Original, Noisy and Denoised 5th frame of Akiyo video

The proposed algorithm tested against the Akiyo video with the noise density as 45%. The results of the proposed and existing algorithms are shown in figure 3. From the figure, it

is clear that the visual quality of denoised frame using the proposed algorithm is better than the existing algorithms.

V. CONCLUSION In this paper, an adaptive decision based median filter is

proposed which gives better results in comparison with MF, AMF, DBA and other existing algorithms in terms of average PSNR and average IEF. The performance of the algorithm has been tested at low, medium and high noise densities on Trevor and Akiyo video sequences. Even at high noise density the proposed algorithm outperforms the existing algorithms. The proposed algorithm is effective for salt and pepper noise removal in videos at different noise densities.

ACKNOWLEDGEMENT The authors wish to thank the management and principal

of PSG College of Technology for their encouragement. They also like to thank the anonymous reviewers of this paper.

REFERENCES [1] J. Astola and P. Kuosmaneen, Fundamentals of Nonlinear Digital

Filtering.Boca Raton, FL: CRC, 1997. [2] H. Hwang and R. A. Hadded, “Adaptive median filter: New algorithms

and results,” IEEE Trans. Image Process., vol. 4, no. 4, pp. 499–502, April 1995.

[3] S. Esakkirajan, T.Veerakumar, A. 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, pp. 287-290, May 2011.

[4] K. S. Srinivasan and D. Ebenezer, “A new fast and efficient decision based algorithm for removal of high density impulse noise,” IEEE Signal Process. Lett., vol. 14, no. 3, pp. 189–192, Mar. 2007.

[5] V. Jayaraj and D. Ebenezer, “A new switching-based median filtering scheme and algorithmfor removal of high-density salt and pepper noise in image,” EURASIP J. Adv. Signal Process., vol. 2010, pp.1-11, June 2010.

[6] R. H. Chan, Chung-Wa Ho and M. Nikolova, “Salt and Pepper Noise Removal by Median Type Noise Detectors and Detail –Preserving Regularization,” IEEE Transactions on Image Processing, vol. 14, No.10, pp. 1479-1485, October 2005.

[7] M.S. Nair. K. Revathy and R. Tatavarti, “ Removal of Salt and Pepper Noise in Images: A new Decision Based Agorithm”, Proceedings of the International MultiConference of Engineers and Computer Scientists 2008 Vol I, IMECS 2008, 19-21, Hong Kong, March 2008.

90

2011 International Conference on Multimedia, Signal Processing and Communication Technologies