# Mixed Noise Removal Algorithm Combining Adaptive Directional Weighted Mean Filter and Improved Adaptive Anisotropic Diffusion Model

Authors: Hongjin Ma; Yufeng Nie
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

A mixed noise removal algorithm combining adaptive directional weighted mean filter and improved adaptive anisotropic diffusion model is proposed. Firstly, a noise classification method is introduced to divide all pixels into two types as the pixels corrupted by impulse noise and the pixels corrupted by Gaussian noise. Then an adaptive directional weighted mean filter is developed to remove impulse noise, which can adaptively select the optimal direction template from twelve direction templates and replace the gray level of each impulse noise corrupted pixel by the weighted mean gray level of pixels on the optimal direction template. Finally, an improved adaptive anisotropic diffusion model is developed to remove Gaussian noise in the initial denoised image, which can finely classify image features as smooth regions, edges, corners, and isolated noises by characteristic parameters and variance parameter and conduct adaptive diffusion for different image features by designing reasonable eigenvalues of diffusion tensor. A large number of experimental results show that the proposed algorithm outperforms many existing main mixed noise removal methods in terms of image denoising and detail preservation.


---

## Body

## 1. Introduction

Noise is more or less introduced into an image in the process of image acquisition and transmission, which can significantly deteriorate image quality and increase difficulty in the subsequent image analysis [1]. The task of image denoising is to remove noise from the corrupted image and meanwhile preserve edges as much as possible. The nature of image denoising depends on the types of noise added to the image. Most commonly noises are additive white Gaussian noise (AWGN), impulse noise (IN), and the mixture of AWGN and IN.The AWGN is usually introduced into an image due to the thermal motion of electron in camera sensors and circuits, which is the most widely studied noise model in image denoising. The traditional linear filter such as mean filter can remove the AWGN but blurs edges. To overcome the disadvantage, the bilateral filter (BF) [2] uses the geometric and photometric distances based weights. The nonlocal means (NLM) filter [3] can be viewed as a significant extension of the BF based on the fact that similar pixels may not be necessarily spatial neighbors. The nonlinear diffusion filtering method such as Perona-Malik (P-M) model [4] is a well-known method based on a partial differential equation. The P-M model changes the diffusivity with the gradient during denoising, which has good capability in edge preservation. However, the P-M model has a significant shortcoming that the blocky effects exist in smooth regions after denoising. A coherence-enhancing anisotropic diffusion denoising (CAD) model [5] is developed to solve the problem by designing the diffusivity as a tensor. However, many undesired false edges appear in smooth regions after denoising. Recently, many modified models have been developed [6–8].The IN is often introduced into an image by faulty memory locations or bit errors [9]. Salt-and-pepper impulse noise (SPIN) and random valued impulse noise (RVIN) are the two common types of the IN. The standard median filter [10] is the most popular nonlinear filter for removing the IN, which is effective at low noise density. When the noise density is over 50%, some important edges will be blurred. To overcome the drawback, various modified median filters have been developed [11–16]. The switching median filter is a popular technique to remove the IN, which firstly identifies the IN corrupted pixels and then replaces the gray level of each IN corrupted pixel by the median value of its neighborhood pixels. The switching median filter with boundary discriminative noise detection (BDND) [17] identifies the IN corrupted pixels by adaptively selecting the filtering window of suitable size. The directional weighted median (DWM) filter [18] detects the IN corrupted pixels by considering the neighborhood information of each pixel along four directions. The modified directional weighted median (MDWM) filter [19] is modified based on DWM filter, which considers the neighborhood information of each pixel on more edge directions than DWM filter. The modified directional weighted (MDW) filter [20] detects the IN corrupted pixels by combining the directional gray level difference with gray level extreme and replaces the gray level of each IN corrupted pixel by the weighted mean gray level of its neighborhood pixels.In many cases, images may not be corrupted by only one type of noise, but mixed types of noise such as the mixture of AWGN and IN. In order to restore the image corrupted by the mixed noise, many methods have been developed [21–26]. The trilateral filter (TF) [22] incorporates the rank-order absolute difference statistics into BF framework for IN detection. Switching bilateral filter (SBF) [23] introduces the sorted quadrant median vector into BF to detect IN corrupted pixels. A nonlocal mixed noise filter [24] can skillfully extend NLM into the mixed noise circumstance by combining NLM with TF. A universal denoising framework [25] can remove the mixed noise by combining a complex detection mechanism with an improved NLM. A modified two-phase filter (MTF) [26] can effectively remove the mixed noise from the corrupted image, and the computational performance of this method is further improved in [27]. Recently, the low rank approximation (LRA) [28] and low rank representation (LRR) [29] have been used for removing noise. A weighted low rank approximation (WLRA) model and a weighted low rank representation (WLRR) model [30] are proposed to remove the mixed noise, which group image nonlocal similar patches as a matrix and restore the corrupted image by finding the weighted low rank approximation or representation of the matrix.In this paper, we propose a mixed noise removal algorithm combining adaptive directional weighted mean filter and improved adaptive anisotropic diffusion model. The proposed algorithm can accurately classify IN corrupted pixels and AWGN corrupted pixels by a noise classification method. After noise classification, an adaptive directional weighted mean (ADWM) filter is developed to remove the IN based on the multidirectional image information, which can effectively remove the IN and meanwhile preserve edges and details. Then an improved adaptive anisotropic diffusion (IAD) model is introduced to remove the AWGN in the initial denoised image, which can finely classify image features as four types and control the adaptive diffusion for different image features by designing the reasonable eigenvalues of diffusion tensor. The proposed algorithm makes full use of the advantages of ADWM filter and IAD model. The experimental results show that the proposed algorithm performs better than some existing main methods in terms of image denoising and edge preservation.The outline of this paper is as follows. Section2 presents the mixed noise model. A noise classification framework is brought out in Section 3. In Section 4, the proposed algorithm is described in detail. The experiments and results are shown in Section 5. Conclusion is given in Section 6.


## 2. Mixed Noise Model

