# Impulsive Noise Removal with an Adaptive Weighted Arithmetic Mean Operator for Any Noise Density
## 3 Weighted Arithmetic Mean Based Fuzzy Filter Algorithm
### Noise Detection Phase Based on Fuzzy Open-Close Operators
With respect to the most competitive filters such as AWAM, Jourabloo, Hosseini and Wang, all of them have higher average processing times but still inferior to 1 s for noise densities less than 85%. For noise densities greater than 90%, the computation time of the AWAM filter is higher than most of the other methods but (i) its performance compensates it and (ii) this time could be greatly reduced by parallel computing. The experiments were performed in MATLAB R2020b with a Windows 10 operating system with 16 Gb of RAM memory and an Intel(R) Core(TM) i7-10750H CPU @ 2.60 GHz 2.59 GHz. Figure 8: Restoration results of Hosseini, Wang and AWAM filters for the original image 4.1.07.tiff corrupted with 60% salt-and-pepper noise. Figure 9: Restoration results of Wang and AWAM filters when applied to the original images shown in the first column, corrupted with high levels of salt-and-pepper noise. ## 5 Conclusions and Future Work

In this work the AWAM filter was presented. This filter is a new salt-and-pepper noise filter that uses a fuzzy mathematical morphology-based noise detection function,

Figure 10: Evolution of the average computational processing times of all the filters for the images of the test set with respect to the considered noise densities. (**a**) Complete figure. (**b**) Zoomed figure for processing times less than 1 s.

followed by an adaptive filtering phase formulated on a weighted arithmetic mean. Two main phases are clearly differentiated: a noise detection phase and a filtering phase. First, a noise detection function classifies each pixel of the image as corrupt or not based on some alternate morphological filters. This detection function is suitable even when a 98% of salt-and-pepper noise has affected an image. In the final phase the gray-level values of those pixels classified as corrupt in the first phase are restored. Given a noisy pixel, its gray-level is restored through an aggregation of the gray-level values of the neighboring noncorrupted pixels by means of an adaptive weighted arithmetic mean operator. An in-depth evaluation of the performance of the filter is also carried out. The optimal values for the parameters of the AWAM filter were determined for each noise density and performance measure (MSE, M-SSIM, PSNRHVS and VIF) by using a training set. Then, a comparison in a test set whose images had been corrupted with salt-and-pepper noise densities in \(\{5\%,10\%,15\%,\ldots,95\%,98\%\}\) was made with other 15 top salt-and-pepper noise filters. Both from the visual and numerical standpoints, the proposed filter outperforms all the competition. More specifically, in accordance with the PSNRHVS performance measure, the AWAM filter obtains significantly the best results for 9 noise densities and not significantly for 10 noise densities. Similar results were obtained for the other performance measures. Finally, the basis of the future work we want to develop is to make some adjustments to the AWAM filter in order to be able to remove general impulsive noise or Gaussian noise. Conceptualization, M.G.-H., S.M., A.M. and D.R.-A. ; methodology, M.G.-H., S.M., A.M. and D.R.-A. ; software, M.G.-H., S.M., A.M. and D.R.-A. ; validation, M.G.-H., S.M., A.M. and D.R.-A. ; formal analysis, [PERSON]-H., S.M., A.M. and D.R.-A. ; investigation, [PERSON]-H., S.M., A.M. and D.R.-A. ; resources, [PERSON]-H., S.M., A.M. and D.R.-A. ; data curation, [PERSON]-H., S.M., A.M. and D.R.-A. ; writing--original draft preparation, [PERSON]-H., S.M., A.M. and D.R.-A. ; writing--review and editing, [PERSON]-H., S.M., A.M. and D.R.-A. ; visualization, [PERSON]-H., S.M., A.M. and D.R.-A. ; supervision, [PERSON]-H., S.M., A.M. and D.R.-A. ; project administration, M.G.-H., S.M., A.M. and D.R.-A. ; funding acquisition, M.G.-H. and S.M. All authors have read and agreed to the published version of the manuscript. This work has been partially supported by the Spanish Grant FEDER/Ministerio de Economia, Industria y Competitividad--AEI/TIN2016-75404-P. The authors declare no conflict of interest.