S S symmetry

Article An Iterative Weighted-Mean Filter for Removal of High-Density Salt-and-Pepper

Fengyu Chen 1, Minghui Huang 1,2, Zhuxi Ma 1, Yibo Li 1,2,* and Qianbin Huang 1,3

1 Light Alloy Research Institute, School of Mechanical and Electrical Engineering, Central South University, Changsha 410083, China; [email protected] (F.C.); [email protected] (M.H.); [email protected] (Z.M.); [email protected] (Q.H.) 2 State Key Laboratory of High-Performance Manufacturing, Central South University, Changsha 410083, China 3 Guangxi Liuzhou Yinhai Aluminum Company Limited, Liuzhou 545006, China * Correspondence: [email protected] or [email protected]

 Received: 26 October 2020; Accepted: 30 November 2020; Published: 2 December 2020 

Abstract: Salt-and-pepper noise, which is often introduced by sharp and sudden disturbances in the image signal, greatly reduces the quality of images. Great progress has been made for the salt-and- pepper noise removal; however, the problem of image blur and still exists, and the efficiency of denoising requires improvement. This paper proposes an iterative weighted-mean filter (IWMF) algorithm in detecting and removing high-density salt-and-pepper noise. Three steps are required to implement this algorithm: First, the noise value and distribution characteristics were used to identify the noise pixels, effectively improving the accuracy of noise detection. Second, a weighted-mean filter was applied to the noisy pixels. We adopted an un-fixed shape symmetrical window with better detail preservation ability. Third, this method was performed iteratively, avoiding the streak effect and artifacts in high noise density. The experimental results showed that IWMF outperformed other state-of-the-art filters at various noise densities, both in subjective visualization and objective digital measures. The extremely fast execution speed of this method is quite suitable for real-time processing.

Keywords: iterative weighted-mean filter; salt-and-pepper noise; noise detection and removal

1. Introduction

Images are often contaminated by salt-and-pepper noise, due to various reasons, including transmitting images in defective channels or taking pictures with a faulty sensor [1]. The salt-and-pepper noise is classified as the impulse noise and comprises a random set of pixels with extreme intensity and usually in significant contrast with the neighboring noise-free pixels [2]. The existence of salt-and- pepper noise, even with a low noise density, can seriously affect visual perception and image analysis, and thus, needs to be detected and removed. Nonlinear filters, particularly the standard filter (MF) [3] and the modified median filters, are widely used to remove salt-and-pepper . However, the standard MF alters each pixel by a median value of pixels in the predefined window, which destroys many noise-free pixels, and cannot effectively retain the high-frequency components. To improve the denoising performance and efficiency, extended versions of MF have been proposed [2,4–23]. The most commonly used modified MFs are the weighted filter [5,8,18] and the adaptive median filter [14,22]. By giving higher predefined weights to the selected pixels in the filtering window before calculating the median, the weighted filter can retain more details than MF. Through automatically adjusting the filtering window size based on the local noise content, the adaptive median filter can prevent image

Symmetry 2020, 12, 1990; doi:10.3390/sym12121990 www.mdpi.com/journal/symmetry Symmetry 2020, 12, 1990 2 of 12 over- and help to keep the image details. The methods mentioned above can improve the denoising performance to some extent, but the destruction of many noise-free pixels cannot be avoided. A decision-based algorithm (DBA) was proposed in Reference [19] by Srinivasan and Ebenezer, in which the pixel value of 0 or 255 was regarded as the “noisy pixels” and the others were treated as “noise-free pixels”. Only “noise pixels” were replaced by the median value. This method avoids the destruction of many noise-free pixels and effectively improves the capability of the image edges and detail preservation. However, when dealing with the images under high noise density (ND > 30%) with DBA, artifacts will be introduced. To overcome this drawback, Esakkirajan et al. [11] proposed an un-symmetry trimmed median method. This replaced noisy pixels with the trimmed median value of all the elements present in the selected window to avoid the interference of noisy pixels on the sorting result. The proposed algorithm improved the effect of salt-and-pepper noise removal in images at high noise densities (ND > 30%); however, it often introduced dark patch-like surface in the reconstructed image, and thus, requires further improvement. Decision-based or adaptive switching hybrid filters were proposed, such as the two-stage filter (TSF) [20], different applied median filter (DAMF) [10], adaptive switching weighted median filter (ASWMF) [12], based pixel density filter (BPDF) [21], adaptive frequency median filter (AFMF) [9], and modified decision based median filter (MDBMF) [17]. The TSF and DAMF are adaptive-switching-trimmed-median filters that replace noisy pixels with the trimmed median value in the adaptive window. Both are adaptive for a wide range of noise density, but too large of an adaptive window is required when processing images with high-density noise. The replacement of the noisy pixels under such a large window causes the images to be blurred. The BPDF is a useful filter below medium-density noise; however, it will create a raindrop effect in the case of high-density noise. With combinations of different weighted-median and switching technologies, the switching-trimmed-weighted-median filters, such as ASWMF, have a good capability for detail preservation, but the judgment and switching processes increase the computational complexity and lead to a long processing time. An effective and efficient filter, with the considerations of high-density noise, avoiding over-smoothing and artifacts, and time-saving is further required. In addition to median-based filters, great attention has also been paid to improving mean-based filters for denoising [24–30]. The mean-based filters typically incorporate important filtering technologies, which are called the trimmed mean, switching mean, weighted mean, etc. Two typical mean-based filters, namely, efficient restoration method for impulse noise (ERMI) [28] and adaptive Gaussian filter (AGF) [27] were commonly used. The ERMI is a switching-trimmed-mean filter that adjusts the window size automatically according to the noise density, and then uses the mean value of the noise-free pixels in the filtering window as the restored pixel value. This process is simple and has a high processing speed. Inspired by the simplest and high efficiency of the ERMI, a switching-trimmed-weighted-mean filter, called adaptive Gaussian filter (AGF) was further proposed by Mehdi et al. [27], which performs noise removal by using a Gaussian filter with adaptive variances based on the density of noise. This retains the advantages of the ERMI, and improves the edges and details preservation capability. These filters have the advantages of simplicity and good real-time performance, but are still subject to the drawback of low pass filtering, which leads to the loss of many high-frequency components in the image. Therefore, further optimization of the mean-based method is required. Another kind of hybrid filter, integrating the median-based and mean-based filtering technology, has been proposed, such as the fast switching based median–mean filter (FSMMF) [31], adaptive weighted mean filter (AWMF) [30], and switching median-mean filter (SMMF) [32]. The FSMMF selects the median value or mean value based on the number of noise-free pixels in the window, and the SMMF removes noises at different times and orders of the median filter and mean filter. Both methods show better robustness at high noise densities; however, the denoising effect of these filters depends on the accuracy of noise detection and the rationality of the switching conditions. From the discussions above, the current filters usually perform well on images with the noise density within a specific range, but some filtering distortion problems, such as streak effects and over-smoothing, Symmetry 2020, 12, x FOR PEER REVIEW 3 of 13