For a clean gray imagec, the gray level of the pixel at location i,j is ci,j. The dynamic gray range of c is between cmin⁡ and cmax⁡. If c is an 8-bit image, cmin⁡ equals 0 and cmax⁡ equals 255. Usually, a clean gray image is firstly contaminated by the AWGN during acquisition and then corrupted by the IN in the process of transmission. After that, an image u with mixed noise is generated. The mixed noise model is defined as follows:(1)ui,j=ci,j+ai,j,probability1-pbi,j,probabilityp where p defines the proportion of the IN. a is the noise value which is drawn from a Gaussian distribution with mean 0 and standard deviation σ. b is the value of the IN which modifies the original gray level. In this paper, we mainly consider the SPIN mixed with the AWGN.


## 3. Noise Classification Method

From the mixed noise model, one can observe that the pixel in an image is corrupted by the AWGN or IN. The distribution of mixed noise cannot be described by a fixed function. Different pixels should be considered differently. Hence, a noise classification method is introduced to divide all the noise corrupted pixels into two types. Since the SPIN corrupted pixel takes the maximum or minimum gray level, its gray level is much different from the gray levels of its neighborhood pixels. Then a variance parameter is introduced to judge the gray level difference between the current pixel and its neighborhood pixels. And, for any one pixelPi,j in a mixed noise corrupted image, its variance parameter Vi,j in a m×m local window Ω is calculated as follows:(1)
Calculate the gray level varianceVi,j1 of all pixels in the local window by(2)Vi,j1=∑k=1m2gsk,rk-M12m2where(sk,rk)∈Ω. gsk,rk denotes the gray level of pixel Psk,rk.M1 denotes mean gray level of all pixels in the local window, M1=∑k=1m2gsk,rk/m2.(2)
Calculate the neat gray level varianceVi,j2 of neighborhood pixels of central pixel by(3)Vi,j2=∑k=1m2-1gsk,rk-M22m2-1where(sk,rk)∈Ω and sk,rk≠i,j. M2 denotes the mean gray level of neighborhood pixels of central pixel, M2=∑k=1m2-1gsk,rk/m2-1.(3)
Calculate the absolute difference value betweenVi,j1 and Vi,j2, and denote it as the variance parameter Vi,j.(4)Vi,j=Vi,j1-Vi,j2Based on the above notion, ifVi,j1 is much different from Vi,j2, the gray level of central pixel is much different from the gray levels of its neighborhood pixels. Then the pixel with a large variance parameter can be identified as a SPIN corrupted pixel in the high probability. A parameter T is selected as the threshold to judge the value of variance parameter. Besides, considering that the SPIN corrupted pixel takes the maximum or minimum gray level, it can be identified by combining the variance parameter and gray level extreme. Then the detailed process of noise classification is as follows:(1)
For any one pixelPi,j in a corrupted image, establish a local window.(2)
Calculate the variance parameterVi,j according to formulas (2)-(4).(3)
Identify the characteristic of pixelPi,j in the following way:(5)Pi,j∈N1,ifVi,j>Tandgi,j∈0,255N2,otherwisewhereN1 and N2 denote the pixels corrupted by the SPIN and AWGN, respectively. gi,j is the gray level of pixel Pi,j in the corrupted image.


## 4. Proposed Denoising Algorithm

### 4.1. Adaptive Directional Weighted Mean Filter

After noise classification, the ADWM filter is developed to restore the SPIN corrupted pixels based on the multidirectional image information. The ADWM filter firstly designs12 direction templates in the local window, then adaptively selects the optimal direction template by calculating the sum of absolute gray level differences between the current noise corrupted pixel and its neighborhood pixels on each direction template, and finally replaces the gray level of each SPIN corrupted pixel by the weighted mean gray level of pixels on the optimal direction template. For any one pixel Pi,j corrupted by the SPIN, the optimal direction template is selected as follows:(1)
Establish am×m local window Ω centered at the position i,j and design 12 direction templates as shown in Figure 1.(2)
Calculate the sum of absolute gray level difference between the central pixel and its neighborhood pixels on each direction templateEl by(6)di,jl=∑sk,rk∈Elwsk,rkgsk,rk-gi,jwheresk,rk≠i,j and l1≤l≤12 is the direction index illustrated in Figure 1. The weight of each neighborhood pixel Psk,rk is assigned by(7)wsk,rk=2,sk,rk∈Ω31,otherwisewhereΩ3 denotes a 3×3 local window centered at the position i,j.(3)
Find out the minimum sum of absolute gray level difference among the twelve direction templates, and denote it as(8)di,jl∗=argminl⁡di,jl,1≤l≤12(4)
Select the direction template with minimum sum of absolute gray level difference as the optimal direction templateEl∗.Figure 1
12 direction templates in the local window, (a) directions 1-4, and (b) directions 5-12.
(a) (b)After selecting the optimal direction template, the gray level of central pixel will be replaced by the weighted mean gray level of the pixels on the optimal direction template. The restoration gray level of the central pixelPi,j can be calculated as follows:(1)
Calculate the chessboard distancehsk,rk between the central pixel and the pixels on the optimal direction template by(9)hsk,rk=maxsk-i,rk-jwheresk,rk∈El∗ and sk,rk≠i,j.(2)
Calculate the weightek of the pixels on the optimal direction template by(10)esk,rk=hsk,rk-1∑k=1nhsk,rk-1wheren is the number of the pixels except for the central pixel on the optimal direction template.(3)
Calculate the restoration gray levelgi,j1 of the central pixel by(11)gi,j1=∑k=1ngsk,rkesk,rkwheregsk,rk denotes the gray level of pixel Psk,rk on the optimal direction template.An initial denoised imageu1 can be obtained by applying the ADWM filter for the mixed noise corrupted image u. Then an improved adaptive anisotropic diffusion (IAD) model is introduced to remove the remaining AWGN in the initial denoised image u1.


### 4.2. Improved Adaptive Anisotropic Diffusion Model

