Optimal Weights Mixed Filter for removing mixture of Gaussian and impulse noises

In this paper we consider the problem of restoration of a image contaminated by a mixture of Gaussian and impulse noises. We propose a new statistic called ROADGI which improves the well-known Rank-Ordered Absolute Differences (ROAD) statistic for detecting points contaminated with the impulse noise in this context. Combining ROADGI statistic with the method of weights optimization we obtain a new algorithm called Optimal Weights Mixed Filter (OWMF) to deal with the mixed noise. Our simulation results show that the proposed filter is effective for mixed noises, as well as for single impulse noise and for single Gaussian noise.


Introduction
Noise can be systematically introduced into digitized images during acquisition and transmission, which usually degrade the quality of digitized images.However, various image-related applications, such as aerospace, medical image analysis, object detection etc., generally require effective noise suppression to produce reliable results.The problem of noise removal from a digitized image is one of the most important ones in digital image processing.The nature of the problem depends on the type of noise to the image.Generally, two noise models can adequately represent most noise added to images.Often in practice it is assumed that the noise has two components: an additive Gaussian noise and an impulse noise.
The additive Gaussian noise model is: where d] is an unknown target regression function, and ǫ(x), x ∈ I, are independent and identically distributed (i.i.d.) Gaussian random variables with mean 0 and standard deviation σ > 0. The additive Gaussian noise is characterized by adding to each digitized image pixel a value from a zero-mean Gaussian distribution.Such noise is usually introduced during image acquisition.The zeromean property of this Gaussian distribution makes it possible to remove the Gaussian noise by Non-Local weighted averaging.Important denoising methods for the Gaussian noise model have been well developed in recent years, see for example Polzehl and Spokoiny (2000), Buades et al. (2005), Kervrann and Boulanger (2006), Aharon et al. (2006), Dabov et al. (2007), Cai et al. (2008), Hammond and Simoncelli (2008), Lou et al. (2010), Katkovnik et al. (2010), andJin et al. (2011).
The random impulse noise model is: for x ∈ I, where B is the set of pixels contaminated by impulse noise, P(B) = p is the impulse probability (the proportion of the occurrence of the impulse noise), n(x) are independent random variables uniformly distributed on some interval [c, d].The impulse noise is characterized by replacing a portion of an image's pixel values with random values, leaving the remaining one unchanged.Such a noise can be introduced due to transmission errors, malfunctioning pixel elements in the camera sensors, faulty memory locations, and timing errors in analogto-digital conversion.Recently, some important methods have been proposed to remove the impulse noise, see for example: Hwang and Haddad (1995), Abreu et al. (1996), Chen and Wu (2001b), Chan et al. (2004), Nikolova (2004), Wenbin (2005), Dong et al. (2007), and Yu et al. (2008), To remove a mixture of the Gaussian and impulse noises which defined by the above mentioned methods are not effective: the Gaussian noise removal methods cannot adequately remove impulse noise, for they interpret the impulse noise pixel as edges to be preserved; when impulse removal methods are applied to an image corrupted with the Gaussian noise, such filters, in practice, leave grainy, visually disappointing results.Garnett et al. (2005) introduced a new local image statistic called Rank Ordered Absolute Difference (ROAD) to identify the impulse noisy pixels and incorporated it into a filter designed to remove the additive Gaussian noise.As a result they have obtained a trilateral filter capable to remove mixed Gaussian and impulse noise.This method also performs well for removing the single impulse noise.
In this paper, we propose a new filter that we call Optimal Weights Mixed Filter (OWMF).The idea of our method come from the combination of the ROAD statistic of Garnett et al. (2005) and the Optimal Weights Filter in Jin et al. (2011).In the paper, we modify the Rank-Ordered Absolute Differences (ROAD) to Rank-Ordered Absolute Differences of mixture of Gaussian and impulse noises (ROADG).It will be more effective to detect impulse noise when the impulse is mixed with Gaussian noise.The ROADG statistic will give a weight for all pixels in the image, which take value in the interval (0, 1].The weight will get low value (the value may be near to 0) when a pixel is contaminated by impulse noise; otherwise, the weight will carry a high value (the value may be near to 1).Then the Optimal Weights Filter (OWF) combining with the ROADG statistic can detect the impulse points in the image and give the proper weights to deal with the mixed noise.As a result, we obtain our new filter.The simulation results show that the proposed filter can effectively remove the mixture of impulse noise and the Gaussian noise.Moreover, when applied to either the single impulse noise or the single Gaussian noise it performs as good as the best filters specialized to single noises.
The rest of the paper is organized as follows.In Section 2 after a short recall of the Optimal Weights Filter and a brief presentation of the Trilateral Filter whose main ideas will be used in the definition of our new filter, we introduce our filter.In section 3, we provide visual examples and numerical results that demonstrate our method's soundness.Section 4 is a brief conclusion.

