*3.3. Comparison Steps of Experimental Outputs*

In the experimental, the overall procedural steps are illustrated in Figure 1.

**Figure 1.** Procedural steps for overall comparisons.

Firstly, the original images are synthetically noised with the multiplicative noise option, using Equation (16) for an image *I*.

$$J = I + n \times I \tag{16}$$

where *n* is evenly distributed random noise with mean 0 and variance *v*. The default value for *v* is set to 0.04. Then, each of the filtering methods (MCV, MLV, and MID) is employed to de-noise the noised images. In other words, the noised images are filtered by the 3 filtering methods in order to clean the noises. Each method produces individual outputs. Lastly, the outputs are compared with the original images using the metrics of PSNR, MSE, SSIM, contrast, standard deviation, and *F* score.

As the experimental setup, artificial multiplicative noise is added to the 30 CSIQ images in order to quantify the performance of filters in terms of robustness to noise and edge preservation. Filtered images are compared with the original images with respect to five main metrics: PSNR, SSIM, MSE, standard deviation, and contrast. Table 1 illustrates an original image and a multiplicative noise added image.

In Table 1, the first image is the original gray-scale form of the CSIQ "1600.png" image, which has a contrast value of 74.19 and standard deviation of 66.21. The second one is the multiplicative noise-added gray-scale form of the CSIQ "1600.png" image, which has a contrast value of 67.25 and standard deviation of 75.83. After adding noise, standard deviation is increased and contrast is decreased since the noise factor increases the deviation from the mean while it wipes out the edges, which lowers the contrast accordingly.

**Table 1.** Original and artificially noised "1600.png" image (the *v* variance parameter for multiplicative noise is set to 0.04).

### *3.4. Numerical Outputs and Discussion*

As the experimental setup, pictures are compared with the original gray-scale pictures so that selected metrics can be examined. For this purpose, pictures filtered out by MCV, MLV, and MID filters are compared with respect to selected six metrics: PSNR, MSE, SSIM, standard deviation, contrast, and *F* Score. In the performance assessments, it is observed that PSNR and SSIM values increase while MSE decreases. Standard deviation decreases if the amount of noise is decreased. Also, the contrast is increased if the edge contours are enhanced. *F* Score demonstrates the overall success rate. Table 2 demonstrates a set of sample experimental results for the selected gray-scale form of the "1600.png" image as follows.

**Table 2.** Sample experimental results for a gray-scale picture taken from filters with 5 × 5 kernel size.

According to the experimental outputs shown in Table 2, the highest *F* Score is obtained in the MID Filter with the parameter (alpha = 0.0) when the comparison is performed among all filters. It indicates that the highest amount of noise reduction occurs with the MID Filter.

Figure 2 demonstrates the MSE, PSNR, SSIM, contrast, standard deviation, and *F* score bar charts of each filter as follows:

**Figure 2.** *Cont.*

**Figure 2.** Average peak signal-to-noise ratio (PSNR) rates in decibel (dB) (**a**), average mean squared error (MSE) values (**b**), average structural similarity index (SSIM) rates (**c**), average contrast values (**d**), average standard deviations (**e**), and average *F* scores (**f**) for the gray-scale computational and subjective image quality (CSIQ) dataset.

According to Figure 2, when MCV, MLV, and MID filters are compared in terms of PSNR, MSE, and SSIM, MID filter leads in the group. It has the highest rate of SSIM, and the lowest amount of MSE and the highest rate of PSNR.

Furthermore, the success rate of MID filter will increase when the alpha parameter is increased. However, too much increment in alpha will ruin the structural similarity and reduce the contrast; therefore, the optimal value of the alpha should be determined which will balance the ratio between SSIM and contrast. According to experimental tests, optimal alpha value, which yields the best results, is discovered as 0.30.

Observations through experiments are performed with respect to six metrics: PSNR, MSE, SSIM, Standard Deviation, Contrast, and *F* Score. The most determinant metrics appear as PSNR and SSIM, which indicates the percentage of noise reduction and similarity with the original pictures. Table 3 indicates the overall results with alternative values of alpha.


**Table 3.** Total average results of filtering experiments when the kernel size is set to 5.

In Table 3, the average PSNR value with MID filter is obtained as 16.42 while MCV and MLV filters attain 15.16 and 15.44, respectively. This proves that the MID filter is superior to the MCV and MLV filters in terms of robustness to noise and the SSIM value is calculated as 0.672 while the MCV and MLV filters reach 0.609 and 0.635, respectively. This also proves that the MID filter is better than the MCV and MLV filters in terms of similarity with the original pictures, which means MID filter cleans the noise while preserving the structural similarity with the original pictures. Mean squared error (MSE) is also observed as lower than the MCV and MLV filters where the MSE of MCV is observed as 512.6 and MSE of MLV is observed as 437.0, which is much higher than the MSE of the MID filter obtained as 365.7 through the experiments. This also proves that the MID filter's outputs are much more similar to the original pictures and cleans the noise better than the MCV and MLV filters. As an overall evaluation, the MID filter is better than the MCV and MLV filters in terms of robustness to noise while preserving the edges.