The CAD model uses Gaussian filter twice in the diffusion process. The standard deviation in the convolution operation is hard to be determined. It takes multiple experiments to find the optimal value of standard deviation. Hence, in order to improve the calculation efficiency, the IAD model uses Wiener filter to replace Gaussian filer as follows:(12)∂u1∂t=div⁡DJ∇u1w∇u1wu1x,y,0=u1x,ywhere x,y denotes the position of the pixel in the image and t denotes the time. div denotes the divergence operator. ∇ denotes the gradient operator. u1w=wieneru1, and wiener denotes Wiener filter.For any one pixelPi,j in the initial denoised image u1, the gray level obtained by Wiener filter is calculated as follows:(13)wienergi,j1=z+v2-σ2v2gi,j1-zwhere gi,j1 denotes the gray level of pixel Pi,j in the initial denoised image. z denotes the mean value of the gray levels of pixels in a M×N local window which centers at the position i,j. v denotes the standard deviation of the gray levels of pixels in the local window. σ denotes the standard deviation of the Gaussian noise.The structure tensorJ∇u1w is defined as follows:(14)J∇u1w=wiener∇u1w⊗∇u1w=W∗∇u1w∇u1w=J11J12J21J22=∂u1∂x2∗W∂u1∂x∂u1∂y2∗W∂u1∂x∂u1∂y2∗W∂u1∂y2∗Wwhere ⊗ denotes the Kronecker product operator. W denotes the Wiener kernel. ∗ denotes the convolution operator.The structure tensorJ∇u1w is a symmetric positive semidefinite matrix, whose eigenvectors are orthonormal. The eigenvectors of the structure tensor are as follows:(15)v1=cos⁡θ1,sin⁡θ1v2=cos⁡θ2,sin⁡θ2 where θ1=1/2arctan⁡(2J12/(J11-J22)), θ2=θ1+π/2, v1//∇u1w, and v2⊥∇u1w. The corresponding eigenvalues are given by(16)μ1=12J11+J22+J11-J222+4J122μ2=12J11+J22-J11-J222+4J122The diffusion tensorDJ∇u1w has the same eigenvectors as the structure tensor, that is, v1, v2. The corresponding eigenvalues of the diffusion tensor are λ1 and λ2. Then the diffusion tensor is defined by(17)D=v1v2λ1λ2v1Tv2TThe CAD model only divides image features into smooth regions and edges, which ignores corners and isolated noises. In order to enhance image features, the IAD model introduces an image feature classification method to classify image features as smooth regions, edges, corners, and isolated noises. Considering that the eigenvaluesμ1 and μ2 of structure tensor can describe the changes of image gradation along directions v1 and v2, two characteristic parameters are defined based on μ1 and μ2 as follows:(18)C1=μ1+μ2,C2=μ1-μ2Based on the above notion,C1 describes the comprehensive varying property of gray level and C2 expresses the difference of the gray varying along the two directions. Then for any one pixel Pi,j in the initial denoised image, its feature can be identified by the characteristic parameters as follows:(1)
Ifμ1≈0 and μ2≈0, it means that the changes of gray level along v1 and v2 are minimal. Then the pixel is located in the smooth region and C1≈0 and C2≈0.(2)
Ifμ1≫0 and μ2≈0, it means that the change of gray level along v1 is very large while the change of gray level along v2 is minimal. Then the pixel is located in the edge and C1≫0 and C2≫0.(3)
Ifμ1≫0 and μ2≫0, it means that the changes of gray level along v1 and v2 are very large. Then the pixel is an isolated noise pixel or located in the corner and C1≫0 and C2≈0.From the above analysis, it can be seen that the corners and isolated noises cannot be classified by the characteristic parameters. Since the variance parameter can reflect the gray level difference between the current pixel and its neighborhood pixels, it is used to classify corners and isolated noises. For any one pixelPi,j in a 3×3 local window, if it is an isolated noise pixel, its gray level is much different from the gray levels of its neighborhood pixels; if it is located in the corner, its gray level is similar to the gray levels of the other pixels located in the corner. Hence, the variance parameter of isolated noise pixel is much larger than the variance parameter of pixel located in the corner. Then a parameter T∗ is selected as the threshold to judge the value of variance parameter V in a 3×3 local window. Then for any one pixel Pi,j in the initial denoised image, its feature can be identified by combining the characteristic parameters and variance parameter as follows:(1)
IfC1≈0,C2≈0, the pixel is located in the smooth region.(2)
IfC1≫0,C2≫0, the pixel is located in the edge.(3)
IfC1≫0,C2≈0,V>T∗, the pixel is an isolated noise pixel.(4)
IfC1≫0,C2≈0,V≤T∗, the pixel is located in the corner.Based on the classification result of image feature, the eigenvalues of the diffusion tensor are designed to conduct the adaptive diffusion for different image features as follows:(1)
If the pixelPi,j is an isolated noise pixel or located in the smooth region, its eigenvalues are designed by(19)λ1=α,λ2=αwhereα∈0,1 is a large positive parameter. Both of the eigenvalues λ1 and λ2 are designed to be large. Then the diffusivity along the two directions v1 and v2 is large. Hence, the noise can be effectively removed.(2)
If the pixelPi,j is located in the edge, its eigenvalues are designed by(20)λ1=β,λ2=1-exp⁡-∇u1whereβ∈0,1 is a small positive parameter. The eigenvalue λ1 is designed to be small while the eigenvalue λ2 is designed to be large. Then the diffusivity perpendicular to edge direction is small while the diffusivity along the edge direction is large. Hence, the noise at edges can be removed; meanwhile the edges can be preserved.(3)
If the pixelPi,j is located in the corner, its eigenvalues are designed by(21)λ1=γ,λ2=γwhereγ∈0,1 is a small positive parameter. Both of the eigenvalues λ1 and λ2 are designed to be small. Then the diffusivity along the two directions v1 and v2 is small. Hence, the corner can be preserved.In conclusion, the IAD model can not only enhance the image information by finely classifying the image features but also remove the AWGN in the initial denoised image and meanwhile preserve edges and details. Besides, since the IAD model can identify the isolated noises in the initial denoised image, some residual SPIN can be further removed.The pseudocodes of the proposed algorithm are provided as shown in Algorithm1.Algorithm 1
Input: noise corrupted image u, variance threshold T. Output: denoised image u2. For each pixelPi,j in u: stepI: Noise classification. V i , j ← variance parameter. if V i , j > T and gi,j∈0,255 P i , j ∈ N 1. ADWM filtering. Apply ADWM filter to restore Pi,j. P i , j 1 ← A D W M P i , j. else P i , j ∈ N 2. P i , j 1 ← P i , j. end u 1 ← P i , j 1. stepΠ: IAD filtering. Apply IAD model to restore Pi,j1. P i , j 2 ← I A D P i , j 1. end u 2 ← P i , j 2.