From the discussions above, the current filters usually perform well on images with the noise density within a specific range, but some filtering distortion problems, such as streak effects and over- smoothing,Symmetry 2020are, 12still, 1990 common, especially under high noise density conditions. In addition,3 of 12 the discussed filters achieve the denoising effect by increasing the complexity of the algorithm, which inevitablyare still decreases common, especially the efficiency under and high increases noise density the conditions. time of the In process. addition, theIn real-time discussed filtersapplications, achieve the denoisingthe denoising speed effectof the by filters increasing is required the complexity to be largely of the algorithm, improved. which inevitably decreases the efficiency andTo overcome increases the such time ofproblems, the process. a Inrobust real-time noise applications, removal the method, denoising called speed iterative of the filters weighted is required mean filterto (IWMF) be largely is improved.proposed in this paper. IWMF is based on the effective weighted-mean framework and adoptsTo overcomean un-fixed such shape problems, symmetrical a robust noise window, removal which method, has calledbetter iterative detail protection weighted mean ability. filter With the combination(IWMF) is proposed of such in this algorithms, paper. IWMF both is based the ondenoising the effective effect weighted-mean and real-time framework performance and adopts can be greatlyan un-fixedimproved. shape symmetrical window, which has better detail protection ability. With the combination ofThe such remaining algorithms, parts both are the as denoising follows: e ffSectionect and real-time2 introduces performance the scheme can be of greatly the iterative improved. weighted- The remaining parts are as follows: Section2 introduces the scheme of the iterative weighted-mean mean filter. Section 3 presents the experimental results of the proposed method compared with other filter. Section3 presents the experimental results of the proposed method compared with other state-of-the-art methods. Finally, our conclusions are presented in Section 4. state-of-the-art methods. Finally, our conclusions are presented in Section4.

2. Scheme2. Scheme of the of theIterative Iterative Weighted-Mean Weighted-Mean Filter Filter ThreeThree stages stages are areinvolved involved in inthe the proposed proposed model: model: The noisenoise detection detection stage, stage, noise noise removal removal stage, stage, and iterativeand iterative denoising denoising stage. stage. Figure Figure 11 isis the the flow flow chart chart for for the proposedthe proposed model, mo withdel, details with aboutdetails the about the flowflow chart. chart. These threethree stages stages are are described described in detail in detail in the in following the following sections. sections.

FigureFigure 1. 1. FlowFlow chart chart for for the proposedproposed method. method. 2.1. Stage 1: Noise Detection 2.1. Stage 1: Noise Detection At this stage, the pixels are divided into two categories—there are noisy pixels and noise-free pixels.At this It stage, is reasonable the pixels to assume are divided that the pixelsinto two with categories—there the extreme maximum are and noisy the pixels extreme and minimum noise-free pixels.values It is are reasonable noises [2,15 ,to19 ,20assume]. that the pixels with the extreme maximum and the extreme minimum values are noises [2,15,19,20]. For a pixel g in the image I, let I(g) be its pixel value, and R be its noise recognition matrix. The noise recognition matrix R can be written as:

Symmetry 2020, 12, 1990 4 of 12

For a pixel g in the image I, let I(g) be its pixel value, and R be its noise recognition matrix. The noise recognition matrix R can be written as: ( 0, 0

1. All pixels in this region have extreme intensity. 2. About half of the noise pixels take the intensity 255, so the total number of pixels with an intensity of 255 is greater than the pixels with an intensity of 0. In other words, pixels with an intensity of 255 are the majority.

For a pixel g in the image I, let I(g) be its pixel value and W5(g) be its neighborhood window of size 5 5. If I(g) = 255 or I(g) = 0, label g as a noise candidate pixel; otherwise, label g as a × noise-free pixel. For a noise candidate pixel gcandidate, if all pixels in W5(gcandidate) with intensity 0 or 255, and N255 > T, where N255 is the number of pixels with an intensity of 255, and the optimal value of T is 20, then gcandidate is in the white extreme intensity flat regions. If I(gcandidate) = 255, it is considered a noise-free pixel, otherwise it is a noise pixel. Such a procedure is also applicable to black extreme intensity flat regions. If a pixel g is in a black extreme intensity flat region and I(g) = 255, then it is considered a noise-free pixel; otherwise, it is a noise pixel. Therefore, mathematically, the improved detection algorithm can be given as   0, 0

2.2. Stage 2: Noise Removal In this stage, a decision-based weighted mean filter with an adaptive window is used for denoising. The pixels that are labeled noise-free (R(g) = 1) in the noise detection stage remain unchanged, and the noises (R(g) = 0) are replaced by the restored intensity. The steps for noise removal are as follows.

2.2.1. Selection of Filtering Window Generally, selecting a small filtering window can preserve image details better, while a large filtering window can adapt to a higher noise density [11,22]. To adaptively change the filtering windows according to the noise density, and thus, improve the process efficiency, a symmetrical window with an unfixed shape was adopted in this paper. The size was adaptively changed according to the noise density. This kind of window can better reflect the local correlation between pixels, and has a stronger detail protection ability than the traditional square window. Symmetry 2020, 12, x FOR PEER REVIEW 5 of 13

1. If the number of noise-free pixels in W5(g) is greater than 3, then set W = r1 as the candidate filtering window. If the number of noise-free pixels in W is less than 3, then let W = r1 + r2. By analogy, increase W by ri (r1, r2, ... r5) until the number of noise-free pixels selected exceeds 2. 2. If the number of noise-free pixels in W5(g) is 1 or 2, then let W = W5(g). 3. If all pixels in W5(g) are noise, then a suitable filtering window cannot be obtained. In this case, the pixel needs to be further detected by method 2 in Section 2.2.2.

2.2.2. Calculation of Noise Pixels Restored Value The calculation of noise restored value is based on weighted mean filtering and the distribution characteristics of the pixels. For each noise, the pixels g, if the number of noise-free pixels in W5(g) is greater than 0, then the method in 1 is used for denoising; otherwise, the method in 2 is used. 1. In the spatial filtering theory, corrupted pixels can be restored using the normalized weighted mean of all pixels in the neighborhood. The noise restored value can be calculated as (3). Replace the noise pixel value with the restored value, and set R(g) = 0. ) (,)rs Dw(, rs I ( i + rj , + s ) F(,ij ) = (,) (3) (,)rs Dw rs SymmetryHere,2020 D, 12 is, 1990the noise-free pixels group in window W, (i, j) is the coordinate of pixel g, (r, s) is5 ofthe 12 relative coordinate with (i, j) as the center, and w(r, s) is the weighted function (4), which can be obtained from Let r be the Euclidean distance between g and the other pixels in W5(g), and we define five 22 different windows ri (r1, r2, ... r5) accordingw( rs , )=1/ to the rs value of r, as shown in Figure2a. Let W be the(4) filteringIn general, window, the and value we chooseof a pixel W accordingis closer to to the the value following of its threeneighboring rules: pixels than the values of far pixels. The median filter takes the median value of pixels in the window as the restoration 1. If the number of noise-free pixels in W5(g) is greater than 3, then set W = r1 as the candidate value of noise pixels, and cannot reflect the difference of the spatial position of pixels. To filtering window. If the number of noise-free pixels in W is less than 3, then let W = r1 + r2. overcome such a defect, a distanced weighted method is proposed for denoising in this paper. By analogy, increase W by ri (r1, r2, ... r5) until the number of noise-free pixels selected exceeds 2. The weighted coefficients are formed to be a center symmetric weight matrix whose values 2. If the number of noise-free pixels in W5(g) is 1 or 2, then let W = W5(g). gradually decrease with the increase of distance, as shown in Figure 2b. Such a treatment can 3. If all pixels in W5(g) are noise, then a suitable filtering window cannot be obtained. In this case, well reflect the local correlation between pixels, thereby reducing the loss of detail and avoiding the pixel needs to be further detected by method 2 in Section 2.2.2. image blur.

(a) (b)

FigureFigure 2.2. IllustratedIllustrated images:images: ((aa)) DistributionDistribution ofof windowswindows rrii (r1,, r2,, ...... rr5),5), (b (b) )Weighted Weighted matrix matrix X. X.

