# 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
In contrast, Structural Similarity Index Measure (SSIM) was defined in [27] under the assumption that human visual perception is highly adapted to extract structural information from a scene. The measure is computed as follows:

\[\text{SSIM}(I_{2},I_{1})=\frac{(2\mu_{1}\mu_{2}+C_{1})}{(\mu_{1}^{2}+\mu_{2}^{2 }+C_{1})}\cdot\frac{(2\sigma_{12}+C_{2})}{(\sigma_{1}^{2}+\sigma_{2}^{2}+C_{2 })},\]

where \(\mu_{1}\), \(\mu_{2}\), \(\sigma_{1}^{2}\), \(\sigma_{2}^{2}\) are the means and variances of the images \(I_{1}\) and \(I_{2}\) respectively, \(\sigma_{12}\) is the covariance between \(I_{1}\) and \(I_{2}\), \(C_{1}=(0.01\times 255)^{2}\) and \(C_{2}=(0.03\times 255)^{2}\). This is a mathematically defined performance measure for grayscale images, which does not incorporate a model of the human visual system. This measure incorporates the three main characteristics of the images: contrast, luminance, and structure, in order to compare the noise-free original image \(I_{1}\) with the restored image \(I_{2}\). In [27; 28] the authors state that for image quality assessment, it is more appropriate to apply the SSIM index locally rather than globally. They use a windowing approach, computing local statistics within a \(B\times B\) square window, which moves pixel-by-pixel over the entire image, and then use the mean to evaluate the quality of the restored image. Namely,

\[\text{M-SSIM}(I_{1},I_{2})=\frac{1}{L}\sum\limits_{j=1}^{L}\text{SSIM}_{j}(I_{ 1},I_{2}).\]

where \(\text{SSIM}_{j}(I_{1},I_{2})\) is the value of SSIM when the image is restricted to the local window \(j\) (\(L\) local windows in total). To compute the SSIM values in this paper we will consider the default parameter values as are established in [27]. This measure takes values in \([0,1]\) and higher values correspond to better capabilities of the used filter. To avoid the issues related with the performance of MSE, together with the M-SSIM, two different measures were added to our set of performance measures, the PSNRHVS and the VIF measures, because they improve the correlation with subjective quality judgement taking into account the HSV. The PSNR\({}_{\text{HVS}}\) quality index is presented by [PERSON] et al. in [29] and it is based on the HVS and MSE. This measure considers a scanning window with the aim of removing mean shift as well as contrast stretching in a similar way to the measure presented in [28]. The PSNR\({}_{\text{HVS}}\) quality index is then calculated using the next expression:

\[\text{PSNR}_{\text{HVS}}(I_{1},I_{2})=10\log_{10}\biggl{(}\frac{255^{2}}{\text{ MSE}_{\text{HVS}}(I_{1},I_{2})}\biggr{)}, \tag{4}\]

where MSE\({}_{\text{HVS}}\) is defined as follows (see [30]):

Figure 1:0

where \(M\times N\) are the image dimensions, \(I_{k}(m.n)_{ij}\), \(k\in\{1,2\}\) is the Discrete Cosine Transform (DCT) coefficients of the \(8\times 8\) block such that the coordinates of its left upper corner are equal to \(i\) and \(j\) for the original and distorted image respectively, and \(T_{c}\) is the matrix of correcting factors ([29]). The units of this performance measure are dB and the performance of the filter is higher as larger values of PSNR\({}_{\text{HVS}}\) are obtained. [PERSON] and [PERSON] in [31] proposed the VIF metric which is based on a HVS model. The main idea of the VIF index is to measure the loss of human-perceivable information in the distortion process. The construction of the VIF index is based on a statistical model for natural scenes, a model for image distortions, and a HVS model in an information-theoretic setting, and it is derived from a quantification of mutual information quantities [31]. [PERSON] and [PERSON] studied the VIF properties and they note that for all practical distortion types, VIF takes values in \([0,1]\). Again, higher values correspond with better capabilities of the used filter. They show that VIF\((I_{1},I_{1})=1\), and that if VIF\((I_{1},I_{2})=0\) this means that all information from the original image has been lost in the restored image.