Dip1 BP

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

International Conference on Intelligent Control and Information Processing August 13-15, 2010 - Dalian, China

Application of Modified Adaptive Median Filter for Impulse Noise


Chenguang Yan and Yujing Liu

AbstractIn this paper, basing on the statistical features of the image, we propose a modified adaptive median filter (MAMF) for removal of impulse noise, especially for the high-density impulse noises. To avoid the shortcoming of the adaptive median filter (AMF) and the adaptive threshold median filter (ATMF), this method has been designed by combining the AMF with the Decision-Based Algorithm (DBA). From the result, the MAMF method is superior to the conventional methods in the impulse noise, especially for the intermediate-density and high-density noise, providing a quite stable performance over a wide variety of density of noise. Meanwhile, the downward tendency of the PNSR value of MAMF is gentler, with the higher quality than the DBA and the AMF.

II. MODIFIED ADAPTIVE MEDIAN FILTER A. Adaptive Filter (AF) Adaptive signal processing is the study of the variable or adjustable system. Its performance of signal processing can be improved through its own contacts with the external environ-ment. Always the time-varying non-linear system will auto-matically adapt to the environment and requirements, without details of the signal structure and precise design of system. Comparing with the normal filter, the adaptive filter adjusts the present parameter automatically using the previous parameter without any priori knowledge of signal and noise conditions. The general principles of adaptive filter algorithm could be described like this:

BVIOSLY, it is impossible that there is no noise in the image. So it is important to eliminate the noise before the further process. We can first apply the median filter (MF) to the corrupted image. The median filter is by far the most useful order-statistic filter [1]. Nevertheless, to ones disappointment is removing fine details tendency for MF. More important, the MFs result depends on the filter window size and the number of involved pixels. To eliminate this drawback, a famous modified median filter, the adaptive median filter (AMF), has been proposed [2]. The alterable window size with preserving sharpness is very important. Thus the edge and detail information becomes better. The median filter has also other effective improved application [3-5]. But all the methods above are inflexible at removing noise, and hardly adapted themselves to the varied images. To avoid this, the adaptive threshold median filter (ATMF) has been proposed [6]. But this application gives the method without regarding the images statistical features. Actually, the noise can be descript as stochastic processes in mathematics. In this paper, basing the images statistical fea-tures, such as the local mean and local variance, we propose a decision-based, signal- adaptive median filter. This method is denoted by modified adaptive threshold median filter (MATMF). It achieves both the strong detection of impulse noise and the highly quality for the restoration results.

I. INTRODUCTION

(k ) = d (k ) y (k ) y (k ) = Filter[ x(k ), w(k )] W (k + 1) = w(k ) + (k ) x(k )

(1)

Where x(k ) is the input signal, y (k ) is the output signal, d (k ) is the expectation signal, (k ) is the error signal. Some important adaptive filters are as follows: Recursive least squares filter (RLS), Least mean squares filter (LMS), Lattice filter, Infinite impulse response filter (IIR). B. Adaptive Median Filter (AMF) Let S x , y is the filter window corresponding the central pixel ( x, y ) . With the following definition: Z min : minimum gray level value in S x , y
Z max : maximum gray level value in S x , y Z med : median of gray level in S x , y

Z xy : gray level at coordinates (x, y)


S max : maximum allowed size of S x , y

The adaptive median filtering algorithm works in two levels. We can denote it by level A and level B as follow: Level A: Z A = Z med Z min , Z A = Z max Z med
1

Manuscript received June 1, 2010. This work was supported in part by the the National Natural Science Foundation of China (CNSF10971049). Chenguang Yan is with the college of Science, Hebei University of Science and Technology, Shijiazhuang 050018, and with the college of Mathematics and Information Science, Hebei Normal University, Shijiaz-huang 050016, China(e-mail: ycgvbst@163.com) Yujing Liu is with the college of Science, Hebei University of Science and Technology, Shijiazhuang 050018, China (e-mail:liuyujing @hebust.edu.cn)..

If Z A 1 > 0 and Z A < 0 , go to level B; or else, increase 1 the window size. If window size S max , repeat level A; or else, output Z x , y . Level B : Z B1 = Z x , y Z min , Z B2 = Z max Z x , y If Z B1 > 0 and Z B < 0 , output Z x , y ; Or else, out2

978-1-4244-7050-1/10/$26.00 c 2010 IEEE