2.2.2.2. If Calculation g is in the extreme of Noise intensity Pixels Restored flat regions, Value then the recovery step is performed according to the formulaThe calculation (5) and ofset noise R(g) restored= 0; otherwise, value isthe based pixel on is processed weighted meanin Stage filtering 3. and the distribution characteristics of the pixels. For each noise, the pixels g, if the number of noise-free pixels in W (g) is ïì 0, if g is in BFR 5 greater than 0, then the method in 1 isF( usedg ) = í for denoising; otherwise, the method in 2 is used. (5) îï 255, if g is in WFR 1. In the spatial filtering theory, corrupted pixels can be restored using the normalized weighted mean of all pixels in the neighborhood. The noise restored value can be calculated as (3). Replace 2.3. Stagethe noise3: Noise pixel Removal value by with Iterative the restored Approach value, and set R(g) = 0. For the images with high-density noises, as the pixels of a small neighborhood may all be P destroyed, it is difficult to calculate the restoration(r,s) D w(r, s )valueI (i + basedr, j + s )on noise-free pixels in a small F(i, j) = ∈ P (3) neighborhood, and thus, a wider window of the pixels(r,s) D wis( required.r, s) However, too large of a filtering ∈ Here, D is the noise-free pixels group in window W,(i, j) is the coordinate of pixel g,(r, s) is the relative coordinate with (i, j) as the center, and w(r, s) is the weighted function (4), which can be obtained from p w(r, s) = 1/ r2 + s2 (4)

In general, the value of a pixel is closer to the value of its neighboring pixels than the values of far pixels. The median filter takes the median value of pixels in the window as the restoration value of noise pixels, and cannot reflect the difference of the spatial position of pixels. To overcome such a defect, a distanced weighted method is proposed for denoising in this paper. The weighted coefficients are formed to be a center symmetric weight matrix whose values gradually decrease with the increase of distance, as shown in Figure2b. Such a treatment can well reflect the local correlation between pixels, thereby reducing the loss of detail and avoiding image blur.

2. If g is in the extreme intensity flat regions, then the recovery step is performed according to the formula (5) and set R(g) = 0; otherwise, the pixel is processed in Stage 3.

( 0, if g is in BFR F(g) = (5) 255, if g is in WFR Symmetry 2020, 12, 1990 6 of 12

2.3. Stage 3: Noise Removal by Iterative Approach For the images with high-density noises, as the pixels of a small neighborhood may all be destroyed, it is difficult to calculate the restoration value based on noise-free pixels in a small neighborhood, Symmetryand thus, 2020 a,wider 12, x FOR window PEER REVIEW of the pixels is required. However, too large of a filtering window6 mayof 13 result in blurring and unnecessary distortion. If the large window does not contain noise-free pixels, windowsome filters may replace result thein blurring intensity and of noisy unnecessary pixels with distortion. the previously If the large processed window pixel does or thenot meancontain of processednoise-free pixelspixels, in some the neighborhood,filters replace the such intensity as References of noisy [17 pixels,31], which with the will previously lead the restoration processed image pixel orto the have mean a streaking of processed effect pixels or artifacts. in the neighborhood Such problems, such can as be References solved by [17,31], usingan which iterative will lead filter the to producerestoration higher image quality to have images. a streaking effect or artifacts. Such problems can be solved by using an iterativeFor eachfilter pixelto produceg in image higher I, thequality iterative images. procedure can be described as follows. For each pixel g in image I, the iterative procedure can be described as follows. 1. For each pixel g with R(g) = 1, process g by the method proposed in stage 2. 1. For each pixel g with R(g) = 1, process g by the method proposed in stage 2. 2. If R is not a zero matrix, repeat 1 until R becomes a zero matrix, but use the last reconstruct image 2. If R is not a zero matrix, repeat 1 until R becomes a zero matrix, but use the last reconstruct image as the input image. Otherwise, leave it unchanged. If all pixels in the image are noisy pixels, as the input image. Otherwise, leave it unchanged. If all pixels in the image are noisy pixels, then then the procedure should stop. the procedure should stop. Taking a a noise noise image, image, for for example, example, the the denoising denoising procedure procedure can be can describe be described,d, as shown as shown in Figure in 3.Figure The 3image. The segment image segment obtained obtained from “Lena. from “Lena.jpg” is chosen jpg” is chosenfor illustration, for illustration, and it is and corrupted it is corrupted by salt- and-pepperby salt-and-pepper noise with noise a density with a densityof 70%. of 70%.

Figure 3. A specific specific illustration of the proposed method.

3. Simulation Results To evaluate the the performance performance of of th thee proposed proposed algorithm, algorithm, we weused used several several pictures pictures (Figure (Figure 4) and4) 100and natural 100 natural images images (Figure (Figure 5) 5from) from the the UC UC Berkel Berkeleyey dataset dataset [33]. [ 33]. All All experiments experiments were were performed performed using a PC withwith InteI)InteI) I(TM)I(TM) i5-9893i5-9893 CPU CPU @ @ 3.10 3.10 GHZ, GHZ, 16GB 16GB RAM. RAM. The The program program codes codes were were written written in inC++ C++.. In In experiments, experiments, the the performance performance of the of proposedthe proposed filter filter was comparedwas compared with severalwith several state-of-the-art state-of- the-artfilters, suchfilters, as such ASWMF as ASWMF [12], AFMF [12], AFMF [9], DAMF [9], DAMF [10], DBA[10], [DBA19], AWMF[19], AWMF [26], TSF[26], [TSF20], [20], FSMMF FSMMF [31], [31],MDBMF MDBMF [17], and[17], ERMI and ERMI [28], in [28], terms in of terms the PSNR of the (peak PSNR signal (peak to noisesignal ratio), to noise the SSIMratio), (structural the SSIM (structuralsimilarity index), similarity visual index), perception, visual perception, and the average and the processing average time.processing The PSNR time. and The SSIM PSNR are and defined SSIM areas follows: defined as follows: m n 2552 PSNR = 10 lg × × 2 (6) P m Pmn n255 2 PSNR  10×lg ( f (i, j) g(i, j)) im=1 nj=1 − 2 (6)  i1 j1( f (i, j)  g(i, j)) (2u u  C )(2  C ) f g 1 fg 2 SSIM  2 2 2 2 (7) (u f  u g  C1 )( f   g  C2 )

