Hybrid Filter Based on Fuzzy Techniques for Mixed Noise Reduction in Color Images

: To decrease contamination from a mixed combination of impulse and Gaussian noise on color digital images, a novel hybrid ﬁlter is proposed. The new technique is composed of two stages. A ﬁlter based on a fuzzy metric is used for the reduction of impulse noise at the ﬁrst stage. At the second stage, to remove Gaussian noise, a fuzzy peer group method is applied on the image generated from the previous stage. The performance of the introduced algorithm was evaluated on standard test images employing widely used objective quality metrics. The new approach can efﬁciently reduce both impulse and Gaussian noise, as much as mixed noise. The proposed ﬁltering method was compared to the state-of-the-art methodologies: adaptive nearest neighbor ﬁlter, alternating projections ﬁlter, color block-matching 3D ﬁlter, fuzzy peer group averaging ﬁlter, partition-based trimmed vector median ﬁlter, trilateral ﬁlter, fuzzy wavelet shrinkage denoising ﬁlter, graph regularization ﬁlter, iterative peer group switching vector ﬁlter, peer group method, and the fuzzy vector median method. The experiments demonstrated that the introduced noise reduction technique outperforms those state-of-the-art ﬁlters with respect to the metrics peak signal to noise ratio (PSNR), the mean absolute error (MAE), and the normalized color difference (NCD).