Optimal Weights Filter
For any pixel x 0 ∈ I and a given h > 0, the square window of pixels will be called search window at x 0 , where h is a positive integer.The size of the square search window U x0,h is the positive integer number M = (2h+1)2 = card U x0,h .
For any pixel x ∈ U x0,h and a given integer η > 0 a second square window of pixels will be called for short a patch window at x in order to be distinguished from the search window U x0,h .The size of the patch window V x,η is the positive integer m = (2η + 1) 2 = card V x0,η .The vector Y x,η = (Y (y)) y∈Vx,η formed by the values of the observed noisy image Y at pixels in the patch V x,η will be called simply data patch at x ∈ U x0,h .For any x 0 ∈ I and any x ∈ U x0,h , a distance between the data patches Y x,η = (Y (y)) y∈Vx,η and Y x0,η = (Y (y)) y∈Vx 0 ,η is defined by where and T x is the translation mapping: we have If we use the approximation and the law of large numbers, it seems reasonable that As shown in (Jin et al., 2011), in practice, a much better denoising results are obtained by using the following approximation The fact that ρ x0 (x) is a good estimator of ρ f,x0 was justified by the convergence results in (Jin et al., 2011) (cf.Theorems 3 and 4 of (Jin et al., 2011)).The Optimal Weights Filter is defined by where κ tr is the usual triangular kernel: Remark 1 The bandwidth a > 0 is the solution of and can be calculated as follows.We sort the set { ρ x0 (x) : and with the convention that The proof of Remark 1 can be found in (Jin et al., 2011).

ROAD statistic and Trilateral Filter
In (Garnett et al., 2005), Garnett et al introduced the Rank-Ordered Absolute Differences (ROAD) statistic to detect points contaminated by impulse noise.For any pixel x 0 ∈ I and a given d > 0, we define the square window of pixels where d is a positive integer.The square window will be called deleted neighborhood at x 0 .The ROAD statistic is defined by where In (Garnett et al., 2005) it is advised to use d = 1 and K = 4.Note that if x 0 is an impulse noisy point, the value of ROAD(x 0 ) is large; otherwise it is small.
Following Garnett et al. (2005) and Li et al. (2010) the authors define the "joint impulsively" J I (x 0 , x) between x 0 and x as: where the function J I (x 0 , x) assumes values in [0, 1] and the parameter σ J controls the shape of the function J I (x 0 , x).If x 0 or x is an impulse noisy point, then the value of ROAD(x 0 ) or ROAD(x) is large and J I (x 0 , x) ≈ 0; otherwise, the value of ROAD(x 0 ) and ROAD(x) are small and J I (x 0 , x) ≈ 1.The definition of the trilateral filter (cf.(Garnett et al., 2005)) is given by , where This filter has been shown to be very efficient in removing a mixed noise composed of a Gaussian and random impulse noise.

Optimal Weights Mixed Filter
The ROAD statistic (cf.Garnett et al. (2005)) provides a effective measure to detection the pixel contaminated by impulse.In this paper, we take into account the character of Gaussian noise, and modify the method ROAD to adapt to the mixture of impulse and Gaussian noises.
Then the equation ( 12) becomes where σ is the standard deviation of the added Gaussian noise, be a weight to estimate whether the point is impulse one, where the parameter H controls the shape of the function.If the pixel x is an impulse point then ROADG(x) is large and J(x, H) ≈ 0; otherwise ROADG(x) ≈ 0 and J(x, H) ≈ 1.Now, we modify the Optimal Weights Filter (Jin et al., 2011) in order to treat the mixture of impulse and Gaussian noises.Similar to (6), we define the impulse detection distance by , where and κ are some weights defined on V x0,η .The corresponding estimate of brightness variation ρ f,x0 (x) is given by The smoothing kernels κ used in the simulations are the Gaussian kernel where h g is the bandwidth parameter and the following kernel: for y ∈ U x0,η , In the simulations presented below we use the kernel κ = κ 0 .Now, we define a new filter, called Optimal Weights Mixed Filter (OWMF), by where the bandwidth a J > 0 can be calculated as in Remark 1 (with ρ x0 (x) and a replaced by ρ J,κ,x0 (x) and a J respectively) and H 2 is a parameter.Notice that H 1 and H 2 (which is used in the definition of ρ J,κ,x0 (x)) may take different values.
To explain the new algorithm ( 19), note that the function J(x, H 2 ) acts as a filter of the points contaminated by the impulse noise.In fact, if x is an impulse noisy point, then J(x, H 2 ) ≈ 0. When the impulse noisy points are filtered, the remaining part of the image is treated as a image distorted by solely the Gaussian noise.So, in the new filter, the basic idea is to apply the OWF (Jin et al., 2011) by giving nearly 0 weights to impulse noisy points.

Simulation and comparisons
The performance of a filter f is measured by the usual Peak Signal-to-Noise Ratio (PSNR) in decibels (db) defined by where f is the original image.
In the simulations, to avoid the undesirable border effects in our simulations, we mirror the image outside the image limits.In more detail, we extend the image outside the image limits symmetrically with respect to the border.At the corners, the image is extended symmetrically with respect to the corner pixels.
Repeat for each x 0 ∈ I give an initial value of a: a = 1 (it can be an arbitrary positive number).
compute { ρ J,κ,x0 (x) : x ∈ U x0,h } by ( 16) /compute the bandwidth a at x 0 reorder { ρ J,κ,x0 (x) : else quit loop else continue loop end loop /compute the estimated weights w at x 0 compute w(x i ) = J(x,H2)κtr In our simulations, the parameters can be choose as follows: In (Garnett et al., 2005) it is suggested to take d = 1 and K = 4.For low and moderate levels of noise (p < 25%), one iteration is sufficient and usually provides the best results; for high levels of noise (p > 25%), applying two to five iterations provides better results.In our simulations, we found that a few spots of unremoved impulses often remain if we choose d = 1 and K = 4.This happens because impulses sometimes "clump" together, and the 3 × 3 detection window is too small to identify all the impulse noise points.Consequently, we select parameters d = 2 and K = 12 of detection windows for all levels of impulse noise.Figure 1 shows the comparison results between the restored images, with  detection window 3×3 and with detection window 5×5, which have been added an impulse noise with p = 20%, 30%, 40%, and 50% respectively.When p = 30%, 40% and 50%, we can see clearly some impulse spots in the restored images with detection window 3 × 3, while the visual quality of the restored images with detection window 5 × 5 is very good, without impulse spots.In the case where p = 20%, impulse spots of the restored image with detection window 3 × 3 are not obvious, and the PSNR value is a little better than that with detection window 5 × 5, whereas Figure 2 shows that the first image has two clumpy impulse spots and the visual quality is not good enough.Consequently, we prefer detection window 5 × 5 for all levels impulse noise.We use the kernel κ 0 for computing the estimated brightness variation function ρ J,κ,x0 , which corresponds to the Optimal Weights Mixed Filter as defined in Section 2.3.The parameters m and M have been fixed to m = 25 × 25 and M = 13 × 13.In Figure 3, the images  in the third row show that the noise is reduced in a natural manner and significant geometric features, fine textures, and original contrasts are visually well recovered with no undesirable artifacts.To better appreciate the accuracy of the restoration process, the images of square errors (the square of the difference between the original image and the recovered image) are shown in the fifth row of Figure 3, where the dark values correspond to a high-confidence estimate.As expected, pixels with a low level of confidence are located in the neighborhood of image discontinuities.For comparison, we show the images denoised by the trilateral filter TriF (see the images in the second row of Figure 3 ) and their square errors (see the images in the forth row of Table 3 Comparison between the TriF (Garnett et al., 2005), and OWMF (Our method) in removing mixed noise.
Gaussian Noise Image Method p = 0.2 p = 0.3 p = 0.4 p = 0.5 Garnett et al. (2005)  Figure 3).We can see clearly that the images of square errors of our methods are darker than that of Trif, so our method provides significant improvement over.The overall visual impression and the numerical results are improved using our algorithm.
For comparison, we consider follows three cases: pure Gaussian noise, pure impulse noise and the mixture of Gaussian and impulse noises.In the case of pure Gaussian white noise, we have done simulation on a commonly-used set of images ("Lena", "Barbara", "Boat" and "House") available at http://decsai.ugr.es/∼javier/denoise/test images/ and the comparison with several filters is given in Table 1.The PSNR values show that our approach work as well as those sophisticated methods, like Hirakawa and Parks (2006), Kervrann and Boulanger (2008), Hammond and Simoncelli (2008) and Aharon et al. (2006), and is better than the filters proposed in Buades et al. (2005), Salmon and Le Pennec (2009), Katkovnik et al. (2004), Foi et al. (2004) and Roth and Black (2009).The proposed approach gives a quality of denoising which is competitive with that of the best recent method BM3D (see Dabov et al. (2007)).These methods can only deal wits pure Gaussian noise, while our method can not only cope with the Gaussian noise, but also remove the impulse noise and the mixture of Gaussian and pure impulse noises.For the pure impulse noise, our method is also competitive to the sophisticated method.In order to compare the others methods, we choose a commonly set of images ("Baboon", "Badge", "Lena" and "Pentagon") which is taken in (Dong et al., 2007).Table 2 lists the restoration results of well-know different algorithm.It is clear that our method provides significant improvement over Sun and Neuvo (1994), Abreu et al. (1996), Wang and Zhang (1999), Chen et al. (1999), Chen and Wu (2001b), Chen and Wu (2001a), Crnojevic et al. (2004), Wenbin (2005), etc.Our approach work as well as Dong et al. (2007) and Yu et al. (2008), when our approach produces the best PSNR values in the cases of "Baboon" (40%) and "Pentagon" (20% and 40%), while Yu et al. (2008) has the best results in the case of "Baboon" (20%) and "Bridge" (20% and 40%), and Dong et al. (2007)(ROLD-EPR) wins in the case of "Lena" (20% and 40%).Finally, we show the comparison between the Garnett et al. (2005) and our method with the set of images ("Lena", "Bridge", "Boat" and "Barbara").From Table 3, it is clear that our method provides significant improvement over the algorithm Trif (Garnett et al., 2005).

Conclusion
A new image denoising filter, which deal with the mixture of Gaussian and impulse noises model based on weights optimization and the modified Rank-Ordered Absolute Differences statistic, is proposed.The implementation of the filter is straightforward.Our work leads to the following conclusions.
1.The modified Rank-Ordered Absolute Differences statistic, used in the new filter, detects effectively the impulse noise in the case of mixture of Gaussian and impulse noises.This statistic is well adapted for use with the Weights Optimization Filter of (Jin et al., 2011).2. The proposed filter is proven by simulations to be very efficient for removing both a mixture of impulse and Gaussian noises, and the pure impulse or pure Gaussian noise.3. Our numerical results demonstrate that the new filter outperforms the known filters.

Fig. 1
Fig.1The first row gives the levels of added impulse noise.The second and the third rows display images restored with detection window 3×3, and their PSNR values.The forth and fifth rows show images restored with detection window 5 × 5 and their PSNR values .The 1, 2, 3 and 4 columns give the restored images which have been contaminated by an impulse noise with p = 20%, 30%, 40%, and 50% respectively.

Fig. 2
Fig.2The first and second 100 × 100 images are parts of images restored with detection windows 3 × 3 and 5 × 5 respectively; the original image has been contaminated by an impulse noise with p = 20%.

pFig. 3
Fig.3The first row is the images with different levels of mixture of impulse and Gaussian noise.The second and the third row display the images restored by TriF and OWMF respectively.The forth and the fifth row give square error image with TriF and OWMF respectively.

Table 1
Performance of denoising algorithms when applied to test Gaussian white noisy images.

Table 2
Performance of denoising algorithms when applied to test impulse noisy images.