# 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
On the contrary, for M-SSIM and MSE performance measures, the best value of the \(\beta\) parameter also grows as the noise level increases to approximately 75%-85% but then decreases as the noise level reaches 98%. On the other hand, for PSNR\({}_{\text{HV}}\) and VIF similarity measures, it remains constant at 3.00 until the value of the noise level is approximately 85% and then the optimal values decrease until the noise level reaches 98%. The best distance corresponds mainly to the Manhattan distance for MSE, PSNR\({}_{\text{HV}}\) and VIF performance measures. For M-SSIM performance measure, there is no clear difference between the Manhattan and the Euclidean distances since in approximately half of the noise levels, the best distance chosen is the Manhattan distance and, in the rest, the Euclidean distance. Anyway, the infinity distance is never used in the estimation of the best parameters of the proposed algorithm. Figure 3: Plots of the means of several measures obtained by the considered noise detection functions versus noise density. At this point, the set-up of the AWAM filter has been completed and a flow chart of the algorithm including the parameter values is depicted in Figure 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Noise level** & **Measure** & **M-SSIM** & **MSE** & **PSNR\({}_{\text{RVS}}\)** & **VIF** \\ \hline



\hline \hline \end{tabular}
\end{table} 
Table 1: Best parameters values \(d\), \(\beta\) and \(n\) for each noise level according to the considered measures. Figure 4: Flow chart of the AWAM filter with the recommended parameter values. ### Statistical and Visual Comparison with the State-of-the-Art Filters

To evaluate the performance of the AWAM filter, a collection of the most representative state-of-the-art filters for salt-and-pepper noise removal has been chosen. These filters are based on very different approaches and parameters trying to find out the best algorithm that removes the salt-and-pepper noise of the corresponding noisy image:

* _SMF5_. The classical median filter with a window size of 5 \(\times\) 5. * _AMF9_ and _AMF17_. AMF stands for Adaptive Median filter and two configurations are considered depending on the maximum allowed size (9 or 17) of the neighborhood window for each pixel. * _DBA_. The decision-based filter for highly corrupted images by salt-and-pepper noise proposed by [PERSON] and [PERSON] in [PERSON] (2018). The method changes only corrupted pixels by the median value or by the preceding restored neighboring pixelvalue. * _OCS_ and _OCSFlat_. The nonlinear filter based on Open-Close sequence of the classical gray-level morphology. This filter was designed by [PERSON] et al. in [PERSON] et al. (2018). Depending if the structuring element is flat or non-flat, two different versions of the filter were considered. * _c-FMMOCS_ and _c-FMMOCSFlat_. The nonlinear filter based on Open-Close sequence within the fuzzy gray-level Mathematical Morphology introduced in [PERSON] and [PERSON] (2018). Also, two different filters were considered depending on the type of the structuring element. * _i-FMMOCS_ and _i-FMMOCSFlat_. Two versions of the so-called improved Fuzzy Mathematical Morphology Open-Close Filter recently introduced in [PERSON] and [PERSON] (2018) depending on the choice of the structuring element (non-flat or flat). * _[PERSON]_. The two-stage algorithm named noise adaptive fuzzy switching median filter based on fuzzy logic introduced in [PERSON] and [PERSON] (2018). * _[PERSON]_. An algorithm developed in [PERSON] and [PERSON] (2018) designed to reduce salt-and-pepper noise for extremely corrupted images via analysing local intensity extrema and a median filter. * _[PERSON]_. A two-stage filter designed to restore extremely corrupted images with salt-and-pepper noise presented in [PERSON] and [PERSON] (2018). In this filter, a noisy pixel is replaced using a non-fixed median filter computed in a window of maximum size of 9, or by estimating the value of the pixel using the values of their neighbors. * _[PERSON]_.