26.high Density Salt Pepper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

A New Algorithm for Removal of High-density Salt and Pepper Noises

Wei Li, Yanxia Sun, Shengjian Chen


Dept. of Computer Science, North China Electric Power University, Beijing, China {liwei, yxsun, sjchen}@ncepu.edu.cn

AbstractTo improve the performance of high-density salt and pepper noise denoising, a new detail preserving median filter algorithm is proposed in this paper. The method replaces only corrupted pixels by either the trimmed median or the average of previously processed neighborhood pixels, while uncorrupted pixels remain unchanged. Experimental results clearly show that the proposed algorithm outperforms many of the existing methods in terms of visual quality and quantitative measures. The advantage of the proposed method is that it works well for high-density salt & pepper noise even up to a noise density of 90%. Keywords-salt & pepper; detail preserving; median; highdensity; denoising

difficulty in restoring highly corrupted images. In [5], Progressive Switching Median Filter (PSMF) deals highly corrupted environments through numerous impulse detective iterations that bring down the computational efficiency. Moreover, it needs empirical parameters. The decision-based algorithm (DBA) [7] for removal of high-density impulse noise shows consistent and stable performance across a wide range of noise densities varying from 10% to 80%, but fails to keep edge information and leads to image blurring when the noise density is up to 90%. In this paper, a new detail-preserving median filter algorithm (DPMF) is proposed which removes the salt & pepper noise from images corrupted at a high impulse noise ratio in a better way than other filers. It can keep the fine details of the image intact without affecting the uncorrupted pixels and provide patches-free restoration. The paper is organized as follows. Section 2 describes the proposed DPMF and the experimental results are reported in Section 3. Finally, Section 4 concludes the paper. II. The Proposed Algorithm

I.

Introduction

Images often get corrupted by impulse noise during the acquisition or transmission. An important type of impulsive noise is salt & pepper noise. In salt & pepper corrupted images, noisy pixels take either maximum or minimum value degrading the image quality. Removal of salt & pepper is an important pre-processing step because it can influence the subsequent phases in image processing such as segmentation, edge detection and recognition. Many approaches have been proposed to remove salt & pepper noise. Of all the filters reported in image restoration domain, the median filters are the most prominent non-linear rank ordered filters that provide excellent results due to their computational efficiency and simplicity, like weighted median filter [1] , center weighted median filter [2] and recursive weighted median filter [3]. Though very effective in removing impulse noise, median filters are prone to modify uncorrupted pixels leading to loss of finer image detail. For this reason, several variants of the median filter algorithms [4-10] came up with the aim of correcting only those corrupted pixels, leaving the uncorrupted pixels unchanged. For example, the Adaptive Median Filter (AMF) in [9] with adaptive window size can grasp more detail information for removing the noisy pixels and present better results. An alpha-trimmed meanbased method (ATMBM) is presented in [4], which uses the alpha-trimmed mean in impulse detection and replaces the noisy pixel by a linear combination of its original value and the median of its local window. Many of these algorithms have got excellent performances at common images but find

Generally, not all the maximum and minimum are noise. In fact, some of them are edge pixels or thin lines. Similar to other salt & pepper detection algorithms, our impulse filter is aided by prior information on natural images, i.e., a noise-free image should be locally smoothly varying and separated by edges. Only salt-pepper impulsive noise is considered in this detection algorithm, which has twofold meanings: 1) only a portion of image pixels are corrupted while others are noisefree and 2) a noise pixel takes either a very large value as a positive impulse or a very small value as a negative impulse. In addition, we consider the correlativity between the central pixel and its adjacent pixels. For natural images, there is strong spatial correlation between the neighbored pixels. As a result, one pixel has near gray value with its neighboring pixels. If it is much larger or smaller than its neighboring pixels, it may be corrupted, otherwise, it is uncorrupted. Therefore, we can distinguish noise pixels from signal pixels by a threshold value. In the proposed algorithm, the median in the window after removing the maximum and minimum, denoted as Pmed, is definitely an uncorrupted pixel in salt & pepper corrupted image. From the above analysis, the

978-1-4244-4131-0/09/$25.00 2009 IEEE