15

put Z med . Level A was able to evaluate whether Z med a pulse is, Level B was able to evaluate whether Z x , y a pulse is. If both

In brief, if the corresponding (i, j ) of pixel (i, j) is more than the threshold M, then regard present pixel (i, j) as noise, otherwise, take the pixel (i, j) as uncorrupted. D. Decision-Based Algorithm for High-Density Impulse Noises In [8], Srinivasan and Ebenezer give a new decision-based algorithm for the high-density impulse noises. Their algorithm, unlike other nonlinear filters, removes only corrupted pixel by the median value or by its neighboring pixel value. In the algorithm, for any pixel (i, j), consider the 33 windows with the pixel (i, j) in its center. First sorting the 9 pixel in the widows, denote the result by vector S. Decision of the noise depends on the position of the present pixel (i, j) in the vector S. If the pixel (i, j) is corrupted, then there are two cases: If the vector S is in the normal order, then the present pixel (i, j) is a corrupted normal pixel. So, the pixel (i, j) is replaced by the fifth value of vector S, that is S (5). If the vector S is in the non-normal order, then the present pixel (i, j) is a noise pixel. So, the pixel (i, j) is replaced by the value of neighboring pixel value. Or else, left the present pixel (i, j) unchanged. As a result of this, the proposed method removes the noise effectively even at noise level as high as 90% and preserves the edges without any loss up to 80% of noise level. According the results, the DBAs effect is significant. However, the restoration is slanted toward the bright region in the bright. So the DBAs algorithm has its shortcoming in the restoration of the dark details. E. Modified Adaptive Median Filter (MAMF) Avoiding the shortcomings of the DBA and the ATMF, we propose a modified algorithm to deal with impulse noise, especially for the high-density impulse noises. The algorithm absorbs both the merit of the DBA and the MAF, and so does the ATMF. The steps of designing are: 1) modifying the value of the threshold M. Firstly, modifying the method generating vector b. We consider the 33 windows instead of 55 windows, changing (i, j ) as follow, (i, j ) = [b(2) + b(3) + b(4)] 3 (6) So we change the matrix similarly. Then we sort the gray value instead of the absolute value of the difference of the pixels. Although we have the same equation as (2) and (3) above, the parameter and has changed, and so on the M = + . 2) enhancing the capability of decision on the noise. If (i, j ) > M , the pixel (i, j) is noise, replace the present pixel by the mean value of the 33 windows. Or else, according the following weight matrix, replace the present pixel by the result of the 33 median filter. 3) improving the final effect of the restoration. After step 1) and step 2), the effect of the restoration is not good as expected. So we apply the weighting matrix to the effect of above, especially to the effect of the DBA and its of

Z med and Z x , y are not pulse, to avoid the unnecessary losses


of the details, the algorithm outputs the value Z x , y to replace the median value of the filter window. In general, the normal median filter has a serious limitation in the processing of the impulse noise with the highly density. To improve this, the AMF give the method that changing its maximum size S max . C. Adaptive Threshold Median Filter (ATMF) To both linear filter and non-linear filter, the decision of the noise depends on the threshold M. If the difference between the central pixel and surrounding pixels is more than M, then the current pixel is noise. But for the whole image, the same artificial threshold M can cause an error in the decision. If the threshold M is produce by each image itself, moreover, if the threshold M can change itself according the image, the filter will more precise. So the filters performance will more perfect. 1) the value of the threshold M. For any pixel (i, j) in the image, consider the 55 windows with the pixel (i, j) in its center. According the order of the rows and columns in the matrix, we denote the center pixel by the pixel 13. Thus, for the 24 pixels surrounding the center pixel, these are pixel 1, pixel 2,,pixel 12, pixel 14, pixel 15,pixel 24, pixel 25. We can obtain the difference between the pixel 13 and the each pixel of the other 24 pixels. Taking absolute value of above results and sorting them, we denote it by a vector b. Define: (i, j ) = [b(4) + b(5) + b(6) + b(7)] 4 (2) Where b(4) is the fourth element in the vector b, for the same reason, b(7) is the seventh element in the vector b. As a result, for each pixel (i, j), there is (i, j ) . So we have a matrix . Evidently, the matrix has the same scale with the image. We assume that the scale of the image is M N . Define:

= (i, j ) M N
i =1 j =1
N