## 4.1. Adaptive Directional Weighted Mean Filter

After noise classification, the ADWM filter is developed to restore the SPIN corrupted pixels based on the multidirectional image information. The ADWM filter firstly designs12 direction templates in the local window, then adaptively selects the optimal direction template by calculating the sum of absolute gray level differences between the current noise corrupted pixel and its neighborhood pixels on each direction template, and finally replaces the gray level of each SPIN corrupted pixel by the weighted mean gray level of pixels on the optimal direction template. For any one pixel Pi,j corrupted by the SPIN, the optimal direction template is selected as follows:(1)
Establish am×m local window Ω centered at the position i,j and design 12 direction templates as shown in Figure 1.(2)
Calculate the sum of absolute gray level difference between the central pixel and its neighborhood pixels on each direction templateEl by(6)di,jl=∑sk,rk∈Elwsk,rkgsk,rk-gi,jwheresk,rk≠i,j and l1≤l≤12 is the direction index illustrated in Figure 1. The weight of each neighborhood pixel Psk,rk is assigned by(7)wsk,rk=2,sk,rk∈Ω31,otherwisewhereΩ3 denotes a 3×3 local window centered at the position i,j.(3)
Find out the minimum sum of absolute gray level difference among the twelve direction templates, and denote it as(8)di,jl∗=argminl⁡di,jl,1≤l≤12(4)
Select the direction template with minimum sum of absolute gray level difference as the optimal direction templateEl∗.Figure 1
12 direction templates in the local window, (a) directions 1-4, and (b) directions 5-12.
(a) (b)After selecting the optimal direction template, the gray level of central pixel will be replaced by the weighted mean gray level of the pixels on the optimal direction template. The restoration gray level of the central pixelPi,j can be calculated as follows:(1)
Calculate the chessboard distancehsk,rk between the central pixel and the pixels on the optimal direction template by(9)hsk,rk=maxsk-i,rk-jwheresk,rk∈El∗ and sk,rk≠i,j.(2)
Calculate the weightek of the pixels on the optimal direction template by(10)esk,rk=hsk,rk-1∑k=1nhsk,rk-1wheren is the number of the pixels except for the central pixel on the optimal direction template.(3)
Calculate the restoration gray levelgi,j1 of the central pixel by(11)gi,j1=∑k=1ngsk,rkesk,rkwheregsk,rk denotes the gray level of pixel Psk,rk on the optimal direction template.An initial denoised imageu1 can be obtained by applying the ADWM filter for the mixed noise corrupted image u. Then an improved adaptive anisotropic diffusion (IAD) model is introduced to remove the remaining AWGN in the initial denoised image u1.


## 4.2. Improved Adaptive Anisotropic Diffusion Model