2 2 C1  (K1L) , C2  (K 2 L) (8) where f is the original image, g is the denoising image, and m and n are the length and width of the image, respectively; uf and ug are the mean of f and g, respectively; σf and σg are the standard deviation

Symmetry 2020, 12, 1990 7 of 12

(2u f ug + C1)(2δ f g + C2) SSIM = (7) ( 2 + 2 + )( 2 + 2 + ) u f ug C1 δ f δg C2

2 2 C1 = (K1L) , C2 = (K2L) (8)

Symmetrywhere f 2020is the, 12, originalx FOR PEER image, REVIEWg is the denoising image, and m and n are the length and width7 of 13 of Symmetry 2020, 12, x FOR PEER REVIEW 7 of 13 the image, respectively; uf and ug are the mean of f and g, respectively; σf and σg are the standard ofdeviation f and g, respectively; of f and g, respectively; σfg is the covarianceσfg is the covariancebetween uf betweenand ug; Cu1 andf and Cu2 gare; C 1constantsand C2 are used constants to maintain used of f and g, respectively; σfg is the covariance between uf and ug; C1 and C2 are constants used to maintain stability,to maintain where stability, L = 255 where is theL dynamic= 255 isthe range dynamic of pixel range values, of pixel and K values,1 = 0.01, and K2 =K 0.03.= 0.01, K = 0.03. stability, where L = 255 is the dynamic range of pixel values, and K1 = 0.01, K2 = 0.03.1 2

(a)(a ) ((bb)) ((cc)) (d()d )

FigureFigure 4. 4. SeveralSeveral Several test testtest images: images:images: (( aa))) Lena,Lena, Lena, ( (bb))) Peppers,Peppers, Peppers, ( (c (c)c ))Barbara, Barbara, Barbara, and and and (d ( ()dd Boat.)) Boat. Boat.

(a) (b) (c) (a) (b) (c) Figure 5. Several images of the UC Berkeley dataset: (a) Test018, (b) Test006, and (c) Training098. FigureFigure 5. 5. SeveralSeveral images images of of the the UC UC Berkeley Berkeley dataset: dataset: (a (a) )Test018, Test018, ( (bb)) Test006, Test006, and and ( (cc)) Training098. Training098. 3.1. Evaluate by Visual Perception and Quantitative Measurements 3.1.3.1. Evaluate Evaluate by by Visual Visual Percepti Perceptionon and and Quantitative Quantitative Measurements Figures 6–8 show the restored images using IWMF and several filters for the images Lena and Figures6–8 show the restored images using IWMF and several filters for the images Lena and Test018Figures corrupted 6–8 show by noisethe restored density 0.9images and Test006using IWMF corrupted and by several noise densityfilters for 0.8. the It can images obviously Lena be and Test018 corrupted by noise density 0.9 and Test006 corrupted by noise density 0.8. It can obviously be Test018seen from corrupted the reconstructed by noise density images 0.9 that and the Test006 ASWMF corr andupted AFMF by noisefailed densityto remove 0.8. noises It can thoroughly. obviously be seenseenThe from from DAMF the the demonstratedreconstructed good images images nois that thate removal the the ASWMF ASWMF capabilities; and and AFMFhowever, AFMF failed failed the torestored to remove remove images noises noises still thoroughly. thoroughly. contain Thesome DAMF subtle demonstrated noisy dots. The good AWMF, nois noisee TSF,removal and FSMMFcapabilities; outperformed however, however, the the previous restored filters images in removingstill contain somesomenoise subtle subtle thoroughly, noisy noisy dots. dots. but Theintroduced The AWMF, AWMF, a TSF,blur effect and FSMMF on the restored outperformed image. the The previous ERMI over filters filters smoothed in removing the noisenoiseimages thoroughly, thoroughly, and lost somebut introduced details for thea a blur high-densi effect effect onty noise the restoredrestored images. The image. DBA The and ERMI MDBMF over were smoothed affected the imagesimagesby a streakingand and lost lost some someeffect detailsto details an extent, for for the the which high-densi high-density degradedty noise noisethe quality images. images. of Thethe The restored DBA DBA and and images. MDBMF MDBMF Comparatively, were were affected affected byby thea streaking IWMF showed effect effect superiorto an extent, performance which degraded in terms of the noise quality removal of of the and restored detail preservation. images. Comparatively, Comparatively, thethe IWMF IWMFIn Figure showed showed 7, due superior superior to a certain performance performance number inof in tepixels termsrms ofwi of noiseth noise extreme removal removal intensity and and detail values detail preservation. in preservation. the original image, theInIn results Figure Figure generated 77,, duedue toto aby certain SAMF, number ASWMFF, of pixels FSMMF, wi withth extreme and ERMI intensity were highly values unsatisfactory. in the original image, The thetheMDBMF resultsresults generatedreplacesgenerated a by pixelby SAMF, SAMF, with ASWMFF, the ASWMFF, previous FSMMF, FSMMF,pixel and wh ERMIenand there ERMI were is highlystillwere no unsatisfactory. highlynoise-free unsatisfactory. pixel The in MDBMF5 × The5 neighborhoods, which caused the restored image to suffer from the streaking effect. The TSF caused MDBMFreplaces areplaces pixel with a pixel the previous with the pixel previous when therepixel iswh stillen nothere noise-free is still pixelno noise-free in 5 5 neighborhoods,pixel in 5 × 5 a large number of pixels with an intensity of 255 to be destroyed. The IWMF performed× well in neighborhoods,which caused the which restored caused image the to restored suffer from image the to streaking suffer from effect. the The streaking TSF caused effect. a The large TSF number caused of removing the noise in extreme intensity flat regions and was able to generate the highest quality apixels large with number an intensity of pixels of with 255 toan be intensity destroyed. of 255 The to IWMF be destroyed. performed The well IWMF in removing performed the noisewell in images. removingextreme intensity the noise flat in regions extreme and intensity was able flat to generateregions and the highestwas able quality to generate images. the highest quality Tables1–3 provide the comparative results of the IWMF and other filters in terms of the PSNR images. and SSIM using the Lena, Test018, Boat, and Training098 images corrupted with the noise densities ranging from 0.1 to 0.9. The proposed IWMF showed the best noise removal performance of all the filters, according to the values of PSNR and SSIM. The FSMMF and DBA were barely satisfactory, and the DBA produced the lowest PSNR and SSIM in most ranges of the noise density. The ERMI