(3)

[(i, j ) ]
M i =1 j =1

M N

(4)

Basing the statistical feature, we define the threshold M as follows:

M = +

(5)

2) the decision of the noise. The procession of decision is as follow: If (i, j ) > M , the pixel (i, j) is noise, then take the 33 median filter, replace the present pixel by the result. Or else, the pixel (i, j) is uncorrupted, output the gray of pixel (i, j).

16

the AMF. III. EXPERIMENTAL RESULTS AND ANALYSIS The chosen images are as follow: the standard 8-bit 272256 Blood image and the 8-bit 512512 Lena image. The noise considered in this work is bipolar impulse noise and its density from 55% to 90%, with the equidistant interval 5%. Adding the impulse noise to the original image first, we apply several filters to the corrupted images. The result is shown in the Fig.1 and Fig.2.

and Fig.2, especially for the preserving of the darkness details.

Fig.2. Comparative restoration results of image Blood. From left to right, the first columns is the corrupted image Lena, from the second to the fifth one is the effect of the filter of AMF,DBA,ATMF and the MAMF respectively. From the first row to the last row, the density of the noise is 55%,60%,65%,70% ,75%,80%,85%,90% respectively.

Fig.1. Comparative restoration results of image Lena.From left to right, the first columns is the corrupted image Lena, from the second to the fifth one is the effect of the filter of AMF,DBA,ATMF and the MAMF respectively. From the first row to the last row, the density of the noise is 55%,60%,65%,70%,75%,80%,85%,90% respectively.

Roughly speaking, with the density of the noise increasing, the entire filters effect debases. We can see the effect of DBA and MAMF is as the same quality and the same brightness. The filter AMF is better than the filter ATMF. And the filter ATMF is the worst one. When noise density is less than 75%, the effect of AMF is better than DBA and MAMF. As soon as the density is increasing continuous, the effect of AMF is become terrible obviously. Furthermore, in the case of noise density less than 75%, the effect of MAMF is better than the DBA, as shown in the Fig.1

Beyond this, we have found that the brightness of AMF is lowest; the brightness of the DBA and the MAMF is almost equal. The change of the brightness of the ATMF appeared to have been: highlow. Theoretically the ATMFs effects will better than the AMFs and DBAs. But the facts run counter to the theory. There are three reasons: computing of the absolute value of some pixels, taking certain edge pixels for the noise, choosing of the threshold M. Of course, all those shortcoming of the ATMF is born with its algorithm. Unfortunately, these entire shortcomings cannot be eliminated, but be weakened. For performance measurements, we use the mean square error (MSE) and the peak signal-to-noise ratio (PSNR) defined as

MSE = ( I (i, j ) I (i, j )) 2


i =1 j =1

(M N )

(7)

17