Additionally, the rows of Table 4 contain some cropped sections from original and filtered images of CSIQ "1600.png", "family.png", "turtle.png", and "trolley.png", respectively. These gray-scale pictures are from the original picture, MCV, MLV, and MID filters using a kernel size of 5×5 matrix. Table 4 demonstrates the visual performances of filters on edge preservation.

According to Table 4, in the first image in the first row, there are iron fences behind the people. The fence is a good representation (sample) of edges. As it is seen, the fence in MCV is thinner than in MLV. Edge contours of the fence are not well preserved by both MCV and MLV filters, whereby MCV makes edges thinner and MLV makes thicker than normal. Furthermore, in the first and second images in the first and second rows, the heads of people in MCV almost disappear since the mean method shrinks the edges. On the other hand, the heads of people in MLV are oversized since the method expands the edges [23]. However, the heads of people in the MID filtered image looks neither

oversized nor shrunken since the proposed method employs orientation information that optimizes the size of contours. In the third row, the head of the turtle loses its texture when MCV is applied, and contours become thicker when MLV is applied. However, both edge contours and textures become normal when the MID filter is applied. Additionally, in the fourth row, humans on the trolley almost disappear when MCV is applied and contours become extremely thicker when MLV is applied. On the other hand, both contours and texture look normal when the MID filter is executed.

**Table 4.** Some small cropped image sections from the outputs of filters.

As it is widely accepted, preserving edges is a great issue in noise reduction operations. The primary orientation of this study stands on two main principles, edge preservation and noise reduction. Measuring the quality of edge preservation might be performed by the SSIM index. The performance of noise-cleaning might be also assessed by the *F* score.

As it is seen in the experimental results above, the MID filter gives better results than the MCV and MLV filters starting from when the alpha is set to 0.30 according to SSIM index. Since the SSIM index indicates structural similarity of objects in the pictures, it also gives a sign about the rate of edge preservation. The more alpha is increased, the more the filter behaves like a mean filter, which ruins the edge preservation. Therefore, a minimum optimal value of alpha is necessary to get better results in terms of both edge preservation and noise reduction. For this reason, 0.30 might be determined as the optimum value of alpha. Even though the highest SSIM is gained when the alpha is set to 0.70, the edges partly disappear since MID behaves like a mean filter. As the main purpose of the study is to protect edges from deformations, the alpha parameter should be lessened as much as possible.

As a result, the shape of the objects changes with respect to type of filters. While MCV filters ruin the object boundaries, the MLV filter over-blurs the edge contours, which results in thick borderlines of the objects. However, the MID filter preserves the original contours of objects since the MID filter employs orientation information as the criterion function. This is the most prominent contribution of this study. This improvement can be recognized with the SSIM metric, which indicates the structural similarity of objects within the image pairs. Additionally, *F* score is presented as a novel comparison metric, which separates the filters in terms of edge preservation and robustness to noise.

### **4. Availability**

This presented MID filtering model has been implemented in the Java Processing and tested in MATLAB platforms. For examinations, further studies, and citations, all of the written original codes, benchmark datasets, test images, outputs, and total experimental results including SSIM, MSE, PSNR, contrast, standard deviations, and *F* scores for all cases can be publicly reachable at the website: https://sites.google.com/site/bulutfaruk/study-of-mid-filtering.

### **5. Conclusions**

In this paper, an extended version of MCV (minimum coefficient of variation) and MLV (mean least variance) filters are proposed. The proposed approach is the MID (minimum index of dispersion) filter, which employs orientation information of pixels in order to support value-criterion structure of the MCV and MLV filters. The dispersion of orientations is employed as the criterion function, which yields better results against multiplicative noise. Moreover, the value function is modified by adding an alpha parameter, which acts as low-pass filtering by the amount of alpha. Experimental results show that the proposed approach produces better results than MCV and MLV filters against multiplicative noise and eliminates the weaknesses of MCV and MLV filters. As the metric for measuring the robustness to noise, SSIM (structural similarity index), MSE (mean squared error), PSNR (peak signal-to-noise ratio), standard deviation, and contrast values are employed. Additionally, *F* Score, a hybrid metric that is the combination of five metrics is introduced in order to compare the filters. Benchmarking study indicates the MID filter is superior to the MCV and MLV filters. By the increment of the alpha parameter, the noise is blurred but the contrast is decreased, which acts by blurring the edges as well. Therefore, a balanced alpha parameter value is necessary, which will enhance the edges and at the same time blur the multiplicative noise. As the optimal value of the alpha parameter, 0.30 is determined according to experimental tests. This study might be an innovative guide for those who are interested in MCV and MLV filters and able to output different studies on the topic in the future.

**Author Contributions:** Conceptualization, I.F.I. and F.B.; methodology, I.F.I.; software, I.F.I.; validation, F.B.; formal analysis, F.B.; investigation, O.F.I.; resources, O.F.I.; data curation, F.B.; writing—original draft preparation, O.F.I.; writing—review and editing, I.F.I.; visualization, F.B.; supervision, I.F.I.; project administration, I.F.I.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.