Symmetry 2020, 12, 1990 8 of 12 was effective in removing low-density salt-and-pepper noises but was not suitable for high-density noises removal. The values of PSNR and SSIM for the TSF, MDBMF, DAMF, and ERMI filters were close to each other but lower than the values of IWMF. We further inferred from Figure9 that the IWMF produced the highest values of PSNR and SSIM at noise densities ranging from 0.1 to 0.9, which indicates that the IWMF gave the best performances in preserving image details and generating the highest quality images. Symmetry 2020, 12, x FOR PEER REVIEW 8 of 13 Symmetry 2020, 12, x FOR PEER REVIEW 8 of 13

(a) (b) (c) (d) (a) (b) (c) (d)

(e) (f) (g) (h) (e) (f) (g) (h)

((ii)) (j) ((kk)) (l()l ) Figure 6. Visual perception of IWMF versus different methods on Test018: (a) Original image, (b) FigureFigure 6. 6.Visual Visual perception perception of of IWMF IWMF versus versus different different methods methods on Test018:on Test018: (a) Original (a) Original image, image, (b) Noisy (b) imageNoisyNoisy ofimage image density of of density density 0.9, (c) AFMF, 0.9,0.9, ((cc)) (AFMF,AFMF,d) ASWMF, (d) ASWMF, (e) TSF, (((fe))) DBA, TSF,TSF, (( ffg))) DBA,DBA, FSMMF, ( (gg)) FSMMF, (FSMMF,h) ERMI, ( h(h ()i )ERMI, ERMI, AWMF, ( i()i( )AWMF,j )AWMF, DAMF, ((kj()j) )DAMF, MDBMF,DAMF, ( (kk and)) MDBMF, MDBMF, (l) IWMF. andand ((ll)) IWMF.IWMF.

((aa)) (b) ((cc)) (d(d) )

((ee)) (f) ((gg)) (h(h) )

((ii)) (j) ((kk)) (l()l )

FigureFigure 7. 7.7. Visual VisualVisual perception perceptionperception of ofof IWMF IWMF versus versus diff differenterent methods methodsmethods on Test006: onon Test006:Test006: (a) Original ((aa)) OriginalOriginal image, image, image, (b) Noisy ( b(b) ) imageNoisyNoisy ofimage image density of of density density 0.8, (c) AFMF, 0.8,0.8, ((cc)) (AFMF,AFMF,d) ASWMF, (d) ASWMF, (e) TSF, ( ((fe))) DBA, TSF,TSF, ( (fgf))) DBA,DBA, FSMMF, ( (gg)) FSMMF, (FSMMF,h) ERMI, ( h( (hi)) )ERMI, AWMF,ERMI, ( i()i( )jAWMF, )AWMF, DAMF, ((kj()j) )DAMF, MDBMF,DAMF, ( (kk ()l) )MDBMF, MDBMF, IWMF. ((ll)) IWMF.IWMF.

TablesTables 1–3 1–3 provideprovide thethe comparativecomparative results of the IWMFIWMF andand otherother filtersfilters in in terms terms of of the the PSNR PSNR andand SSIM SSIM using using thethe Lena,Lena, Test018,Test018, Boat, and Training098 imagesimages corruptedcorrupted with with the the noise noise densities densities rangingranging from from 0.10.1 toto 0.9.0.9. TheThe propproposed IWMF showed the bestbest noisenoise removalremoval performance performance of of all all the the filters,filters, according according toto thethe valuesvalues ofof PSNRPSNR and SSIM. TheThe FSMMFFSMMF andand DBADBA werewere barely barely satisfactory, satisfactory, andand the the DBADBA producedproduced thethe lowestlowest PSNR and SSIM in mostmost rangesranges ofof thethe noisenoise density. density. The The ERMI ERMI waswas effective effective inin removingremoving low-densitylow-density salt-and-pepper noisesnoises butbut waswas notnot suitable suitable for for high-density high-density noisesnoises removal. removal. TheThe valuesvalues ofof PSNRPSNR and SSIM for the TSF,TSF, MDBMF,MDBMF, DAMF,DAMF, and and ERMI ERMI filters filters were were closeclose to to eacheach otherother butbut lowerlower thanthan the values of IWMF. WeWe furtherfurther inferredinferred fromfrom Figure Figure 9 9 that that the the

Symmetry 2020, 12, x FOR PEER REVIEW 9 of 13

IWMF produced the highest values of PSNR and SSIM at noise densities ranging from 0.1 to 0.9, Symmetry 2020, 12, 1990 9 of 12 which indicates that the IWMF gave the best performances in preserving image details and generating the highest quality images.

(a) (b) (c) (d)

(e) (f) (g) (h)

(i) (j) (k) (l)