The CAD model uses Gaussian filter twice in the diffusion process. The standard deviation in the convolution operation is hard to be determined. It takes multiple experiments to find the optimal value of standard deviation. Hence, in order to improve the calculation efficiency, the IAD model uses Wiener filter to replace Gaussian filer as follows:(12)∂u1∂t=div⁡DJ∇u1w∇u1wu1x,y,0=u1x,ywhere x,y denotes the position of the pixel in the image and t denotes the time. div denotes the divergence operator. ∇ denotes the gradient operator. u1w=wieneru1, and wiener denotes Wiener filter.For any one pixelPi,j in the initial denoised image u1, the gray level obtained by Wiener filter is calculated as follows:(13)wienergi,j1=z+v2-σ2v2gi,j1-zwhere gi,j1 denotes the gray level of pixel Pi,j in the initial denoised image. z denotes the mean value of the gray levels of pixels in a M×N local window which centers at the position i,j. v denotes the standard deviation of the gray levels of pixels in the local window. σ denotes the standard deviation of the Gaussian noise.The structure tensorJ∇u1w is defined as follows:(14)J∇u1w=wiener∇u1w⊗∇u1w=W∗∇u1w∇u1w=J11J12J21J22=∂u1∂x2∗W∂u1∂x∂u1∂y2∗W∂u1∂x∂u1∂y2∗W∂u1∂y2∗Wwhere ⊗ denotes the Kronecker product operator. W denotes the Wiener kernel. ∗ denotes the convolution operator.The structure tensorJ∇u1w is a symmetric positive semidefinite matrix, whose eigenvectors are orthonormal. The eigenvectors of the structure tensor are as follows:(15)v1=cos⁡θ1,sin⁡θ1v2=cos⁡θ2,sin⁡θ2 where θ1=1/2arctan⁡(2J12/(J11-J22)), θ2=θ1+π/2, v1//∇u1w, and v2⊥∇u1w. The corresponding eigenvalues are given by(16)μ1=12J11+J22+J11-J222+4J122μ2=12J11+J22-J11-J222+4J122The diffusion tensorDJ∇u1w has the same eigenvectors as the structure tensor, that is, v1, v2. The corresponding eigenvalues of the diffusion tensor are λ1 and λ2. Then the diffusion tensor is defined by(17)D=v1v2λ1λ2v1Tv2TThe CAD model only divides image features into smooth regions and edges, which ignores corners and isolated noises. In order to enhance image features, the IAD model introduces an image feature classification method to classify image features as smooth regions, edges, corners, and isolated noises. Considering that the eigenvaluesμ1 and μ2 of structure tensor can describe the changes of image gradation along directions v1 and v2, two characteristic parameters are defined based on μ1 and μ2 as follows:(18)C1=μ1+μ2,C2=μ1-μ2Based on the above notion,C1 describes the comprehensive varying property of gray level and C2 expresses the difference of the gray varying along the two directions. Then for any one pixel Pi,j in the initial denoised image, its feature can be identified by the characteristic parameters as follows:(1)
Ifμ1≈0 and μ2≈0, it means that the changes of gray level along v1 and v2 are minimal. Then the pixel is located in the smooth region and C1≈0 and C2≈0.(2)
Ifμ1≫0 and μ2≈0, it means that the change of gray level along v1 is very large while the change of gray level along v2 is minimal. Then the pixel is located in the edge and C1≫0 and C2≫0.(3)
Ifμ1≫0 and μ2≫0, it means that the changes of gray level along v1 and v2 are very large. Then the pixel is an isolated noise pixel or located in the corner and C1≫0 and C2≈0.From the above analysis, it can be seen that the corners and isolated noises cannot be classified by the characteristic parameters. Since the variance parameter can reflect the gray level difference between the current pixel and its neighborhood pixels, it is used to classify corners and isolated noises. For any one pixelPi,j in a 3×3 local window, if it is an isolated noise pixel, its gray level is much different from the gray levels of its neighborhood pixels; if it is located in the corner, its gray level is similar to the gray levels of the other pixels located in the corner. Hence, the variance parameter of isolated noise pixel is much larger than the variance parameter of pixel located in the corner. Then a parameter T∗ is selected as the threshold to judge the value of variance parameter V in a 3×3 local window. Then for any one pixel Pi,j in the initial denoised image, its feature can be identified by combining the characteristic parameters and variance parameter as follows:(1)
IfC1≈0,C2≈0, the pixel is located in the smooth region.(2)
IfC1≫0,C2≫0, the pixel is located in the edge.(3)
IfC1≫0,C2≈0,V>T∗, the pixel is an isolated noise pixel.(4)
IfC1≫0,C2≈0,V≤T∗, the pixel is located in the corner.Based on the classification result of image feature, the eigenvalues of the diffusion tensor are designed to conduct the adaptive diffusion for different image features as follows:(1)
If the pixelPi,j is an isolated noise pixel or located in the smooth region, its eigenvalues are designed by(19)λ1=α,λ2=αwhereα∈0,1 is a large positive parameter. Both of the eigenvalues λ1 and λ2 are designed to be large. Then the diffusivity along the two directions v1 and v2 is large. Hence, the noise can be effectively removed.(2)
If the pixelPi,j is located in the edge, its eigenvalues are designed by(20)λ1=β,λ2=1-exp⁡-∇u1whereβ∈0,1 is a small positive parameter. The eigenvalue λ1 is designed to be small while the eigenvalue λ2 is designed to be large. Then the diffusivity perpendicular to edge direction is small while the diffusivity along the edge direction is large. Hence, the noise at edges can be removed; meanwhile the edges can be preserved.(3)
If the pixelPi,j is located in the corner, its eigenvalues are designed by(21)λ1=γ,λ2=γwhereγ∈0,1 is a small positive parameter. Both of the eigenvalues λ1 and λ2 are designed to be small. Then the diffusivity along the two directions v1 and v2 is small. Hence, the corner can be preserved.In conclusion, the IAD model can not only enhance the image information by finely classifying the image features but also remove the AWGN in the initial denoised image and meanwhile preserve edges and details. Besides, since the IAD model can identify the isolated noises in the initial denoised image, some residual SPIN can be further removed.The pseudocodes of the proposed algorithm are provided as shown in Algorithm1.Algorithm 1
Input: noise corrupted image u, variance threshold T. Output: denoised image u2. For each pixelPi,j in u: stepI: Noise classification. V i , j ← variance parameter. if V i , j > T and gi,j∈0,255 P i , j ∈ N 1. ADWM filtering. Apply ADWM filter to restore Pi,j. P i , j 1 ← A D W M P i , j. else P i , j ∈ N 2. P i , j 1 ← P i , j. end u 1 ← P i , j 1. stepΠ: IAD filtering. Apply IAD model to restore Pi,j1. P i , j 2 ← I A D P i , j 1. end u 2 ← P i , j 2.


## 5. Experimental Results

