Adaptive Edge Preserving Weighted Mean Filter for Removing Random-Valued Impulse Noise
Abstract
:1. Introduction
- We propose an adaptive noise detector and a new weighted mean filter to remove random valued impulse noise from the images.
- In contrast to other state-of-the-art noise detectors, the proposed detector computes a novel adaptive threshold for each pixel. The accuracy of the detection scheme is further enhanced by employing additional steps to avoid faulty detection of edge pixels, which are noisy pixels. This step indeed ensures the preservation of the edges avoiding faulty detection of noise.
- In the filtering stage, a novel weighted mean filter is designed to filter only those pixels which are identified as noisy in the detection stage. In contrast to the existing filtering techniques, the proposed filter first divides the pixels into clusters of clean and noisy pixels. Then, to design the filter, only clean pixels are utilized to find the replacement of the noisy pixel.
2. Proposed Noise Detection Scheme
2.1. Calculation of Separating Threshold
- Let be the pixel under observation at location to know whether it is noise or clean, then it is considered as a central pixel. Window of the size found in Equation (2) is set around the central pixel.
- The corresponding pixel values of of the current window are sorted in ascending order in vector . The outliers are removed from by adopting the “three sigma rule” with median absolute deviation (MAD) [21]. The MAD for is found as:Vector is searched, and, if the difference between any value in and the median value is greater than , it is considered as an outlier and is not taken into account for further calculation. After removal of outliers, let be the resultant vector, where n denotes the size of .
- Compute the absolute difference between every two adjacent pixels in as:
- The separating threshold is found as:
2.2. Separation of Pixels into Clusters
- Initialize from the first pixel in sorted vector . If the difference between current pixel and next pixel is less than or equal to , keep the pixel in the current group together with .
- However, if the difference is greater than , finish the current group and start a new group, such that the first element of the new group will be . Apply the same procedure until the last element of vector .
- The clean and noisy groups are decided based on the size of the group. The first two largest clusters are considered as clean clusters while all other clusters are considered as noisy and are discarded. The clean clusters are denoted as and . Cluster is used in the detection phase while and are used in filtering.
2.3. Noise Detection
2.4. Edge Pixel Identification
- Keeping as a reference pixel, pixels present along four directions are taken into account. These four directions , , and are illustrated in Figure 3.
- contains the pixels from the direction excluding . Similarly, , and contain the pixels from the directions , and , respectively, excluding .
- Find the absolute difference between central pixel with all pixels along direction . The difference vector is defined as = .
- is searched to find the values less than or equal to m. Indexes of pixels corresponding to these values are identified in . These pixels are stacked in vector . The vector is considered to be an edge if total number of pixels in is at least 50% of direction . Step 4 is only performed if this condition holds true. Otherwise, discard the and go to step 5.
- Take the standard deviation of central pixel with . The pixel is identified as an edge if standard deviation of and is less than or equal to threshold :
- If is not identified an edge in direction , then the three other directions , and are checked for an edge identification by applying the five steps above on each direction.
3. Illustration
- Sort all the pixels inside the selected patch in ascending order as = [17 64 64 65 65 65 65 66 66 67 68 68 69 69 83 84 112 112 133 143 152 199 227 236 252].
- The extreme outliers are removed by using MAD given in Equation (3). The MAD value of vector is 5, while the median value of is 69. Therefore, according to the “Three Sigma Rule”, any value below 54 (69 − 15) and above 84 (69 + 15) is discarded and the vector becomes [64 64 65 65 65 65 66 66 67 68 68 69 69 83 84].
- Next, the deference between every two consecutive pixels is found to be = [0 0 0 0 1 0 1 1 0 1 0 14 2].
- The average value m of the vector is equal to 1.4. Putting this value of m in Equation (5), becomes 13.59.
- Using the separating threshold, all pixels of are divided into groups as [64 64 65 65 65 65 66 66 67 68 68 69 69], [83 84].
- The largest group is [64 64 65 65 65 65 66 66 67 68 68 69 69], whose size is much greater compared to other group. Thus, this group is considered the clean group, while the other group is considered the noisy group.
- Using Equation (8), threshold becomes 3. Similarly, mean value becomes = 66.
- By employing Equation(9), any value greater than 69 and less than 63 is considered to be noisy.
4. Proposed Filtering Scheme
- If the size of is very large compared to the size of or R ≤ 0.5, then = 1, = 0.
- Similarly, when 0.5 1, the assigned weights are: = 1, = 1.
- Finally, for 1 2, the assigned weights are: = 1, = 2.
5. Summary of the Proposed Denoising Scheme
Algorithm 1: Proposed algorithm for random valued impulse noise removal. |
Input: The noisy image X, with size of 1 Set iteration i = 1. 2 Outer loop: for , Inner loop: for 3 Set a sliding window centered at , the size of window is determined by . 4 Divide the window into groups of clean and noisy pixels using separating threshold computed in Equation (5). 5 Find mean and threshold from clean cluster, while discard the noisy clusters. 6 Using Equation (7) check for noise. If , go to step (2). 7 If the pixel is identified as noisy, check for an edge using Equation (9). Such that if , go to step (2). 8 Filter as in Equation (11). 9 i = i + 1, if , stop iteration, else X ⟵ Y, go to next iteration. Output: De-noised image Y |
6. Experimental Results
6.1. Comparison of Noise Detection
6.2. Comparison of Image Restoration
7. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Gao, G.; Liu, Y.; Labate, D. A two-stage shearlet-based approach for the removal of random-valued impulse noise in images. J. Vis. Commun. Image Represent. 2015, 32, 83–94. [Google Scholar] [CrossRef]
- Awad, A.S. Standard deviation for obtaining the optimal direction in the removal of impulse noise. IEEE Signal Process. Lett. 2011, 18, 407–410. [Google Scholar] [CrossRef]
- Ilke, T. A new method to remove random-valued impulse noise in images. AEU-Int. J. Electron. Commun. 2013, 67, 771–779. [Google Scholar]
- Chan, R.H.; Hu, C.; Nikolova, M. An iterative procedure for removing random-valued impulse noise. IEEE Signal Process. Lett. 2004, 11, 921–924. [Google Scholar] [CrossRef]
- Jayasree, S.; Bodduna, K.; Pattnaik, P.K.; Siddavatam, R. An expeditious cum efficient algorithm for salt-and-pepper noise removal and edge-detail preservation using cardinal spline interpolation. J. Vis. Commun. Image Represent. 2014, 25, 1349–1365. [Google Scholar] [CrossRef]
- Gonzalez, R.C.; Woods, R.E. Digital Image Processing; Prentice Hall: Upper Saddle River, NJ, USA, 2002. [Google Scholar]
- Astola, J.; Kuosmaneen, P. Fundamentals of Nonlinear Digital Filtering; CRC: BocaRaton, FL, USA, 1997. [Google Scholar]
- Singh, N.; Thilagavathy, T.; Lakshmipriya, R.T.; Umamaheswari, O. Some studies on detection and filtering algorithms for the removal of random valued impulse noise. IET Image Process. 2017, 11, 953–963. [Google Scholar] [CrossRef]
- Chen, T.; Ma, K.; Chen, L. Tri-state median filter for image denoising. IEEE Trans. Image Process. 1999, 8, 1834–1838. [Google Scholar] [CrossRef] [PubMed]
- Arce, G.R.; Paredes, J.L. Recursive weighted median filters admitting negative weights and their optimization. IEEE Trans. Signal Process. 2000, 48, 768–779. [Google Scholar] [CrossRef]
- Ari, N.; Heinonen, P.; Neuvo, Y. A new class of detail-preserving filters for image processing. IEEE Trans. Pattern Anal. Mach. Intell. 1987, 1, 74–90. [Google Scholar]
- Ko, S.-J.; Lee, Y.H. Center weighted median filters and their applications to image enhancement. IEEE Trans. Circuits Syst. 1991, 38, 984–993. [Google Scholar] [CrossRef]
- Coyle, E.J.; Lin, J.; Gabbouj, M. Optimal stack filtering and the estimation and structural approaches to image processing. IEEE Trans. Acoust. Speech Signal Process. 1989, 37, 2037–2066. [Google Scholar] [CrossRef]
- Vikas, G.; Chaurasia, V.; Shandilya, M. Random-valued impulse noise removal using adaptive dual threshold median filter. J. Vis. Commun. Image Represent. 2015, 26, 296–304. [Google Scholar]
- Chen, T.; Hong, R.W. Adaptive impulse detection using center-weighted median filters. IEEE Signal Process. Lett. 2001, 8, 1–3. [Google Scholar] [CrossRef]
- Lin, T.-C. Switching-based filter based on Dempster’s combination rule for image processing. Inf. Sci. 2010, 180, 4892–4908. [Google Scholar] [CrossRef]
- Zhou, W.; Zhang, D. Progressive switching median filter for the removal of impulse noise from highly corrupted images. IEEE Trans. Circuits Syst. II Analog Digit. Signal Process. 1999, 46, 78–80. [Google Scholar] [CrossRef]
- Luo, W. A new efficient impulse detection algorithm for the removal of impulse noise. IEICE Trans. Fund. Electron. Commun. Comput. Sci. 2005, 88, 2579–2586. [Google Scholar] [CrossRef]
- Dong, Y.; Xu, S. A new directional weighted median filter for removal of random-valued impulse noise. IEEE Signal Process. Lett. 2007, 14, 193–196. [Google Scholar] [CrossRef]
- Ghanekar, U.; Singh, A.K.; Pandey, R. A contrast enhancement-based filter forremoval of random valued impulse noise. IEEE Signal Process. Lett. 2010, 1, 47–50. [Google Scholar]
- Bo, X.; Yin, Z. A universal denoising framework with a new impulse detector and nonlocal means. IEEE Trans. Image Process. 2012, 21, 1663–1675. [Google Scholar]
- Antoni, B.; Coll, B.; Morel, J.-M. A non-local algorithm for image denoising. In Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), San Diego, CA, USA, 20–25 June 2005. [Google Scholar]
- Akkoul, S.; Ledee, R.; Leconge, R.; Harba, R. A new adaptive switching median filter. IEEE Signal Process. Lett. 2010, 17, 587–590. [Google Scholar] [CrossRef]
- Johnstone, I.M.; Silverman, B.W. Wavelet threshold estimators for data with correlated noise. J. R. Stat. Soc. Ser. B (Stat. Methodol.) 1997, 59, 319–351. [Google Scholar] [CrossRef]
- Cihan, T.; Akinlar, C. Edge drawing: a combined real-time edge and segment detector. J. Vis. Commun. Image Represent. 2012, 23, 862–872. [Google Scholar]
- Chen, J.; Zhan, Y.; Cao, H.; Wu, X. Adaptive probability filter for removing salt and pepper noises. IET Image Process. 2018, 12, 863–871. [Google Scholar] [CrossRef]
- Bovik, A.C. Handbook of Image and Video Processing; Academic Press: Cambridge, MA, USA, 2010. [Google Scholar]
- Lin, C.H.; Jia, S.T.; Ching, T.C. Switching bilateral filter with a texture/noise detector for universal noise removal. IEEE Signal Process. Soc. 2010, 19, 2307–2320. [Google Scholar]
Methods | 40% | 50% | 60% | ||||||
---|---|---|---|---|---|---|---|---|---|
FN | FP | Total | FN | FP | Total | FN | FP | Total | |
ACWM | 14,590 | 2367 | 16,857 | 21,897 | 3706 | 25,603 | 30,198 | 6526 | 36,724 |
Luo’s | 14,679 | 1831 | 16,510 | 21,665 | 3068 | 24,733 | 33,987 | 2780 | 36,767 |
TSM | 18,921 | 5201 | 24,122 | 23,921 | 6218 | 30,139 | 28,123 | 8903 | 37,026 |
PSM | 18,672 | 4982 | 23,654 | 23,762 | 6123 | 29,885 | 27,987 | 8393 | 36,380 |
ASWM | 7489 | 11,564 | 19,053 | 11,779 | 12,786 | 24,565 | 19,982 | 16,482 | 36,464 |
DWM | 11,786 | 8931 | 20,717 | 15,321 | 8756 | 24,077 | 15,728 | 14,816 | 30,544 |
SD-OOD | 13,500 | 10,675 | 24,175 | 11,987 | 15,827 | 27,814 | 17,821 | 18,261 | 36,082 |
ROR-NLM | 12,890 | 3328 | 16,218 | 15,297 | 3487 | 18,784 | 21,827 | 7808 | 29,635 |
Propoposed | 10,908 | 7973 | 18,881 | 11,668 | 9613 | 21,241 | 13,571 | 9760 | 23,331 |
Methods | Lena | Pepper | ||||
---|---|---|---|---|---|---|
(Noise Density) | 40% | 50% | 60% | 40% | 50% | 60% |
TSM | 24.91 | 22.22 | 18.98 | 24.02 | 22.56 | 17.78 |
ACWM | 28.12 | 24.64 | 20.32 | 28.12 | 26.09 | 21.52 |
LOU’S | 29.62 | 25.82 | 22.69 | 28.41 | 26.33 | 23.89 |
PSM | 29.12 | 25.31 | 24.23 | 28.23 | 25.41 | 23.83 |
ASWM | 30.91 | 28.42 | 26.25 | 29.02 | 27.12 | 25.33 |
DWM | 30.92 | 28.91 | 26.51 | 29.13 | 27.79 | 25.48 |
SBF | 30.12 | 27.12 | 23.13 | 28.89 | 27.02 | 24.67 |
ROR-NLM | 31.42 | 29.21 | 25.61 | 29.61 | 27.89 | 25.45 |
PROPOSED | 31.77 | 30.01 | 28.03 | 29.75 | 28.11 | 26.62 |
Methods | Bridge | Boat | ||||
---|---|---|---|---|---|---|
(Noise Density) | 40% | 50% | 60% | 40% | 50% | 60% |
TSM | 21.55 | 19.72 | 17.26 | 22.89 | 20.72 | 17.55 |
ACWM | 23.72 | 22.19 | 19.12 | 25.32 | 23.56 | 21.45 |
LOU’S | 23.84 | 22.78 | 19.17 | 25.45 | 23.78 | 21.61 |
PSM | 23.65 | 21.91 | 19.39 | 24.98 | 22.98 | 20.87 |
ASWM | 24.02 | 22.69 | 21.12 | 26.76 | 25.26 | 23.23 |
DWM | 24.07 | 22.72 | 21.19 | 26.83 | 25.31 | 23.57 |
SBF | 22.12 | 21.31 | 20.15 | 25.33 | 24.88 | 22.67 |
ROR-NLM | 24.27 | 22.91 | 21.21 | 27.23 | 25.43 | 24.21 |
PROPOSED | 24.35 | 23.08 | 21.75 | 27.85 | 26.61 | 24.87 |
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Iqbal, N.; Ali, S.; Khan, I.; Lee, B.M. Adaptive Edge Preserving Weighted Mean Filter for Removing Random-Valued Impulse Noise. Symmetry 2019, 11, 395. https://doi.org/10.3390/sym11030395
Iqbal N, Ali S, Khan I, Lee BM. Adaptive Edge Preserving Weighted Mean Filter for Removing Random-Valued Impulse Noise. Symmetry. 2019; 11(3):395. https://doi.org/10.3390/sym11030395
Chicago/Turabian StyleIqbal, Nasar, Sadiq Ali, Imran Khan, and Byung Moo Lee. 2019. "Adaptive Edge Preserving Weighted Mean Filter for Removing Random-Valued Impulse Noise" Symmetry 11, no. 3: 395. https://doi.org/10.3390/sym11030395