difference between Pmed and current pixel values p(i,j) is small when p(i,j) is noise-free, and vice versa. In our algorithm we can decide whether p(i,j) is signal pixels by a small threshold value (Tc). The salt & pepper impulses corrupted pixel will tend to be a maximum or a minimum of any local window. Hence, the central pixel p(i,j) of the current window can be declared valid if its signal content is strictly between the maximum and minimum signal values of its local window. The uncorrupted pixel value p(i,j) itself can also take on these extreme values. For this reason, we can not simply declare an impulse of noise present when p(i,j) takes maximum or minimum in the current window. By checking whether | p(i,j)-Pmed | is lower than the threshold Tc or not, we can decide p(i,j) to be an uncorrupted high frequency signal or an impulse, where the threshold Tc is used to reduce mistake examining rate. The corrupted noisy pixel is restored by a median value chosen from the uncorrupted signals of the smallest possible local window which maintains image fidelity. If such signals are absent in the current window, it will be replaced by the average of its previous processed neighboring pixels. In the proposed algorithm, represents a set of spatial positions centered around the pixel at position p(i,j) with a window of size WW, where W is an odd integer not smaller than 3. The filtering technique can be tracked by the following pseudo codes.
Step 1: Intialize W ; = ; Step 2 : Let = {( x, y) | i - (W -1) x i + (W -1), j - (W -1) y j + (W -1)} Pmin = min{} and Pmax = max{} D1 = P(i, j ) Pmin ; D2 = P (i, j ) Pmax ; if D1 > 0 and D2 < 0 then y (i, j ) = P (i, j ) else if { Pmed = median( ); if | Pmed xi |< Tc y (i, j ) = P (i, j ) GO TO Step 3; else y (i, j ) = median( ) GO TO Step 3 ; } y (i, j ) = ( y(i 1, j 1) + y(i 1, j ) + y (i 1, j + 1) + y (i, j 1)) / 4; } Step 3 : Move to Next Pixel and Do Steps 1 to 2. GO TO Step 3;

III.

Experimental Results

The performance of the proposed algorithm is tested against Adaptive Median Filter (AMF) [9], Decision-based Algorithm (DBA) [7] and Progressive Switching Median Filter (PSMF) [5]. The experimental dataset consists of some standard images, i.e., Lena, Boats, Pepper and Cameraman, of which Lena and Boat are used here for analysis. The noise levels are varied from 10% to 90% with increments of 10%. Restoration performances are quantitatively measured by peak signal-to-noise ratio (PSNR) and the Mean Absolute Error (MAE) values. The PSNR is

PSNR = 10log10

(255) 2 MSE

(1)

where MSE (Mean Square Error) is defined as (rij xij ) 2 ij MSE = M N

(2)

The Mean Absolute Error (MAE) of the restored image from original image is given by MAE =

| r
ij

ij

xij |

(3)

M N

In (2) and (3), rij denotes the pixel value of the noise-free original image R of size MN and xij is the pixel value of the final restored image X. Best restoration results can be gotten when Tc is set to 10 and W is set to 3 in DPMF. The parameters in PSMF are set according to the paper [3], which leads to the best restoration results. The PSNR and MAE are calculated for the DPMF, and a comparison of performance with AMF, DBA, and PSMF are shown in Table 1 and Table 2. The results show that at higher noise levels, PSNR values of AMF, DBA, PSMF are lower than that of DPMF. For qualitative analysis, performances of the filters are tested at different levels of noise densities. Fig.1 to Fig.4 illustrates the results. Fig.1 and Fig.2 show the restored results of Lena and Boat images corrupted at 90% salt & pepper noise by various filters. The visual quality results of the proposed filter (DPMF) in Fig.1 and Fig.2 clearly show that the noise is removed mostly and details are better preserved than other filters. Based on the test results performed on the Lena.png image and the data list in Table 1. Fig.3 and Fig.4 show that DPMF provide better PSNR and lower MAE compared with AMF, DBA and PSMF for various values of noise density. Table 2 displays similar results on the Boat.png image.