Introduction
Noise suppression is of great interest in digital image processing, considering that the quality improvement of corrupted images is of essential importance for the majority of image processing areas, including analysis of images, detection of edges, and pattern recognition.Digital images may be deteriorated by diverse types of noise, generated by different causes, such as signal instabilities, defective sensors, physical deterioration of the material due to aging, poor lighting conditions, errors in the transmission due to channel noise, or interference caused by electromagnetic fields.Consequently, digital images are deteriorated by noise.Impulsive noise, Gaussian noise, and a mixture of them are among the most usual kinds of noise [1].The elimination of mixed, Gaussian-impulsive noise is a tough task, as methods built to suppress impulses are inefficacious in the Gaussian noise elimination and the methods introduced to reduce Gaussian noise are not capable of removing impulses [1,2].The widely known vector median filter (VMF) [3] and its variants [4,5] efficaciously reduce the impulses in color images; however, as the output of this filter corresponds to one of the pixels of the neighborhood, this method is not efficient reducing the Gaussian disturbance.To relieve this difficulty, the reduced ordering approach is employed to suppress the noise in color images [6][7][8].Another approach for reducing mixed Gaussian-impulsive noise is based on the switching methods [9][10][11].This technique has been used in color [10] and in grayscale images [9,11].These methods aim to detect the impulsive pixels and reduce them, employing a convenient technique, and process the rest of pixels with a method created to reduce Gaussian noise.The peer group concept proposed in [12,13] and its fuzzy variants [10,14] has also been employed to reduce mixed noise in color digital images.These filters perform an impulse detection stage followed by an averaging replacement stage.Another family of methods for color image denoising is founded on the idea of geodesic digital paths [15][16][17].In [18] an efficient trilateral filter (TF) to eliminate the mixed noise in grayscale images, was introduced.In this filter, an impulsive noise detector founded on the rank ordered absolute differences statistic (ROAD) is combined with the bilateral filter [19].In [20], a method for the filtering of images contaminated with uniform impulse and Gaussian noise was proposed.The method combines the kernel regression framework and a Bayesian classification.This method was proposed for grayscale and color images.The partition-based methods for noise suppression in color digital images [21,22] arrange the pixels in different signal activity classes, which are associated to adequate denoising methods.Another important class of filters are the regularization methods [23][24][25][26] founded on partial differential equations.These methods have been employed for color [23,24] and grayscale images [25].Another important family of denoising methods was founded on the improved intersection of confidence intervals [27][28][29].In [27] a fast denoising algorithm for video signals is proposed, and in [28] an adaptive denoising method for X-ray images is presented.In [29] the local entropy concept is introduced for denoising and removing tissue in X-ray images.The fuzzy technique has also been employed to eliminate mixed noise in color digital images; e.g., [10,[30][31][32].A fuzzy method based on weighted averaging is proposed in [30] to suppress mixed impulsive-Gaussian disturbances in color digital images.In this method, a weighted averaging is performed on the pixels inside the filtering window.The authors used a fuzzy rule system in order to adaptively calculate the weights.Verma et al. [31] presented a two stage fuzzy method for the elimination of mixed impulse-Gaussian distortions in color digital images.This filter has recourse to the interaction between the color components to reduce further left-over impulsive noise present in color components.Differences between the color pairs are computed to check for any residual impulse in individual color components.A fuzzy rule system is employed to calculate the degree of noise present in the color component of the pixel under processing.In [10] the authors employed the notion of fuzzy peer group to implement a denoising method for color images called fuzzy peer group averaging (FPGA).After a fuzzy rule switching impulsive denoising method, a fuzzy averaging on the pixels inside the peer group is applied.In [33] a parallel method based on this fuzzy peer group filter [10] was presented in order to maintain its good denoising efficiency while improving its computational efficiency.Despite the good denoising performance of the FPGA filter, the method can be significantly improved in its stage dedicated to the identification and reduction of impulses.With that purpose, in this work we substitute the stage of impulse denoising of the FPGA method by the fuzzy ROD filter (FRF) [34] specially designed for impulsive noise.The experiments show that the introduced filter improves, with respect to the metrics peak signal to noise ratio (PSNR), the mean absolute error (MAE), and the normalized color difference (NCD), the FPGA method and other state-of-the-art filters.Then, in this paper, we introduce a new hybrid method called FRF-FPGA to tackle mixed Gaussian-impulsive noise.The proposed hybrid method consists of two stages.At the first stage a two-step process based on FRF [34] is applied to initially reduce the impact of impulsive noise.Then, a fuzzy average filtering based on the FPGA filter [10] is used to reduce the Gaussian noise.
Section 2 introduces the new filtering design.In Section 3 the experimental results and a comparative study with competitive denoising methods are presented.Section 4 presents the conclusions.

Methods
Let F be a color image.Represent by W, the filtering window with the center at pixel x, and with size n × n (n is an odd natural, n ≥ 3).The image pixels in F are represented as vectors x i = (x i (1), x i (2), x i (3)), as is common for RGB color images, where the vector components x i ( ), = 1, 2, 3 are the values corresponding to the RGB color channels.We propose a two-stage hybrid denoising technique called FRF-FPGA.The hybrid filter structure is formed as a superposition of an impulse removal filter and a Gaussian filter.In the first stage, a variation of the FRF filter [34] is used to reduce the impulses.At the second stage, a filter based on the FPGA filter [10] is applied to attenuate the Gaussian noise.In [10], authors use the idea of fuzzy peer group in order to implement a denoising method structured in two steps.In the first step, authors use a fuzzy rule switching impulsive denoising method, and in the second stage a fuzzy averaging is computed over the pixels of the peer group.At the present study we utilize the concept of optimal number of elements in a peer group introduced in [10].This notion is used in the Gaussian noise smoothing, but not in the impulse detection and reduction process, where a two steps procedure based on the fuzzy ROD (FROD) statistic [34] is employed.In Section 3 we show that this new hybrid approach outperforms the results obtained in [10].In the next lines we explain the two stages of the hybrid filter separately.Algorithm 1 shows the pseudocode of the hybrid filter applied over each image pixel.
. end for

Impulsive Noise Detection and Reduction
The denoising scheme used is founded on the FROD statistic [34] described in the following lines.We use the FROD instead of ROAD for its efficiency detecting impulses.Consider for each pixel x, in RGB format (x(1), x(2), x(3)), a n × n window W x centered at x. Let W 0 x be the neighbors pixels of x in W x ; i.e., W 0 x = W x − {x}.In order to compute the ROAD statistic [18] the distances d x,x i , x i ∈ W 0 x are sorted in an ascending order, obtaining a set of non-negative reals r j (x) such that: Then, given an integer 0 < α ≤ n 2 − 1, ROAD α denotes the α rank-ordered difference statistic, given by [18], ROAD α expresses the global distance between x and its α nearest neighbors.This distance is expected to be greater for impulses than for noise-free pixels.The fuzzy metric M ∞ [34] was used to obtain the distances d x,x i , x i ∈ W 0 x , because it has been proven to be especially sensitive to impulsive noise.This metric, given two RGB image vectors x i , x j , is determined by The parameter P in Equation ( 1) was set to 1024, which has been proven to be a convenient value for RGB color vectors [35].Ordering the fuzzy distances The positive integer α in Equation ( 2) is a parameter such that α < n 2 − 1.An impulse noise pixel will present a low value of FROD α because it is not expected to be similar to its neighbors, whereas impulse-free pixels are expected to have a FROD α value nearer to one.FROD α (x) was used in order to identify pixels that are clearly impulsive or clearly impulse-free:

•
Step 1: If FROD α (x) is greater than a first parameter th 1 , then x is labeled as noise-free.
-If FROD α (x) is less than a second parameter th 2 (th 2 < th 1 ), x is classified as noisy.

-
If x satisfies th 1 ≥ FROD α (x) ≥ th 2 , then we conclude that it is not possible to classify x at this step, and it is analyzed in a second step.

•
Step 2: A third threshold parameter th 3 is used.In this step FROD α (x) is computed on W 0 x excluding the pixels already labeled as noisy, and using another parameter α < m.If FROD α (x) > th 3 , then x is labeled as impulse-free.If not, x is labeled as impulsive.
After the detection steps, each pixel labeled as impulsive is substituted by VMF out [3] performed over the noise-free neighbors in the window W x .In [34], authors proposed in Steps 1 and 2 to classify as noise-free, all the pixels x j used in FROD α (x i ).In our experiments, the variation of the algorithm we propose significantly improves the quality of the hybrid filter.

Gaussian Noise Reduction
The filter second stage consists in the Gaussian noise elimination process.At this step, we propose a weighted fuzzy average procedure over the pixels of the peer group.To this end, let us present a reminder of the definitions of a peer group [12] and a fuzzy peer group [10].Consider for each pixel x 0 , in RGB format, a n × n filtering window W centered at x 0 .Let ρ be a similarity measure function [1].Using this measure, the pixels x i ∈ W are descendingly ordered according to their similarity to x 0 , resulting in a set {x (0) , x (1) , . . ., x (n 2 −1) } satisfying where x (0) is the central pixel x 0 .Then, according to [12], the peer group with m + 1 elements, P x 0 m , corresponding to the pixel x 0 is defined as In [10], a fuzzy logic technique is introduced to compute the better number of pixels m in a peer group.As stated in [10], the fuzzy peer group associated with x 0 in a processing window W centered at x 0 is defined by the fuzzy set F P x 0 m given over the set {x (0) , x (1) , . . ., x ( m) }, and determined by a function of membership FP x 0 m = ρ(x 0 , x (i) ).Thus, the best number of elements, denoted by m, for P x 0 m is defined as the number m, 1 ≤ m ≤ n 2 − 1, which maximizes the certainty for the rule defined as follows: Fuzzy rule: Certainty for m ∈ N W to be the better number of pixels in P x 0 m If "x (m) is similar to x 0 " and the accumulated similarity of x (m) is considered big, the "certainty for m to represent the better cardinality for the peer group P x 0 m is high."Let C FR (m) denote the rule certainty for m.To calculate the better number m of elements, C FR (m) is calculated for every m ∈ N W , and then the m maximizing C FR (m) is chosen as m, the best number of pixels for P x 0 m ; i.e., m = arg max m∈N W C FR (m).The certainty for "x m is similar to x 0 " is determined by a membership function C x 0 defined by the similarity function Let A x 0 (x (m) ) denote the accumulated similarity for pixel x (m) .This function is determined by Then, the certainty of "the accumulated similarity for x (m) is large" is determined by the membership function L x 0 given by The t-norm product was employed as conjunction operator, and hence, the process of defuzzyfication was not necessary.Thus, C FR (m) = C x 0 (x (m) )L x (0) (x (m) ).The fuzzy similarity function ρ employed in the experiments was where F σ represents a parameter which will be analyzed in Section 3, and • is the Euclidean norm.This function was selected because it can be considered a fuzzy metric in consonance with the notion given in [36] and it has been proven to be adequate in the context of fuzzy image denoising [10,14,37].This similarity function ρ is valued within [0, 1] and verifies ρ(x 0 , Then, assuming that the pixels of a n × n filtering window W x 0 centered at pixel x 0 , are descendingly ordered, x 0 , . . ., x (n 2 −1) , with respect to their similarity to x 0 , the output x out which replaces the central pixel x 0 is with w j = ρ(x 0 , x (j) ).This smoothing operation given in Equation ( 3) is computed using only the pixels of the peer group, and therefore, only similar pixels are employed.

Results and Discussion
Flower [38], Parrots [38], and Lena test images depicted in Figure 1 were employed to analyze the efficiency of the introduced algorithm.Moreover, the detail of each test image was employed to better perceive the efficiency of the filtering method.These images were contaminated with Gaussian and/or impulsive noise.The white additive Gaussian classical model [1] was used for Gaussian noise, and for impulsive noise the uncorrelated random-value case [1,2] was considered.The widely utilized metrics PSNR, MAE, and NCD were employed to analyze the filter efficiency [1,3].These metrics measure the detail preservation ability, the color preserving capability, and the noise suppression ability, respectively.
In [34], the authors observed optimal performance for the FROD filter by setting th 1 ∈ [0.90, 0.97] , th 2 ∈ [0.87, 0.93] , and th 3 ∈ [0.97, 0.98].Moreover, they proposed sub-optimal performance by setting th 1 , th 2 , and th 3 proportionally to p as follows: th 1 = 0.90 + p 0.4 0.07, th 2 = 0.87 + p 0.4 0.06, and th 3 = 0.97 + p 0.4 0.01.The filters combined in the hybrid structure should be adjusted to the mixed noise and to each other.For this purpose, we studied the method efficiency in terms of PSNR, depending on the parameters th 1 , th 2 , th 3 , and F σ .Taking as a starting point the sub-optimal values obtained in [34], we analyzed the adjustment of the parameters th 1 , th 2 , and th 3 in the hybrid structure in presence of mixed noise.By means of extensive experiments, we have observed that sub-optimal performance in terms of PSNR can be obtained for th 1 , th 2 , and th 3 as a function of the amount of noise σ and p.The results reveal that for p ∈ [0, 0.4], and σ ∈ [0, 40], we can achieve sub-optimal performance by setting th 1 , th 2 , and th 3 as a function of p and σ as follows, where β p,σ = p − 2σ/100 depends on the impulsive noise p, and σ, the standard deviation for the Gaussian noise.There exist different techniques to estimate σ and p; e.g., p can be estimated with the technique used in [39] and σ can be estimated by the approach introduced in [40].Then, using estimations of σ and p, the parameters th 1 , th 2 , and th 3 can be automatically adjusted.The optimal adjustment depends on both image features and noise.In our experiments, we obtained sub-optimal performance with respect to PSNR for all images tested.Figures 2 and 3 show the dependency of the PSNR on the values F σ , β p,σ for Lena corrupted with different intensities of mixed noise.A similar behavior was observed for the other images, as illustrated in Figures 4 and 5, which show the dependency of the PSNR measure on the two parameters for Flower and Parrots images contaminated with Gaussian σ = 30 and impulse noise p = 0.3.For noise rates varying from 5% to 20%, the maximum value of PSNR was achieved for F σ ∈ [140, 600] and β p,σ ∈ [−0.6, 0.1].For noise rates varying from 20% to 40%, the maximum value of PSNR was achieved for F σ ∈ [240, 600] and β p,σ ∈ [−0.8, −0.3].Our results showed that we can achieve sub-optimal performance by setting th 1 , th 2 , and th 3 as indicated in Equation ( 4).We analyzed the influence of the filtering window size n and the α, α parameters on the denoising efficiency with respect to the PSNR.The simulations revealed that the optimal settings of n, α, and α parameters coincide with those obtained in previous research [34].Therefore, in the experiments we considered 3 × 3 filtering windows (n = 3) and α = 3, α = 1.
For evaluation of the performance of the method introduced here, various competitive, state-of-the-art noise removal techniques were evaluated:
All these methods were used on a filtering window (with size 3 × 3) in an iterative manner, except the PBTVMF that was used recursively.The parameter values recommended by the corresponding authors were used for each filter, adjusting them experimentally if needed.For the new FRF-FPGA method, we employed the settings recommended in Equation ( 4).
First, an experimental comparison was performed employing images contaminated with combinations of impulsive and Gaussian noise.The results presented in Tables 1-3 illustrate that the introduced method obtains the best efficiency in most experiments for the quality metrics PSNR, MAE, and NCD.The values of NCD are expressed (×10 2 ) as usual.These results indicate that the new filter can better reduce the noise, while better preserving the details of the image.In particular, it can be observed that FRF-FPGA exhibits a better performance than FPGA, mainly because the use of the FRF filter allows more accurate detection and reduction of impulsive noise.This is due to the fact that the peer groups in the FPGA do not include the adequate number of members to detect and remove small impulses.In terms of visual appearance, by inspecting the filtered images provided in Figures 6 and 7, we can conclude that the new method properly retains the image details and effectively reduces the mixed noise.We also analyzed the filtering capabilities of the new technique when the images were contaminated only with impulses and only with Gaussian noise.The results of these experiments for Lena image are shown in Figures 8-10.Similar findings were achieved for the other test images.For the Gaussian noise, the proposed filter can compete in results of PSNR, MAE, and NCD with the methods specifically designed to reduce pure Gaussian noise (APF, C-BM3DF, and FWSDF), and it provides better outputs than the rest of the filters.In some cases, depending on the amount of noise, the proposed method improves the methods specifically designed to reduce Gaussian noise, and in other cases does not improve them.FRF-FPGA presents a better performance than APF, C-BM3DF, and FWSDF, when the noise is high (σ = 20, 30).However, its performance decreases a little for lower noise.Nevertheless, the difference in this case is not significant.
This illustrates the filter practical utility to denoise images contaminated only with Gaussian distortion.Filter outputs for visual inspection are shown in Figures 11 and 12.It may be observed that the new method is capable of decreasing Gaussian noise without blurring the edges of the image.In relation to images contaminated only with impulsive noise, the new filter is also competitive (Figures 13 and 14).The only filters performing a little better, in some cases, than the new method, are the IPGSVF, which is expressly designed to suppress impulsive noise, and the PBTVMF.Compared to the other methods, the new filter obtains a better behavior in terms of PSNR, especially for high values of impulse noise p.The method can reduce impulsive noise without seriously degrading the quality of the image.This is also confirmed by Figures 13 and 14, which present the filter outputs for the Flower and Parrots test images corrupted with various levels of impulsive noise.Finally, we present a summary of results on execution times.Experiments were carried out using MATLAB 2018a in an Intel XEON X5660 processor (2.8 GHz and 48 GB RAM memory).The running time of the proposed FRF-FPGA hybrid algorithm was 2.18 s for denoising Lena image (512 × 512 pixels) deteriorated by Gaussian noise σ = 10 and impulsive noise p = 0.1.The execution time increased from 1.83 s for the FPGA to 2.18 s for the proposed FRF-FPGA.The new approach compared to FPGA, with a small increase of 0.37 s in time, provides a significant improvement in MAE, PSNR, and NCD measures.The computational times for the other methods considered for comparison were: 2.23 s for the ANNF, 15.2 s for the APF, 14.1 for the C-BM3DF, 2.1 s for the FVMF, 1.63 s for the FWSDF, 2.94 s for the GRF, 1.92 s for the IPGSVF, 9.7 s for the PBTVMF, 1.61 s for the PGF, and 5.18 s for the TF filter.Although the computational time of the proposed filter (2.18 s for a 512 × 512 image) makes this sequential approach hardly usable for real-time processing, the method has a skeleton which makes it appropriate for parallel computing.Then, using parallel techniques real-time can be easily achieved.

Conclusions
A new technique for the reduction of a mixed combination of Gaussian-impulse noise has been introduced.The mixed noise was suppressed by applying first a switching method based on a fuzzy metric intended for the suppression of impulses, and then a fuzzy average filtering developed for the attenuation of Gaussian noise.A comparative study with state-of-the-art methodologies was carried out using the objective qualitative measures MAE, PSNR, and NCD.The experiments revealed that the new filtering technique exhibits very good filtering properties, outperforming state-of-the-art filtering solutions in terms of MAE, PSNR, and NCD.Although the consecutive utilization of two distinct filters increases the computational load, the proposed filter has a structure which makes it adequate for parallel computing.Future work will involve the development and implementation of parallel methods based on the proposed filter.Since parallel techniques offer great computational efficiency, real-time processing can be achieved.

Figure 8 .Figure 9 .Figure 10 .Figure 11 .Figure 12 .Figure 13 .Figure 14 .
Figure 8.Comparison of mean absolute error (MAE) obtained by state-of-the-art methods when restoring Lena contaminated only with Gaussian noise σ or impulse noise p.(a) Lena contaminated only with Gaussian σ.(b) Lena contaminated only with impulse p.

end if end if end for Impulse noise detection: Step 2 for x pixel
in F classified as non-diagnosed in Step 1 do Calculate d = FROD α (x) rejecting the pixels labeled as noisy;

if (d > th 3 ) then pixel x is labeled as impulse-free; else x is labeled as impulsive; end if end for Impulse noise reduction: for x pixel in F classified as noisy do x is
replaced by VMF out over impulse-free neighbors;

Table 1 .
Comparative study with state-of-the-art techniques.Lena test image corrupted with various intensities of mixed noise.Bold values express the best restoration quality.

Table 2 .
Comparative study with some state-of-the-art techniques.Flower test image corrupted with various intensities of mixed noise.Bold values express the best restoration quality.

Table 3 .
Comparative study with state-of-the-art techniques.Parrots test image corrupted with various intensities of mixed noise.Bold values express the best restoration quality.