In this section, some experiments are carried out to demonstrate the performance of the proposed algorithm. Six commonly used images are chosen as the test images: Lena, Boat, Peppers, Painting, Couple, and Hill, respectively (refer to Figure2 for the scenes of six test images). All test images are with the size of 512×512. The denoising results of different methods are measured by the Peak Signal-to-Noise Ratio (PSNR) and the Feature Similarity Index Measure (FSIM). Different levels of the AWGN plus SPIN are tested to contaminate the noise-free images. The standard deviation σ of the AWGN varies from 5 to 15 with the step length of 5. The ratio of the SPIN varies from 10% to 60% with the step length of 10%. The proposed algorithm is compared with different methods for mixed noise removal as TF [22], SBF [23], MNF [24], Cai [27], AMF coupled with LRA [28], AMF coupled with LRR [29], WLRA [30], and WLRR [30].Figure 2
The six test images. From (a) to (f): Lena, Boat, Peppers, Painting, Couple, and Hill.
(a) (b) (c) (d) (e) (f)We firstly compare the proposed algorithm with several classical methods as TF [22], SBF [23], and MNF [24]. Figure 3 shows the denoising results of different methods for Lena image, which is corrupted by the AWGN (σ=10) plus SPIN (p=20%). From Figure 3(c), one can observe that the TF method can remove the mixed noise but blur the edges. From Figures 3(d) and 3(e), it can be seen that the SBF and MNF methods can remove the mixed noise and meanwhile preserve edges. However, some noise corrupted pixels are residual in the denoising results of SBF and MNF methods. From Figure 3(f), one can observe that the proposed algorithm can not only effectively remove the mixed noise but also preserve edges and details well. Therefore, Figure 3 shows that the proposed algorithm can perform better than other compared methods. Figure 4 shows the denoising results of different methods for Boat image, which is corrupted by the AWGN (σ=10) plus SPIN (p=20%). Similar conclusions to Figure 3 can be obtained from Figure 4.Figure 3
Denoising results of different methods for Lena image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=20%). From (c) to (f): denoising results of TF, SBF, MNF, and the proposed algorithm.
(a) (b) (c) (d) (e) (f)Figure 4
Denoising results of different methods for Boat image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=20%). From (c) to (f): denoising results of TF, SBF, MNF, and the proposed algorithm.
(a) (b) (c) (d) (e) (f)Figure5 shows the denoising results of the proposed algorithm for Lena image corrupted by different mixed noise. From Figures 5(a), 5(b), and 5(c), one can observe that the image quality is getting worse and worse with the increase of the noise density of salt-and-pepper noise and the standard deviation of Gaussian noise. From Figures 5(d), 5(e), and 5(f), it can be seen that the noise corrupted pixels are effectively restored and the edges are preserved well. Therefore, Figure 5 shows that the proposed algorithm can effectively remove noise and meanwhile preserve edges in the case of different mixed noise. Figure 6 shows the denoising results of the proposed algorithm for Boat image corrupted by different mixed noise. Similar conclusions to Figure 5 can be obtained from Figure 6.Figure 5
Denoising results of the proposed algorithm for Lena image corrupted by different mixed noise. (a) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=10%). (b) Image corrupted by mixed noise (AWGN+SPIN, σ=20, p=20%). (c) Image corrupted by mixed noise (AWGN+SPIN, σ=30, p=30%). From (d) to (f): denoising results of the proposed algorithm for (a), (b), and (c).
(a) (b) (c) (d) (e) (f)Figure 6
Denoising results of the proposed algorithm for Boat image corrupted by different mixed noise. (a) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=10%). (b) Image corrupted by mixed noise (AWGN+SPIN, σ=20, p=20%). (c) Image corrupted by mixed noise (AWGN+SPIN, σ=30, p=30%). From (d) to (f): denoising results of the proposed algorithm for (a), (b), and (c).
(a) (b) (c) (d) (e) (f)In order to further verify the performance of the proposed algorithm, the proposed algorithm is compared with some existing main methods as Cai [27], AMF coupled with LRA [28], AMF coupled with LRR [29], WLRA [30], and WLRR [30]. Tables 1 and 2 present the denoising results (PSNR) of different methods for six test images with p=50% and p=60%, respectively. Tables 3 and 4 present the denoising results (FSIM) of different methods for six test images with p=50% and p=60%, respectively. From Tables 1 and 3, one can see that the PSNR and FSIM values of the LRA and LRR coupled with AMF methods are much lower than the Cai, WLRA, WLRR, and the proposed method. This means that the denoising performances of the LRA and LRR coupled with AMF methods are significantly lower than the Cai, WLRA, WLRR, and the proposed method. The WLRR method achieves the higher PSNR and FSIM values than the Cai and WLRA methods in most cases. This ensures that the WLRR method can more effectively remove the mixed noise than the Cai and WLRA methods. The proposed algorithm obtains the highest PSNR and FSIM values among all compared methods in each case. With the increasing of the AWGN strength, the proposed algorithm can achieve higher PSNR and FSIM values than other methods. Hence, Tables 1 and 3 indicate that the proposed algorithm has stronger denoising capability than other methods. Similar conclusions to Table 1 can be obtained from Table 3 and similar conclusions to Table 2 can be obtained from Table 4.Table 1
The denoising results (PSNR) of different methods for six test images withp=50%.
Image  p=50% Cai AMF+LRA AMF+LRR WLRA WLRR Proposed Lena σ=5 32.65 31.27 31.52 32.40 32.82 33.42 σ=10 30.95 30.28 30.66 30.83 31.33 31.93 σ=15 29.24 29.09 29.62 29.46 30.31 30.87  Boat σ=5 29.25 27.75 27.93 28.97 29.35 30.05 σ=10 28.28 27.33 27.42 27.94 28.40 29.12 σ=15 27.08 26.71 26.86 27.13 27.58 28.05  Peppers σ=5 31.05 29.39 29.52 30.34 31.14 32.18 σ=10 29.53 28.84 29.17 29.29 29.75 30.87 σ=15 28.22 28.24 28.68 28.51 29.45 29.98  Painting σ=5 32.76 31.55 31.44 31.92 32.47 33.56 σ=10 30.97 30.42 30.49 30.59 31.10 32.08 σ=15 28.99 29.08 29.49 29.38 29.88 30.71  Couple σ=5 29.05 27.68 27.85 29.09 29.34 29.98 σ=10 28.02 27.39 27.45 28.12 28.29 28.91 σ=15 26.85 26.60 26.72 27.10 27.57 28.13  Hill σ=5 30.55 29.45 29.36 30.25 30.62 31.30 σ=10 29.28 28.66 28.82 29.05 29.40 29.98 σ=15 27.92 27.67 27.82 28.06 28.40 28.86Table 2
The denoising results (PSNR) of different methods for six test images withp=60%.
Image  p=60% Cai AMF+LRA AMF+LRR WLRA WLRR Proposed Lena σ=5 31.33 29.85 29.96 30.98 31.45 32.10 σ=10 30.15 29.18 29.52 29.66 30.26 30.78 σ=15 28.89 28.05 28.73 28.35 29.12 29.62  Boat σ=5 27.86 26.73 26.78 27.40 27.60 28.41 σ=10 27.09 26.33 26.31 26.71 27.25 27.93 σ=15 26.32 25.51 25.83 25.89 26.41 27.18  Peppers σ=5 29.82 28.15 28.55 28.81 29.47 30.37 σ=10 28.87 27.63 28.14 28.15 28.95 29.84 σ=15 27.72 26.91 27.74 27.35 28.34 29.12  Painting σ=5 31.41 29.56 30.11 30.40 30.64 31.49 σ=10 29.82 28.81 29.41 29.28 29.87 30.73 σ=15 28.54 28.02 28.57 28.09 28.79 29.62  Couple σ=5 27.67 26.69 26.78 27.53 27.74 28.32 σ=10 26.93 26.22 26.29 26.75 26.98 27.50 σ=15 26.06 25.52 25.87 25.95 26.35 26.89  Hill σ=5 29.48 28.38 28.51 29.03 29.10 29.72 σ=10 28.57 27.77 27.88 28.03 28.16 28.75 σ=15 27.47 26.70 27.28 27.06 27.52 28.04Table 3
The denoising results (FSIM) of different methods for six test images withp=50%.
Image  p=50% Cai AMF+LRA AMF+LRR WLRA WLRR Proposed Lena σ=5 0.9711 0.9676 0.9690 0.9758 0.9768 0.9799 σ=10 0.9548 0.9566 0.9576 0.9598 0.9602 0.9650 σ=15 0.9254 0.9396 0.9421 0.9426 0.9468 0.9497  Boat σ=5 0.9592 0.9451 0.9482 0.9590 0.9595 0.9630 σ=10 0.9414 0.9398 0.9383 0.9440 0.9448 0.9483 σ=15 0.9160 0.9228 0.9237 0.9258 0.9260 0.9287  Peppers σ=5 0.9703 0.9670 0.9684 0.9711 0.9714 0.9782 σ=10 0.9553 0.9548 0.9555 0.9569 0.9576 0.9631 σ=15 0.9289 0.9381 0.9429 0.9418 0.9469 0.9516  Painting σ=5 0.9735 0.9570 0.9523 0.9648 0.9669 0.9739 σ=10 0.9536 0.9520 0.9504 0.9532 0.9552 0.9610 σ=15 0.9267 0.9326 0.9328 0.9356 0.9382 0.9438  Couple σ=5 0.9573 0.9467 0.9490 0.9607 0.9629 0.9658 σ=10 0.9417 0.9362 0.9365 0.9459 0.9464 0.9497 σ=15 0.9214 0.9191 0.9205 0.9269 0.9278 0.9315  Hill σ=5 0.9587 0.9570 0.9548 0.9578 0.9594 0.9631 σ=10 0.9449 0.9402 0.9385 0.9418 0.9456 0.9485 σ=15 0.9125 0.9200 0.9212 0.9204 0.9244 0.9276Table 4
The denoising results (FSIM) of different methods for six test images withp=60%.
Image  p=60% Cai AMF+LRA AMF+LRR WLRA WLRR Proposed Lena σ=5 0.9650 0.9606 0.9604 0.9645 0.9657 0.9686 σ=10 0.9483 0.9440 0.9453 0.9485 0.9497 0.9538 σ=15 0.9252 0.9241 0.9274 0.9283 0.9309 0.9341  Boat σ=5 0.9417 0.9372 0.9357 0.9404 0.9439 0.9482 σ=10 0.9249 0.9247 0.9139 0.9287 0.9260 0.9291 σ=15 0.9027 0.9049 0.9070 0.9074 0.9095 0.9126  Peppers σ=5 0.9667 0.9541 0.9558 0.9649 0.9659 0.9721 σ=10 0.9496 0.9466 0.9474 0.9514 0.9524 0.9570 σ=15 0.9267 0.9193 0.9355 0.9346 0.9407 0.9442  Painting σ=5 0.9618 0.9563 0.9525 0.9567 0.9571 0.9626 σ=10 0.9376 0.9366 0.9387 0.9374 0.9385 0.9570 σ=15 0.9183 0.9179 0.9186 0.9205 0.9219 0.9271  Couple σ=5 0.9373 0.9309 0.9310 0.9458 0.9474 0.9509 σ=10 0.9226 0.9209 0.9206 0.9289 0.9302 0.9340 σ=15 0.9050 0.9047 0.9030 0.9104 0.9118 0.9151  Hill σ=5 0.9484 0.9401 0.9412 0.9438 0.9442 0.9486 σ=10 0.9298 0.9284 0.9267 0.9252 0.9262 0.9299 σ=15 0.9011 0.9034 0.9077 0.9085 0.9098 0.9123Figures7 and 8 show the bar plots of PSNR values of different methods for six test images with p=50% and p=60%, respectively. Figures 9 and 10 show the bar plots of FSIM values of different methods for six test images with p=50% and p=60%, respectively. From the above figures, one can observe that the proposed algorithm outperforms some existing main methods in terms of image denoising and edge preservation.Figure 7
The bar blots of PSNR values of different methods for six test images withp=50%. (a) Lena image. (b) Boat image. (c) Peppers image. (d) Painting image. (e) Couple image. (f) Hill image.
(a) (b) (c) (d) (e) (f)Figure 8
The bar blots of PSNR values of different methods for six test images withp=60%. (a) Lena image. (b) Boat image. (c) Peppers image. (d) Painting image. (e) Couple image. (f) Hill image.
(a) (b) (c) (d) (e) (f)Figure 9
The bar blots of FSIM values of different methods for six test images withp=50%. (a) Lena image. (b) Boat image. (c) Peppers image. (d) Painting image. (e) Couple image. (f) Hill image.
(a) (b) (c) (d) (e) (f)Figure 10
The bar blots of FSIM values of different methods for six test images withp=60%. (a) Lena image. (b) Boat image. (c) Peppers image. (d) Painting image. (e) Couple image. (f) Hill image.
(a) (b) (c) (d) (e) (f)Tables5 and 6 present the denoising results of different methods in terms of average PSNR and average FSIM for six test images, respectively. From Tables 5 and 6, one can observe that the Cai, WLRA, WLRR, and the proposed methods achieve the higher average PSNR and average FSIM values than the LRA and LRR coupled with AMF methods. This ensures that the Cai, WLRA, WLRR, and the proposed methods can perform better than the LRA and LRR coupled with AMF methods. The WLRR method can achieve the higher average PSNR and average FSIM values than the Cai and WLRA methods in most cases. It means that the WLRR methods are more effective in removing the mixed noise than the Cai and WLRA methods. The proposed algorithm obtains the highest average PSNR and average FSIM values in each case. Therefore, Tables 5 and 6 ensure that the proposed algorithm can not only effectively remove the mixed noise but also preserve edges and details well. Besides, Figures 11 and 12 show the bar plots of average PSNR and average FSIM values of different methods for six test images, respectively. From Figures 11 and 12, we can see that the proposed algorithm can perform better than other methods.Table 5
The denoising results (Average PSNR) of different methods for six test images.
Methods  Cai AMF+LRA AMF+LRR WLRA WLRR Proposed p=50% σ=5 30.88 29.51 29.60 30.49 30.95 31.74 σ=10 29.50 28.82 29.00 29.30 29.71 30.65 σ=15 28.05 27.89 28.19 28.27 28.86 29.43  p=60% σ=5 29.59 28.22 28.44 29.02 29.33 30.06 σ=10 28.57 27.65 28.09 28.09 28.57 29.25 σ=15 27.50 26.78 27.33 27.11 27.75 28.41Table 6
The denoising results (average FSIM) of different methods for six test images.
Methods  Cai AMF+LRA AMF+LRR WLRA WLRR Proposed p=50% σ=5 0.9650 0.9567 0.9570 0.9649 0.9662 0.9704 σ=10 0.9486 0.9466 0.9461 0.9503 0.9516 0.9559 σ=15 0.9218 0.9287 0.9305 0.9322 0.9350 0.9388  p=60% σ=5 0.9535 0.9465 0.9461 0.9527 0.9540 0.9584 σ=10 0.9355 0.9335 0.9321 0.9367 0.9372 0.9433 σ=15 0.9132 0.9124 0.9165 0.9183 0.9208 0.9242Figure 11
The bar blots of average FSIM values of different methods for six test images. (a)p=50%. (b) p=60%.
(a) (b)Figure 12
The bar blots of average FSIM values of different methods for six test images. (a)p=50%. (b) p=60%.
(a) (b)Figure13 shows the denoising results of different methods for Lena image, which is corrupted by the AWGN (σ=10) plus SPIN (p=50%). From Figures 13(d) and 13(e), it can be seen that the LRA and LRR coupled with AMF methods can remove the mixed noise, but they blur the edges. From Figures 13(c), 13(f), and 13(g), one can observe that the Cai, WLRR, and WLRA methods can remove the mixed noise and meanwhile preserve the edges. It means that the Cai, WLRR, and WLRA methods can perform better than the LRA and LRR coupled with AMF methods in image denoising and edge preservation. However, the Cai, WLRR, and WLRA methods cannot preserve the details well. From Figure 13(h), one can observe that the proposed algorithm obtains the more visually pleasant denoising result by reconstructing much cleaner and sharper image edges and details than other compared methods. Hence, Figure 13 shows that the proposed algorithm outperforms other compared methods in terms of image denoising and edge preservation. Figure 14 shows the denoising results of different methods for Boat image, which is corrupted by the AWGN (σ=10) plus SPIN (p=50%). From Figure 14, similar conclusions to Figure 13 can be obtained.Figure 13
Denoising results of different methods for Lena image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=50%). From (c) to (h): denoising results of Cai, AMF+LRA, AMF+LRR, WLRA, WLRR, and the proposed algorithm.
(a) (b) (c) (d) (e) (f) (g) (h)Figure 14
Denoising results of different methods for Boat image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=50%). From (c) to (h): denoising results of Cai, AMF+LRA, AMF+LRR, WLRA, WLRR, and the proposed algorithm.
(a) (b) (c) (d) (e) (f) (g) (h)To further validate the above conclusions, some enlarged detail images of the denoising results of different methods are given. Figure15 presents the comparisons of enlarged Lena images of different methods. The Lena image is corrupted by the AWGN (σ=10) plus SPIN (p=50%). From Figures 15(d) and 15(e), one can see that the LRA and LRR coupled with AMF methods cannot effectively remove the mixed noise and blur the tassel. Figures 15(c), 15(f), and 15(g) show that the Cai, WLRR, and WLRA methods can remove the mixed noise, but they cannot preserve the tassel well. From Figure 15(h), it can be seen that the proposed algorithm can not only remove the mixed noise but also preserve the tassel well. Hence, Figure 15 shows that the proposed algorithm can perform better than other methods in terms of noise suppression and detail preservation. Figure 16 presents the comparisons of enlarged Boat images of different methods. The Boat image is corrupted by the AWGN (σ=10) plus SPIN (p=50%). Similar conclusions to Figure 15 can be obtained from Figure 16.Figure 15
Enlarged denoising results of different methods for Lena image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=50%). From (c) to (h): denoising results of Cai, AMF+LRA, AMF+LRR, WLRA, WLRR, and the proposed algorithm.
(a) (b) (c) (d) (e) (f) (g) (h)Figure 16
Enlarged denoising results of different methods for Boat image. (a) Noise-free image. (b) Image corrupted by mixed noise (AWGN+SPIN,σ=10, p=50%). From (c) to (h): denoising results of Cai, AMF+LRA, AMF+LRR, WLRA, WLRR, and the proposed algorithm.
(a) (b) (c) (d) (e) (f) (g) (h)