{ = {z / P (i, j ) Pmin > 0, P (i, j ) Pmax < 0 and ( x, y ) }

Table 1. PSNR, MAE of various filters for lena.png image at different noise densities Noise density 10% 20% 30% 40% 50% 60% 70% 80% 90% PSNR
AMF DBA PSMF DPMF AMF DBA

MAE
PSMF DPMF

38.1756 35.9044 33.8722 31.9158 30.3444 28.5645 26.7704 24.8227 19.3557

41.6008 37.5213 34.7532 32.2955 30.2723 27.9477 25.5526 23.0723 19.751

35.7124 31.5767 27.9894 24.6979 21.5247 23.2599 18.9913 10,5619 7.57644

35.7671 36.2589 35.7035 34.2164 32.9932 31.4285 29.7656 27.7114 24.5473

0.9600 1.2805 1.7401 2.3507 3.0589 3.9878 5.1422 6.7810 12.0960

0.4013 0.8788 1.4225 2.1068 2.9150 4.0327 5.5647 7.9212 13.0409

0.7872 1.4148 2.2965 3.7506 6.5798 6.5065 11.5614 44.8115 81.6651

0.8456 1.0858 1.4138 1.8540 2.3408 2.9906 3.7835 4.9307 7.3198

Table 2. PSNR, MAE of various filters for boat.png image at different noise densities Noise density 10% 20% 30% 40% 50% 60% 70% 80% 90% PSNR
AMF DBA PSMF DPMF AMF DBA

MAE
PSMF DPMF

34.0066 32.0977 30.2158 28.5868 27.1787 25.7116 24.1778 22.563 18.5127

37.3865 33.6463 31.1521 29.0033 27.1557 25.4191 23.4709 21.2432 18.6934

31.3849 28.5624 26.0343 23.2564 20.9396 22.2264 18.5487 10.5231 7.67509

34.1357 33.1324 31.8628 30.555 29.3023 27.97 26.6951 25.0871 22.4235

1.5533 2.0084 2.6919 3.5563 4.5377 5.8349 7.4619 9.5747 15.1868

0.6902 1.4106 2.2444 3.2467 4.3806 5.9261 7.9736 11.0232 16.3783

1.6904 2.5494 3.7774 5.6502 8.1581 8.3142 13.6919 45.7601 80.9382

1.4933 1.8301 2.3241 2.9413 3.6799 4.6151 5.7300 7.2927 10.3226

(a)Original image

(b)Noisy image

(c) AMF

(d)DBA

(e)PSMF

(f)DPMF

Fig.1. Restoration results of different filter. (a) Original image (b) Corrupted Lena image with 90% salt & pepper noise (c) Output for AMF (d) Output for DBA (e) Output for PSMF (f) Output for DPMF.

(a)Original image

(b)Noisy image

(c) AMF

(d)DBA

(e)PSMF

(f)DPMF

Fig.2. Restoration results of different filter. (a) Original image (b) Corrupted Boat image with 90% salt & pepper noise (c) Output for AMF (d) Output for DBA (e) Output for PSMF (f) Output for DPMF.

[4]

Fig.3. Noise density versus PSNR for Lena.png

W. Luo, An efficient detail-preserving approach for removing impulse noise in images, IEEE Signal Process. Lett., vol. 13, no. 7, Jul. 2006, pp. 413-416. [5] 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, 1999, pp. 78-80. [6] R. H. Chan, C.W. 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, Oct. 2005, pp. 1479-1485. [7] K.S.Srinivasan and D.Ebenezer, A new fast and efficient decision-based algorithm for removal of high-density impulse noises, IEEE Signal Process. Lett, vol. 14, no. 3, Mar 2007, pp. 189-192. [8] W. Ping, L. Junli, L. Dongming, and C. Gang, A fast and reliable switching median filter for highly corrupted images by impulse noise, In: Proc. of IEEE International Symposium on Circuits and Systems, New Orleans, USA, May 2007, pp. 3427-3430. [9] Pei-Eng Ng and K.K.Ma, A Switching Median Filter with Boundary Discriminative Noise Detection for Extremely corrupted Images, IEEE Transactions on Image Processing, vol. 15, No. 6, June 2006, pp. 1506-1516. [10] Pei-Yin Chen, Chih-Yuan Lien, An Efficient Edge-Preserving Algorithm for Removal of Salt-and-Pepper Noise, IEEE Signal Processing Letters, vol. 15, 2008, pp. 833836.

Fig.4. Noise density versus MAE for Lena.png

IV.

Conclusion

A new nonlinear algorithm called as detail-preserving median filter algorithm is presented in this paper. The method replaces only corrupted pixels by either the trimmed median or the average of previously processed neighborhood pixels, while uncorrupted pixels remain unchanged. The performance of the proposed filter is verified with different salt & pepper noise ratio ranging from 10% to 90%. It gives an acceptable restoration of images at higher noise levels while most other median filters make the restored image difficult to recognize. The visual quality and quantitative results clearly indicate that the proposed filter performs much better than recently proposed filters in terms of noise removal and details preservation. In the future, adaptive weighting method can be used in the processing window to get better results. Moreover, how to reduce the computational efforts is another work direction. References
[1] [2] J. Astola and P. Kuosmanen, Fundamentals of Nonlinear Digital Filtering.Boca Raton, FL: CRC,1997. T. Song, M. Gabbouj, and Y. Neuvo, Center Weighted Median Filters: Some Properties and Applications in Image Processing, Signal Processing, Vol. 35, No. 3, 1994, pp. 213-229. Gonzalo R.Arce and Jose L. Paredes, Recursive Weighted Median Filters Admitting Negative Weights and Their Optimization, IEEE Trans. on Signal Proccessing, Vol. 48, No. 3, Mar.2000, pp. 768-779.

[3]

You might also like