PSNR = 10 log10 ( M N 2552

curve.
2

( I (i, j ) I(i, j ))
i =1 j =1

(8)

Where I (i, j ) is the original image, I (i, j ) is the image processed by the filter, the size of the image is M N .
TABLE I RESTORATION RESULTS PSNR OF IMAGE LENA Filter Method Noise density AMF DBA ATMF MAMF 55% 58.8129 52.5549 59.8152 62.0387 60% 58.366 52.3736 59.3212 60.5221 65% 57.9021 52.1625 58.8101 59.2457 70% 58.1595 57.4991 52.0154 58.3809 75% 57.1541 57.0062 51.8066 57.8351 80% 56.2305 56.4835 51.6279 57.287 85% 55.5042 55.9938 51.4742 56.8073 90% 54.8104 55.4042 51.3219 56.2523 TABLE II RESTORATION RESULTS PSNR OF IMAGE BLOOD Filter Method Noise density AMF DBA ATMF MAMF 55% 59.0692 52.5928 60.0527 61.7348 60% 58.5585 52.3541 59.5013 60.3714 65% 58.1014 52.2435 59.0165 59.1333 70% 57.8216 57.5769 52.0048 58.4225 75% 57.0445 57.2348 51.926 58.0736 80% 56.1847 56.7299 51.7352 57.5279 85% 55.3636 56.2051 51.6368 57.0308 90% 54.6809 55.5715 51.4514 56.4281 TABLE III RESTORATION RESULTS MSE OF IMAGE LENA Filter Method Noise density AMF DBA ATMF MAMF 55% 21.773 85.1929 17.2936 10.3452 60% 24.1325 87.6957 19.3745 14.6783 65% 26.8546 90.9242 21.7949 19.699 70% 25.3029 29.4662 93.0972 24.059 75% 31.8996 33.0084 96.1923 27.2803 80% 39.4652 37.2315 98.9675 30.9506 85% 46.6531 41.678 101.443 34.5656 90% 54.74 47.7409 103.824 39.2798 TABLE IV RESTORATION RESULTS MSE OF IMAGE BLOOD Filter Method AMF DBA ATMF MAMF 20.5024 84.3824 16.3465 11.083 23.061 87.9332 18.5622 15.1778 25.6224 89.4132 20.7571 20.1933 27.3241 28.9124 92.684 23.8005 32.6815 31.2827 93.7088 25.7927 39.8426 35.1414 96.4275 29.2502 48.1436 39.6576 97.7314 32.7981 56.3428 45.8904 100.513 37.6829

Fig. 3. The PNSR curve. The x label shows the density of the noise, from 55% to 90%. The y axis shows the value of the PSNR.

As mentioned previously, there is a downward tendency in the curves. But, the downward tendency of the DBA and the MAMF is more gently. On the contrary, even the downward tendency of the ATMF is gently, it is too low. It is worth mentioning that the PNSR curve of the DBA and the MAMF cut the PNSR curve of the AMF between the density of 65% and the density of 75%.

Noise density 55% 60% 65% 70% 75% 80% 85% 90%

Fig. 4. The MSE curve. The x label shows the density of the noise, from 55% to 90%. The y axis shows the value of the MSE.

Assembling the value of PNSR and the value of the MSE and the effect of filter and the result of restoration, the MAMF is better than DBA. IV. CONCLUSION In this paper, we propose a new algorithm to deal with impulse noise. Avoiding the shortcoming of the AMF and the ATMF, the MAMF algorithm integrates the AMF and DBA method. The MAMF image filter algorithm has character of the higher ability of the decision the noises, delicate balancing act between the noise removal and image quality. The results of experiments show that the MAMF method is superior to the conventional methods in the impulse noise,

From the results of the PSNR and the MSE, one can find the general law: the effect of filter is inversely proportional to the density of the noise. Either the value of the PNSR or the MSE, the MAMF is better than the DBA. More directly detail can be found in the PNSR and MSE

18

especially for the noise with intermediate-density and high-density. Meanwhile, the MAMF method provides a quite stable performance over a wide variety of density of noise. The downward tendency of the PNSR value of MAMF is more gently. At the same time, the MAMF has higher quality than the DBA and the AMF. REFERENCES
[1] [2] [3] R.C Gonzalez, R.E.Woods. Digital Image Processing. New Jersey: Pearson Education, Inc., 2008, pp.325340. H. Hwang, R. A. Haddad. Adaptive Median Filters: New Algorithms and Results, IEEE Transactions on Image Processing, vol. 4, no. 4, pp. 499-502, Apr.1995. S.M.Lu, H.C.Pu, C.T.Lin. A HVS-directed neural-network-based approach for impulse-noise removal from highly corrupted images, in IEEE International Conference on Systems, Man and Cybernetics, Washington, 2003, pp.72-77. G.Pok, J.Liu, A.S.Nair. Selective removal of impulse noise based on homogeneity level information,IEEE Trans. Image Processing, vol. 12, no.1, pp.85-92, Jan.2003. S.M.Lu, S.F, Liang, C.T.Lin. A HVS-Directed Neural Network -Based Approach for Salt-Pepper Impulse Noise Removal, Journal of information science and engineering, vol.14, no.4, pp.925-939, Jul.2006. B.Jiang, W.Huang. Adaptive Threshold Median Filter for Multiple-Impulse Noise, Journal of Electronic Science and Technology of China, vol.5, no.1, pp.70-74, Mar.2007. I.Andreadis, G.Louverdis. Real-time adaptive image impulse noise suppression, IEEE Trans. Instrumentation and Measurement, vol.53, no.3, pp.798-806, May. 2004. K.S.Srinivasan, D.Ebenezer. A New Fast and Efficient Decision-Based Algorithm for Removal of High-Density Impulse Noises, IEEE Signal Processing Letters, vol.14, no.3, pp.189-192, June 2007.

[4] [5]

[6] [7] [8]

19

You might also like