Figure 8. FigureVisual 8.perception Visual perception of IWMF of IWMF versus versusdi differentfferent methods methods on Lena: on Lena: (a) Original (a) Original image, (b image,) Noisy (b) Noisy image of density 0.9, (c) AFMF, (d) ASWMF, (e) TSF, (f) DBA, (g) FSMMF, (h) ERMI, (i) AWMF, (j) image of density 0.9, (c) AFMF, (d) ASWMF, (e) TSF, (f) DBA, (g) FSMMF, (h) ERMI, (i) AWMF, (j) DAMF, DAMF, (k) MDBMF, and (l) IWMF. (k) MDBMF, and (l) IWMF. Table 1. The PSNR and SSIM of IGMF versus different methods on Lena. Table 1. The PSNR and SSIM of IGMF versus different methods on Lena. Noise Density, % 10 30 50 70 90 10 30 50 70 90 Noise Density, % 10 30 PSNR 50 (dB) 70 90 10 SSIM 30 (%) 50 70 90 AFMF 37.9 34.9 31.8 29.0 23.1 97.8 94.9 91.6 85.8 70.2 DBA 40.5 PSNR34.8 30.4 (dB) 26.1 19.9 98.6 94.8 90.5 SSIM80.1 56.5 (%) ASWMF 42.2 36.1 32.3 29.0 23.8 98.9 96.3 92.3 85.7 67.2 AFMFTSF 37.943.2 34.9 36.8 31.8 33.0 29.030.2 27.1 23.1 98.9 97.896.5 93.1 94.9 87.9 91.6 80.2 85.8 70.2 DBAAWMF 40.5 39.6 34.8 36.7 30.4 32.3 26.128.2 24. 19.95 98.9 98.696.0 91.9 94.8 84.1 90.5 76.4 80.1 56.5 ASWMFDAMF 42.2 43.2 36.1 36.9 32.3 33.1 29.030.1 27. 23.80 99.1 98.996.5 93.0 96.3 87.8 92.3 80.1 85.7 67.2 TSFFSMMF 43.2 40.9 36.8 34.3 33.0 30.5 30.227.9 23.9 27.1 98.7 98.995.2 89.6 96.5 83.7 93.1 73.2 87.9 80.2 AWMFERMI 39.642.2 36.7 36.9 32.3 31.7 28.229.5 25.7 24.5 99.0 98.996.6 91.7 96.0 86.7 91.9 75.3 84.1 76.4 DAMFMDBMF 43.2 42.7 36.9 36.6 33.1 33.0 30.130.1 26. 27.01 99.0 99.196.5 93.0 96.5 87.7 93.0 77.8 87.8 80.1 IWMF 43.3 37.6 34.0 31.0 27.1 99.1 96.9 93.8 89.3 80.3 FSMMF 40.9 34.3 30.5 27.9 23.9 98.7 95.2 89.6 83.7 73.2 ERMI 42.2 36.9 31.7 29.5 25.7 99.0 96.6 91.7 86.7 75.3 Table 2. The PSNR and SSIM of Test018 versus different methods on Test018. MDBMF 42.7 36.6 33.0 30.1 26.1 99.0 96.5 93.0 87.7 77.8 IWMFNoise Density, 43.3 % 37.610 30 34.050 31.070 90 27.1 10 99.130 96.950 70 93.8 90 89.3 80.3 PSNR (dB) SSIM (%) AFMF 37.5 36.5 32.8 30.5 24.9 96.2 97.2 94.7 89.3 78.6 Table 2. TheDBA PSNR and 40.2 SSIM34.6 of31.9 Test018 27.2 versus20.4 98.5 diff erent95.3 methods86.6 80.2 on 70.6 Test018. ASWMF 43.0 37.0 33.3 30.1 25.4 99.3 97.5 94.5 89.2 71.9 Noise Density, % 10 30 50 70 90 10 30 50 70 90 PSNR (dB) SSIM (%) AFMF 37.5 36.5 32.8 30.5 24.9 96.2 97.2 94.7 89.3 78.6 DBA 40.2 34.6 31.9 27.2 20.4 98.5 95.3 86.6 80.2 70.6 ASWMF 43.0 37.0 33.3 30.1 25.4 99.3 97.5 94.5 89.2 71.9 TSF 43.5 36.9 33.7 30.6 27.5 99.2 97.3 94.5 89.4 84.5 AWMF 40.5 35.6 31.5 26.9 25.0 99.0 96.8 94.3 89.2 71.8 DAMF 43.5 36.9 33.8 30.4 27.3 99.3 97.3 94.7 89.2 84.3 FSMMF 41.3 34.9 31.8 29.5 26.8 99.1 96.2 92.2 87.2 78.5 ERMI 42.1 36.7 32.5 30.1 27.8 99.2 97.4 92.9 88.6 80.7 MDBMF 42.7 36.8 33.6 30.9 27.8 99.3 97.4 94.6 90.6 83.3 IWMF 44.0 37.9 34.8 31.7 28.5 99.5 98.0 95.8 91.9 84.5 Symmetry 2020, 12, x FOR PEER REVIEW 10 of 13

TSF 43.5 36.9 33.7 30.6 27.5 99.2 97.3 94.5 89.4 84.5 AWMF 40.5 35.6 31.5 26.9 25.0 99.0 96.8 94.3 89.2 71.8 DAMF 43.5 36.9 33.8 30.4 27.3 99.3 97.3 94.7 89.2 84.3 FSMMF 41.3 34.9 31.8 29.5 26.8 99.1 96.2 92.2 87.2 78.5 Symmetry 2020, 12, 1990 ERMI 42.1 36.7 32.5 30.1 27.8 99.2 97.4 92.9 88.6 80.7 10 of 12 MDBMF 42.7 36.8 33.6 30.9 27.8 99.3 97.4 94.6 90.6 83.3 IWMF 44.0 37.9 34.8 31.7 28.5 99.5 98.0 95.8 91.9 84.5 Table 3. The PSNR and SSIM of IWMF versus different methods on Training098. Table 3. The PSNR and SSIM of IWMF versus different methods on Training098. Noise Density, % 10 30 50 70 90 10 30 50 70 90 Noise Density, % 10 30PSNR 50 (dB) 70 90 10 30 50 SSIM 70 (%) 90 PSNR (dB) SSIM (%) AFMFAFMF 34.3 34.3 32.1 32.1 30.730.7 27.127.1 23. 23.55 95.3 95.3 92.9 92.9 88.0 88.079.8 79.868.2 68.2 DBADBA 36.1 36.1 31.2 31.2 28.128.1 23.523.5 18. 18.99 97.2 97.2 90.1 90.1 80.6 80.673.2 73.259.9 59.9 ASWMFASWMF 38.9 38.9 33.4 33.4 30.130.1 27.327.3 23. 23.11 98.6 98.6 95.0 95.0 89.5 89.581.2 81.260.8 60.8 TSFTSF 39.139.1 33.3 33.3 30.530.5 28.328.3 25.2 25.2 98.5 98.5 95.1 95.1 89.9 89.983.4 83.471.5 71.5 AWMFAWMF 38.0 38.0 33.2 33.2 30.130.1 27.427.4 22. 22.55 98.4 98.4 94.5 94.5 88.5 88.580.2 80.260.0 60.0 DAMFDAMF 39.1 39.1 33.5 33.5 30.630.6 28.128.1 25. 25.00 98.5 98.5 95.2 95.2 90.1 90.182.9 82.971.4 71.4 FSMMFFSMMF 38.138.1 32.0 32.0 28.828.8 26.626.6 24.4 24.4 98.3 98.3 93.4 93.4 86.3 86.378.1 78.165.5 65.5 ERMIERMI 39.039.0 33.9 33.9 29.429.4 27.427.4 25.2 25.2 98.6 98.6 95.3 95.3 86.7 86.779.1 79.166.5 66.5 MDBMFMDBMF 39.139.1 33.6 33.6 30.530.5 28.028.0 25.1 25.1 98.6 98.6 95.1 95.1 90.0 90.082.9 82.970.6 70.6 IWMFIWMF 40.3 40.3 34.7 34.7 31.431.4 28.628.6 25. 25.66 98.9 98.9 96.1 96.1 91.6 91.684.3 84.371.6 71.6