## 6. Conclusions

In this paper, we propose an algorithm for restoring images corrupted by Gaussian noise plus salt-and-pepper noise. Firstly, a noise classification method is presented to identify different noisy pixels in the corrupted image. The noise classification method judges the gray level difference between the current pixel and its neighborhood pixels by introducing a variance parameter and identifies the salt-and-pepper noise corrupted pixels by combining the variance parameter and gray level extreme. Then, based on the result of noise classification, an adaptive directional weighted mean filter is proposed to remove the salt-and-pepper noise based on the multidirectional image information, which can preserve edges and details by adaptively selecting the optimal direction template and restore each salt-and-pepper noise corrupted pixels by the weighted mean gray level of pixels on the optimal template. Finally, an improved adaptive anisotropic diffusion model is introduced to remove Gaussian noise in the initial denoised image, which can enhance the image features by finely classifying image feature as four types and preserve edges and details by conducting the adaptive anisotropic diffusion for different image features. The experimental results clearly demonstrate that the proposed algorithm outperforms many other existing main mixed noise removal methods in terms of both quantitative measure and visual perception. However, the proposed algorithm has a limitation that it cannot effectively restore the salt-and-pepper noise corrupted image with high salt-and-pepper noise density. Hence, we will try our best to solve the problem in the subsequent study.



---

*Source: 6492696-2018-07-26.xml*