Academia.eduAcademia.edu

Science and Engineering

2013

A new adaptive switching-based median filtering scheme for restoration of images that are highly corrupted by salt and pepper noise is proposed. The function of the algorithm detects the corrupted pixels first since the salt and pepper noise only affect pixels value in the image. The probable value of the noise central pixel is predicted based on noise level. Initially the algorithm adopts adaptive property for expanding the filtering window pixel by pixel until 7×7 mask. But when all the elements in 7×7 window are noise pixels the algorithm define probable pixel value through noise free last processed pixel or creating a filtering window with a big dimension and search for a pixel value which is more frequent. Then Robust Estimator Algorithm is applied to the proposed filter to remove discontinuity of pixel intensity and smooth the image. The algorithm is mainly implemented focussing on the removal of high-density salt and pepper noise in images. Extensive simulation and visual qua...

International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 An Enhanced Filtering Approach for High Density Salt and Pepper Noise to Restore Image with the Aid of Robust Estimator Golam Moktader Daiyan M. A. Mottalib Department of Computer Science and Engineering, Islamic University of Technology, Boardbazar, Bangladesh. Phd,Department of Computer Science and Engineering, Islamic University of Technology, Boardbazar, Bangladesh. ABSTRACT A new adaptive switching-based median filtering scheme for restoration of images that are highly corrupted by salt and pepper noise is proposed. The function of the algorithm detects the corrupted pixels first since the salt and pepper noise only affect pixels value in the image. The probable value of the noise central pixel is predicted based on noise level. Initially the algorithm adopts adaptive property for expanding the filtering window pixel by pixel until 7×7 mask. But when all the elements in 7×7 window are noise pixels the algorithm define probable pixel value through noise free last processed pixel or creating a filtering window with a big dimension and search for a pixel value which is more frequent. Then Robust Estimator Algorithm is applied to the proposed filter to remove discontinuity of pixel intensity and smooth the image. The algorithm is mainly implemented focussing on the removal of high-density salt and pepper noise in images. Extensive simulation and visual quality of image shows that it can provide high quality restored images. Keywords: Adaptive Switching Median filter; Robust Estimator; Salt and Pepper Noise. 1. INTRODUCTION Various of types of noise introduces in digital images. For example, during image acquisition, light levels and faulty sensors are the major factors affecting the amount of noise in the resulting images and electronic transmission of image data can also introduce noise due to interference in the channel used in the transmission [1]. Images are corrupted with noise modeled with a Gaussian, salt and pepper distribution, Rayleigh or an erlang and speckle noise. Different filtering may remove different types of noises, e.g., an averaging filtering is useful for removing grain noise from a photograph. So, selecting the appropriate method plays a major role in getting the desired image. Many image processing application uses linear filters for systematic theory of design and analysis [2]. If images are corrupted by Additive Gaussian Noise (AGWN) linear filters show very good performance [3]. But linear filters cannot cope with nonlinearities of the image formation model. Furthermore, human vision is very sensitive to high-frequency information. Image edge and image details (e.g. corners and lines) have high frequency content [4]. Most of the digital images require lowpass filtering. Low pass filtering tends to blur edges and destroy lines edges and other fine details. These reasons have led researchers to use nonlinear filtering techniques for image processing. Muhammad Mizanur Rahman Department of Computer Science and Engineering, Islamic University of Technology, Boardbazar, Bangladesh. An important non linear filter that will preserve the edges and remove salt and pepper noise is standard median filter [5] [6] [7]. Median filters replace every pixel by its median value from its neighborhood and often removes desirable details in the image. Many non linear filters have been proposed for removing salt and pepper noise from the images. Standard „Median shows good denosing capability at low density noise. When noise level is over 50% it could not preserve edge details of the original image. Adaptive median filter is also applicable at low density noise. The common drawback of adaptive filtering technique is that the noise pixels are replace without taking into account local features when noise level is high. The major drawback of the Decision Based method [7] is that defining a robust decision is difficult. At high density the median value will be 0 or 255 which is noisy. In such case previously processed pixel is used for replacement. This repeated replacement of neighboring pixel produce streaking effect [5]. In this paper, existing and recently improved denoising algorithms are Standard Median Filter, Adaptive Median Filter [8], Noise adaptive fuzzy switching median (NAFSM) filter [9] and A New Decision Based Algorithm [10] used to evaluate the performance level of proposed algorithm. Moreover, most of modified median filters including standard median filter cannot remove noise pixels when majority of the pixels in the filtering window are affected by noise. That do not create any new value but it is prone to alter pixels undisturbed by noise which cause some artifacts like edge jitter and streaking. Most of the modified median filters are applied uniformly. This tends to modify both noise and noise free pixels [1]. Thus overall quality of image is decreased. Adaptive Switching median filters are well known for identifying noisy pixels based on threshold values and processing only noisy pixels. There are four stages in adaptive switching median filtering: noise detection, estimation of noise-free pixels, expansion of filtering window and replacement. But edges and fine details are not recovered satisfactorily, especially when the noise level is high. In order to overcome these drawbacks we proposed a two-phase algorithm. In the first phase an adaptive median filter is used to classify corrupted and uncorrupted pixels. In the second phase, robust estimation algorithm is applied to identify the discontinuity of pixels intensity and apply their robust formulation and smooth the image. The outline of this paper is as follows. Section 2 describes robust statistics based algorithm. Section 3 discusses the proposed technique to remove salt and pepper noise. Section 4 deals the illustration of proposed technique. Section 5 deals results and discussions and conclusion is presented in section 6. 1 International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 2. REVIEW OF RELATED LITERATURE A. Fast Adaptive Switching Filter(FASF) FASF proposes threshold value which varies with different images. For Salt and Pepper noise, FASF applies an upper threshold Tu and a lower threshold Tl value. [5]. The two thresholds are defined as follows: Tu = maximum{X(i-N, j-N), …, X(i, j), …, X(i+N, j+N)} Tl = minimum{X(i-N, j-N), …, X(i, j), …, X(i+N, j+N)} (1) α(i, j) = 1 if x(i, j) = Tu or x(i, j) = Tl α(i, j) = 0 if Tl < x(i, j) < Tu (2) (3) Here, X(i‟, j‟) is a noise-free pixel and its position is the nearest to (i, j). If all the pixels in the filtering window are noise pixel, the filtering window is expanded pixel by pixel until a noise-free pixel X(t1, t2) is found. Nn represents the number of noise pixels in the filtering window. B. Robust Statistics Estimation Robust estimation is based on the principle of robustness safety. Difference of each pixel inside the window with the median value is calculated as x and applied to robust influence function . Where is outlier rejection is given by , =Maximum outlier/ Pixel estimated by using the euations s1= , s2= Where L is number of pixel in the window and Ratio of s1 and s2 gives the estimated pixel value. Figure 1: Flow chart of PA 3. PROPOSED ALGORITHM Algorithm The proposed algorithm is improvement of Adaptive Switching Median algorithm (ASM) [8]. And robust estimation algorithm (REA) [11, 12] is added with the proposed filter to enhance the performance of restored image. The steps of the PA are elucidated as follows. Step1: Set Minimum Window size Wmin=3 3 and Maximum Window Size Wmax=7 7.Set Noisy Image X and Restored Image Z. Step2: Read the pixels from the sliding window and store it in S. Step3: Compute Smin, Smax, TU, TL, Smed and Np. 2 International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 Step4: If Smin<X(i,j)<Smax, where X(i,j) is a processing pixel, then it is considered as uncorrupted pixel and retained. Otherwise go to step 5. Step5: If central pixel X(i,j)=0 || X(i,j)=255 is such that Np<TL then it is considered as corrupted pixel and replace by Smed. Otherwise go to step 6. Step6: To maintain Np<TL increase the window size upto 7 7 mask. Step7: If the central pixel is X(i,j)=0 or X(i,j)=255 and TL<Np<TU then it is considered as uncorrupted Pixel and retained. Otherwise go to step8. Step8: Select the Previously processed pixel Zr(i-1,j). If Zr(i1,j-1)~=0 ||Zr(i-1,j)~=255 then it is considered as uncorrupted pixel and centre pixel replace by previous processed pixel value. Otherwise go to step 9. Step10: Create a sliding window with a new dimension. W=Wmax 2 and Compute number of salt (wh) and Pepper (Bl) from the window. Replace the processing pixel with majority of isolated black or white spot noise. Step11: Apply robust estimation algorithm. Step12: Restored Image. Here, Smin= Minimum intensity value in the window Smax= Maximum intensity value in the window TU= Number of Pixels at window TL=Number of Pixels at window/2 Smed= Median Value Np= Number of Noisy Pixels Wh= Number of salt noise Bl= Number of pepper noise The detailed description of proposed algorithm of the flowchart shown in Fig 1 is illustrated through an example in section 4. Corrupted with 90% noise Output of SMF(6.23db) Output of AMF(19.4db) Output of DBA(10.63db) Output of NAFSM(22.01db) Output of PA(23.16db) Figure 2: (from upper left): (a) Cameraman Image corrupted with 90% noise and same image restored with (b) SMF, (c) AMF, (d) DBA (e) NAFSM Filter and (f) Proposed Algorithm. 4. SIMULATION AND PERFORMANCE ANALYSIS Matlab have used as the simulation tool. The proposed filter is tested with different kind of Test images that are corrupted by Salt and Pepper noise at various noise densities. The performance of proposed algorithm are quantitatively measured by the PeakSignal-to-Noise Ratio (PSNR), Mean Square Error (MSE), Image Enhancement Factor (IEF) and Mean Structural Similarity Index (MSSIM) as defined equation (5), (6) , (7) and (8) respectively: PSNR=10log10 (5) MSE = (6) IEF= (7) Corrupted with 70% noise Output of SMF(7.24db) Output of AMF(18.42db) Output of DBA(13.89db) Output of NAFSM(19.25db) Output of PA(20.79db) (8) Here, M×N is the size of image. X represents the original image, Y represent denoised image. The noise density is varied from 10% to 90%. The results show improved performance against the existing algorithms at different noise densities for gray scale and colour images. Gray scale image (Cameramen.jpg) and Colour image (Baboon.jpg) are used here to evaluate the performance of the proposed algorithm. Figure 3: (from upper left): (a) Baboon Image corrupted with 70% noise and same image restored with (b) SMF,(c) AMF, (d) DBA, (e) NAFSM Filter and (f) Proposed Algorithm. 3 International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 35 30 PSNR (db) 25 20 15 10 Corrupted with 80% noise Output of SMF(7.87db) 5 0 0 20 SMF 40 60 80 Noise Density (%) AMF DBA NAFSM 100 PA Figure 5: Noise density versus PSNR for Baboon Image Output of AMF(17.47db) Output of NAFSM(18.27db) Output of PA(19.86db) Figure 4: (from upper left): (a) Baboon Image corrupted with 80% noise and same image restored with (b) SMF, (c) AMF, (d) DBA, (e) NAFSM Filter (f) Proposed Algorithm. TABLE 1: PSNR FOR VARIOUS FILTERS FOR BABOON RGB IMAGE AT DIFFERENT NOISE DENSITIES AMF TABLE2: MSE FOR VARIOUS FILTERS FOR BABOON RGB IMAGE AT DIFFERENT NOISE DENSITIES Output of DBA(12.49db) Noise density (%) 10 SMF DBA NAFSM 20.37 28.96 22.87 29.09 29.73 20 19.7 25.66 21.88 26.09 26.72 30 18.24 23.48 20.35 24.14 24.78 40 16.2 21.95 18.64 22.69 23.44 50 13.66 20.65 16.92 21.47 22.58 60 11.39 19.55 15.33 20.33 21.67 70 80 9.4 7.87 18.42 17.47 13.89 12.49 19.25 18.27 20.79 19.86 90 6.39 16.02 10.92 16.82 18.59 Noise density (%) SMF AMF DBA NAFSM PA 10 20 30 40 50 60 70 80 90 596.94 696.62 975.6 1558.7 2801.95 4728.25 7476.08 10619.14 14940.67 82.78 176.66 291.92 414.8 560.52 720.89 935.82 1165.11 1631.01 335.97 422.42 601.05 893.14 1329.11 1912.81 2665.33 3682.01 5285.53 80.32 160.02 250.95 350.36 463.57 603.17 772.7 969.73 1354.21 69.28 138.49 216.33 294.24 358.84 442.26 542.23 671.88 899.67 20000 15000 PA 5000 MSE 10000 0 0 20 40 60 80 100 NAFSM PA Noise Density (%) SMF AMF DBA Figure 6: Noise density versus MSE for Baboon RGB Image 4 International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 TABLE 3: IEF FOR VARIOUS FILTERS FOR LENA IMAGE AT Noise density (%) 10 20 30 40 50 60 70 80 90 SMF AMF DBA NAFSM PA 3.4 5.64 5.98 4.96 3.48 2.45 1.82 1.45 1.17 24.49 22.24 19.99 18.63 17.38 16.1 14.56 13.2 10.78 6.03 9.31 9.73 8.7 7.38 6.09 5.13 4.19 3.32 25.24 24.55 23.25 22.06 21.02 19.23 17.62 15.84 12.89 29.26 28.37 26.98 26.27 27.15 26.23 25.11 22.86 19.42 MSSIM DIFFERENT NOISE DENSITIES 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 20 60 80 100 Noise Density (%) SMF IEF 40 35 30 25 20 15 10 5 0 AMF DBA NAFSM PA Figure 8: Noise density versus MSSIM for Baboon Image 0 20 40 60 80 100 Noise Density (%) SMF AMF DBA NAFSM PA Figure 7: Noise density versus IEF for Baboon Image TABLE 4: MSSIM FOR VARIOUS FILTERS FOR BABOON IMAGE AT DIFFERENT NOISE DENSITIES Noise In % 10 20 30 40 50 60 70 80 90 SMF AMF DBA NAFSM PA 0.46 0.43 0.37 0.27 0.17 0.11 0.06 0.03 0.01 0.94 0.88 0.81 0.73 0.64 0.54 0.44 0.33 0.19 0.77 0.72 0.63 0.51 0.4 0.29 0.2 0.12 0.05 0.94 0.89 0.83 0.75 0.68 0.59 0.5 0.39 0.25 0.95 0.9 0.85 0.79 0.72 0.65 0.56 0.45 0.31 The performance of the proposed algorithm for various images at different noise levels is studied. Results are shown in figures 5, 6, 7 and 8. The first column represents the output of Standard Median Filter (SMF), second column represent output of the Adaptive Median Filter (AMF) [8], third column represent the output of Decision Based Algorithm[10],fourth column represent output of the Noise Adaptive Fuzzy Switching Median Filter (NAFSM)[9] , and fifth column represent the output of Proposed Algorithm. Tables 1-5 display the quantitative measures. Standard median filter (SMF) replaces the current pixel by its median value irrespective of whether a pixel is corrupted or not. Therefore, the performance is poor. Adaptive median filter (AMF)[8] exhibits improved performance but due to its adaptive nature the computation complexity is much higher. Decision Based Algorithm (DBA) [10] has very good noise removing capacity and good edge preservation at low density noise. Noise Adaptive Fuzzy Switching Median Filter (NAFSM) [9] has improved performance than DBA [10] but its computational complexity is much higher. Figures 2-4 display the quantitative performance of the various algorithms for Cameraman and Baboon image. It can be observed that the proposed algorithm removes noise effectively even at higher noise levels and preserves the edges and reduces streaking which is major drawback of DBA. The proposed technique can be good compromise in preference to the adaptive algorithm, DBA and NAFSM. 5. CONCLUSION In this paper, a new algorithm is proposed which gives better performance in comparison with SMF, AMF and other recently improved noise removal algorithms in terms of PSNR, MAE, MSE and MSSIM. The performance of the algorithm has been tested at low, medium and high noise densities. The proposed algorithm can be a good compromise for salt and pepper noise removal in images. However, Computational complexity is the major issue in this algorithm. 5 International Journal of Computer Applications (0975 – 8887) Volume 50– No.23, July 2012 6. REFERENCES [1] Z. Q Cai., T. K. M. Lee, “ Adaptive Switching Filters”, Information, Communications and Signal Processing, 2009, 7th International Conference, p 1-4, 8-10 Dec. 2009. [2] I. Pitas and A. N. Venetsanopouslos, “Nonlinear Digital Filters: Principles and Applications,‟‟ Norwell, M.A: Kluwer 1990. [3] R. C. Gonzalez and R. E. Woods, “ Digital Image Processing”, Addition Wesley Publication Company, 2002. [4] W.K. Pratt, “ Digital Image Processing”, New York Wiley, 1991. [5] J. Astola and Kuosmanen P., “Fundamental of Nonlinear Digital Filtering”, CRC Press, 1997. [6] T.S. Hung, G.J. Yang and G. Y. Tang “ Fast Two Dimensional Median Filtering Algorithm”, IEEE Transaction on Acoustics Speech and Signal Processing, Vol. 1PP13-18, 1979. [7] E. Srinivasan and D. Ebenzer , “ New Nonlinear Filtering Strategies for Eliminating Short and Long Tailed Noise in Images with Edge Preservation Properties”, International Journal of Signal Processing”, Vol.4. No.3, 1984. [8] Fanzhi Kong, Wenbin Ma, “A Fast Adaptive Median Filtering Algorithm”, 2nd International Conference on Industrial and Information Systems, IEEE 2010. [9] Kenny Kal Vin Toh and Nor Ashidi Mat Isa, 'Noise Adaptive Fuzzy Switching Median ... IEEE Signal Processing Letters. Vol. 17, No. 3, pp. 281-284, March 2010. [10] Madhu S. Nair, K. Revathy, and Rao Tatavarti., “Removal of Salt-and Pepper Noise in Images: A New Decision-Based Algorithm”, Proceedings of the International Multi Conference of Engineers and Computer Scientists 2008 Vol I IMECS 2008, 19-21 March, 2008, Hong Kong. [11] Tamer Rabie, “Robust Estimation Approach for Blind Denoising”, IEEE Trans. Image Processing, vol.14, no.11, pp.1755-1765, 2005. [12] V. R. Vijakumar, P. T. Vanathi, and D. Kanagasabapathy, “Robust Statistics Based Algorithm to Remove Salt and Pepper Noise in Image”, International Journal of Information and Communication Engineering 5:3, 2009. 6