(a) (b)

FigureFigure 9. Versus 9. Versus diff differenterent methods methods on on 100100 naturalnatural imag imageses in in terms terms of ofthe the average average values values of (a) ofPSNR, (a) PSNR, and (andb) SSIM.(b) SSIM.

3.2. Evaluate3.2. Evaluate by Computationalby Computational Time Time TheThe CPU CPU elapsed elapsed time time is is an an important important index to to evaluate evaluate the the performance performance of the of filter. the filter. Table Table4 4 illustratesillustrates the the average average CPU CPU processing processing time time ofof the discussed discussed seven seven filters filters for for100 100natural natural images images with with size 481 × 321. These images were corrupted by salt-and-pepper noise with densities ranging from size 481 321. These images were corrupted by salt-and-pepper noise with densities ranging from 0.1 to× 0.9. For each method, the execution time increased with the increasing noise density, except for 0.1 toAWMF. 0.9. For The each AFMA method, had the thelongest execution processing time time, increased due to the with complexity the increasing of denoising noise strategy. density, The except for AWMF.denoising The strategies AFMA of had the the ASWMF longest and processing AFMF mean time,t they due processed to the complexity more pixels of than denoising the other strategy. The denoisingmethods, which strategies prolonged of the the ASWMF execution and time. AFMF meant they processed more pixels than the other methods,The which execution prolonged time of the the execution MDBWF and time. FSMMF were close to each other, and at a medium level. The ERMI and IWMF, by using the mean-based filtering instead of median-based filtering and withoutTable 4. sortingThe average pixel processingvalues, showed times the were best obtained performance by the in denoising the computing methods and for processing 100 natural time. images. In addition, the use of small windows also played an important role in improving efficiency. Noise Density, % 10 20 30 40 50 60 70 80 90

Time (ms) AFMF 22.44 23.61 28.97 36.16 50.77 60.25 70.97 94.59 116.6 DBA 12.07 12.66 13.25 13.25 13.31 13.25 13.31 13.42 12.84 ASWMF 7.95 19.79 21.91 22.49 25.15 28.74 33.04 34.51 29.68 TSF 2.53 6.07 7.71 7.77 8.18 8.95 9.37 7.25 7.18 AWMF 28.38 26.62 26.21 25.79 24.79 24.85 24.44 24.03 23.67 DAMF 2.54 6.05 7.68 7.72 8.07 8.99 9.18 7.19 7.21 FSMMF 3.59 6.12 9.54 13.61 16.37 16.93 19.14 19.91 19.96 ERMI 0.94 1.59 2.29 3.29 9.77 10.36 10.48 11.36 23.09 MDBMF 2.29 5.59 7.42 7.01 7.95 8.54 8.66 6.18 6.01 IWMF 0.76 1.06 1.35 1.82 2.29 3.01 3.59 4.24 4.59 Symmetry 2020, 12, 1990 11 of 12

The execution time of the MDBWF and FSMMF were close to each other, and at a medium level. The ERMI and IWMF, by using the mean-based filtering instead of median-based filtering and without sorting pixel values, showed the best performance in the computing and processing time. In addition, the use of small windows also played an important role in improving efficiency.

4. Discussion In this paper, we proposed an efficient salt-and-pepper noise removal filter, the iterative weighted mean filter (IWMF). In the noise detection stage, the extreme value and the distribution characteristics of the noisy image were used to identify the noise pixels, which overcame the problem of the inaccurate noise detection of traditional switching filters. In the noise removal stage, a weighted mean filter was applied to restore the noisy image, and this was performed iteratively. Comparatively, this noise removal technique effectively avoided the problem of detail blur and streaking effects, especially with high-density noise. Extensive simulation results demonstrate that the proposed filter outperformed other existing state-of-the-art filters in visual perception and quantitative measurements. Due to the efficient filter framework and low computational complexity, IWMF is very suitable for real-time implementation.

Author Contributions: Conceptualization, F.C. and Y.L.; methodology, F.C.; software, F.C.; validation, M.H.; formal analysis, Z.M.; investigation, Z.M. and F.C.; resources, M.H.; writing—original draft preparation, F.C.; writing—review and editing, Y.L.; visualization, Y.L.; supervision, M.H.; project administration, M.H. and Q.H.; funding acquisition, M.H. and Q.H. All authors have read and agreed to the published version of the manuscript. Funding: Guangxi Specially-invited Experts Foundation of Guangxi Zhuang Autonomous Region, China (GuiRenzi2019(13)). Acknowledgments: This work was supported by Guangxi Specially-invited Experts Foundation of Guangxi Zhuang Autonomous Region, China (GuiRenzi2019(13)). Conflicts of Interest: The authors declare no conflict of interest.

References

1. Sundaramurthy, S. , 2nd ed.; Oxford University Press: Oxford, UK, 2016. 2. Chen, J.Y.; Zhan, Y.W.; Cao, H.Y.; Xiong, G.Q. Iterative grouping median filter for removal of fixed value impulse noise. IET Image Proc. 2019, 13, 946–953. [CrossRef] 3. Tukey, J.W. Exploratory Data Analysis. J. Am. Stat. Assoc. 1977, 28.[CrossRef] 4. Bhadouria, V.S.; Ghoshal, D.; Siddiqi, A.H. A new approach for high density saturated impulse noise removal using decision-based coupled window median filter. Signal Image Video Process. 2014, 8, 71–84. [CrossRef] 5. Charalampidis, D. Steerable Weighted Median Filters. IEEE Trans. Image Process. IEEE Signal Process. Soc. 2010, 19, 882–894. [CrossRef] 6. Chen, J.; Zhan, Y.; Cao, H. Iterative deviation filter for fixed-valued impulse noise removal. Multimed. Tools Appl. 2020, 79, 23695–23710. [CrossRef] 7. Chen, J.; Zhan, Y.; Cao, H.; Wu, X. Adaptive probability filter for removing salt and pepper noise. IET Image Proc. 2018, 12, 863–871. [CrossRef] 8. 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. [CrossRef] 9. Erkan, U.; Enginolu, S.; Thanh, D.N.H.; Minh, H.L. Adaptive Frequency Median Filter for the Salt and Pepper Denoising Problem. IET Image Proc. 2020, 14, 1291–1302. [CrossRef] 10. Erkan, U.; Gokrem, L.; Enginolu, S. Different applied median filter in salt and pepper noise. Comput. Electr. Eng. 2018, 70, 789–798. [CrossRef] 11. Esakkirajan, S.; Veerakumar, T.; Subramanyam, A.N.; Premchand, C.H. Removal of High Density Salt and Pepper Noise through Modified Decision Based Unsymmetric Trimmed Median Filter. IEEE Signal Process. Lett. 2011, 18, 287–290. [CrossRef] 12. Faragallah, O.S.; Ibrahem, H.M. Adaptive switching weighted median filter framework for suppressing salt-and-pepper noise. AEU Int. J. Electron. Commun. 2016, 70, 1034–1040. [CrossRef] Symmetry 2020, 12, 1990 12 of 12

13. Hsieh, M.H.; Cheng, F.C.; Shie, M.C.; Ruan, S.-J. Fast and efficient median filter for removing 1–99% levels of salt-and-pepper noise in images. Eng. Appl. Artif. Intell. 2013, 26, 1333–1338. [CrossRef] 14. Hwang, H.; Haddad, R.A. Adaptive median filters: New algorithms and results. IEEE Trans. Image Process. 1995, 4, 499–502. [CrossRef] 15. Ibrahim, H.; Kong, N.S.P.; Ng, T.F. Simple adaptive median filter for the removal of impulse noise from highly corrupted images. IEEE Trans. Consum. Electron. 2008, 54, 1920–1927. [CrossRef] 16. Khan, S.; Lee, D.H. An adaptive dynamically weighted median filter for impulse noise removal. EURASIP J. Adv. Signal. Process. 2017, 1–4. [CrossRef] 17. Kunsoth, R.; Biswas, M. Modified decision based median filter for impulse noise removal. In Proceedings of the IEEE International Conference on Wireless Communications, and Networking, Chennai, India, 23–25 March 2016; pp. 1316–1319. 18. Park, H. Making Joint-Histogram-Based Weighted Median Filter Much Faster. IEICE Trans. Inf. Syst. 2015, 98, 721–725. [CrossRef] 19. Srinivasan, K.S.; Ebenezer, D. A New Fast and Efficient Decision-Based Algorithm for Removal of High-Density Impulse Noises. IEEE Signal Process. Lett. 2007, 14, 189–192. [CrossRef] 20. Thanh, D.N.H.; Hai, N.H.; Prasath, S.; Minh, H.L.; Tavares, J.M.R.S. A Two-Stage Filter for High Density Salt and Pepper Denoising. Multimed. Tools Appl. 2020, 79, 21013–21035. [CrossRef] 21. Erkan, U.; Gokrem, L. A new method based on pixel density in salt and pepper noise removal. Turk. J. Electr. Eng. Comput. Sci. 2018, 26, 162–171. [CrossRef] 22. Yuan, S.; Tan, Y. Impulse noise removal by a global–local noise detector and adaptive median filter. Signal Process. 2006, 86, 2123–2128. [CrossRef] 23. Zhang, Z.; Han, D.; Dezert, J.; Yang, Y. A new adaptive switching median filter for impulse with pre-detection based on evidential reasoning. Signal Process. 2018, 147, 173–189. [CrossRef] 24. Goel, N.; Aggarwal, P. Enhanced Modified Decision-Based Unsymmetric Trimmed Adaptive Neighborhood Winsorized Mean Filter for Removing 1–99% Levels of Salt-and-Pepper Noise. Iran. J. Sci. Technol. Trans. Electr. Eng. 2019, 43, 459–468. [CrossRef] 25. Iqbal, N.; Ali, S.; Khan, I.; Lee, B. Adaptive Edge Preserving Weighted Mean Filter for Removing Random-Valued Impulse Noise. Symmetry 2019, 11.[CrossRef] 26. Chen, J.; Huang, N.; Xiong, G.; Cao, H.; Xu, Q. Adaptive weighted mean filtering algorithm based on confidence interval. J. Nanjing Univ. Sci. Technol. 2017, 22, 1538–1575. 27. Nasri, M.; Saryazdi, S.; Nezamabadi-Pour, H. A Fast Adaptive Salt and Pepper Noise Reduction Method in Images. Circuits Syst. Signal Process. 2013, 32, 1839–1875. [CrossRef] 28. Ramadan, Z.M. Efficient Restoration Method for Images Corrupted with Impulse Noise. Circuits Syst. Signal Process. 2012, 31, 1397–1406. [CrossRef] 29. Wang, X.; Shen, S.; Shi, G.; Xu, Y.; Zhang, P. Iterative non-local means filter for salt and pepper noise removal. J. Vis. Commun. Image Represent. 2016, 34, 440–450. [CrossRef] 30. Zhang, P.; Li, F. A New Adaptive Weighted Mean Filter for Removing Salt-and-Pepper Noise. IEEE Signal Process. Lett. 2014, 21, 1280–1283. [CrossRef] 31. Vijaykumar, V.R.; Santhana Mari, G.; Ebenezer, D. Fast switching based median–mean filter for high density salt and pepper noise removal. EURASIP J. Adv. Signal Process. 2014, 68, 1145–1155. [CrossRef] 32. Zhang, C.; Wang, K. A switching median–mean filter for removal of high-density impulse noise from digital images. Optik 2015, 126, 956–961. [CrossRef] 33. The UC Berkeley Dataset. Available online: https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/ bsds/BSDS300/html/dataset/images.html (accessed on 31 October 2020).

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 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/).