# An Improved Image Denoising Model Based on Nonlocal Means Filter

Authors: Yan Jin; Wenyu Jiang; Jianlong Shao; Jin Lu
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

The nonlocal means filter plays an important role in image denoising. We propose in this paper an image denoising model which is a suitable improvement of the nonlocal means filter. We compare this model with the nonlocal means filter, both theoretically and experimentally. Experiment results show that this new model provides good results for image denoising. Particularly, it is better than the nonlocal means filter when we consider the denoising for natural images with high textures.


---

## Body

## 1. Introduction

Letf:Ω→R be a noisy image that we want to deal with. The aim of image denoising is to recover the original image u:Ω→R from a noisy image f=u+v, where v is the noise. This is an inverse problem, and in general there is no solution. Nevertheless, there are many useful methods to deal with this problem, for example, the median filter, the Wiener filter, the bilateral filter, variational methods [1–5], sparse representation based methods [6], wavelet-based methods [7], the convolutional neural network based methods [8–10], nonlocal self-similarity based methods [11–20], and collaborative filtering methods [12–15, 21–23].Among all, nonlocal self-similarity models received recently much attention and play an important role in image processing. K. Dabovet al. [15] proposed the sparse 3D transform-domain collaborative filtering (BM3D) method, in which one exploits the inherent nonlocal self-similarity property of natural images, groups similar 2D image fragments into 3D groups, and then deals with these 3D groups by the developed collaborative filtering procedure. The BM3D and its variants proposed in [15, 21–26] have been demonstrated to achieve state-of-the-art performance. In [21, 22], the BM3D is applied for coherent noise reduction in digital holography. In [23], an iterative algorithm combining BM3D technique was proposed for the salt and paper (S&P) noise removal. In [24], V. Katkovniket al. introduced the CD-BM3D and iterative CD-BM3D algorithms based on BM3D for interferometric phase image estimation. The nonlocal means filter (NLM) proposed by Buadeset al. [11], known for its simplicity and excellent ability to efficiently remove additive white Gaussian noise (AWGN) while preserving edges, has triggered an important and continuous development in image processing. Not only lots of the NLM’s modified versions, the mixed schemes integrating NLM idea, and NLM-based iterative approaches are applied to remove AWGN, but also other kinds of noise, such as signal-dependent nonadditive speckle noise [16], additive mixed noise [14], and S&P noise [17]. Existing NLM-based iterative approaches have also been shown to provide better results than their predecessors [17–19]. In [18], MRI deniosing was performed by a union method (the Wiener enhanced NLM), in which the noisy MR image was deniosed successively by the traditional median filter, the Wiener filter, and the NLM filter. The experiments demonstrated that the union method obtained better results than the NLM for denoising MRI corrupted by AWGN [18]. H.Y. Liuet al. [19] proposed a two-steps iterative regularized denoising approach based on the NLM and the total variation. First the prefiltered image was obtained by using the NLM with the improved similarity weights. Then, they presented a modified TV model based on the prefiltered image to achieve final denoised results. X.T. Wanget al. [17] proposed an iterative nonlocal means filter for S&P noise removal (S&P-INLM). S&P-INLM includes three stage operations. First, a spatial hard threshold method is used to mark the positions of noisy pixels and noise-free pixels of an image corrupted by S&P noise, and then the noisy pixels in the image are prefiltered by a median filter while noise-free pixels are left unchanged. The prefiltering is used to make the noise distribution in the prefiltered image close to the Gaussian distribution. Finally, the noisy pixels in the prefiltered image are filtered by the proposed NLM-based iterative algorithm [17], while noise-free pixels are not filtered. The scheme proposed in [17] is based on the detection results of noisy pixels’ position and has achieved good results in removing S&P noise. However it is not suitable for the white Gaussian noise removal since the positions of the noisy pixels corrupted by white Gaussian noise are hard to detect.As mentioned above, in image processing, nonlocal self-similarity based methods play an important role in image denoising. Recently, the BM3D and its modifications have been shown to outperform the NLM in many cases. Nevertheless, the NLM is still popular due to its advantages that the algorithm is simple and has good denoising performance while preserving edges. In this paper, we want to present an improved NLM-based approach for removing AWGN from noisy natural images, which is different from previous NLM-based iterative schemes and NLM modifications. Our proposed model has better denoising performance than the NLM for natural images with high textures, while its computation is almost as simple as the NLM.Motivated by the Yaroslavsky filter [27], Buades, Coll and Morel proposed the original NLM [11]. This model is given by (1)ux=NLMfx=1cx∫Ωe-dafx,fy/h2fydy,where x∈Ω, y∈Ω, and da is defined by(2)dafx,fy=∫ΩGatfx+t-fy+t2dt.Here Ga is a Gaussian kernel with standard deviation a, and c(x) in (1) is defined by(3)cx=∫Ωe-dafx,fy/h2dy.We define(4)ωx,y=exp⁡-dafx,fyh2,as a weight that measures the similarity of f between a neighborhood of x and a neighborhood of y. The parameter h in (4) controls the decay of the weight. In order to ensure that only pixels with a similar neighborhood have a large weight, h usually corresponds to the standard deviation of the image noise. Formula (1) is equivalent to (5)ux=NLMf≔1ω-x∫Ωfyωx,ydywhere ω- is defined by (6)ω-x=∫Ωωx,ydy.u is the denoised image for f. In many applications one gets a very good denoised image u, though this model is very simple. This indicates that the weight ω captures the feature of images very well. There are other choices of the weight ω. Here, we just use this weight.Numerically the nonlocal means filter could be written as(7)Nfi=1∑jωij∑jωijfj,if we denote a digital image by a function f:[1,N]×[1,M]→R.Variational methods also work quite well for image denoising. In variational methods one considers the minimizer of a suitable functional, which usually satisfies a partial differential equation. Then we use the minimizer as the denoised image. This is one way to study the inverse problem mentioned at the beginning of this paper. The most popular functional used in image processing are the Dirichlet functional(8)12∫∇u2xdxand the TV functional(9)∫∇uxdx.According to these functionals there are H1 models and TV models for image denoising. Particularly the TV model (10)∫∇uxdx+λ∫u-f2xdxproposed by Rudin, Osher, and Fatemi [1] is very useful in image processing.Motivated by the work of Kindermann, Osher, and Jones [28], Gilboa and Osher [20, 29] wanted to combine the TV model and the nonlocal means filter into a nonlocal TV model, so that the corresponding H1 model is just a regularization of the nonlocal means filter. They realized this idea successfully, by introducing suitable nonlocal operators, which was motivated by the work of Zhou-schölkopf [30, 31]. Having nonlocal operators, it is natural to propose a nonlocal version of the ROF model, the NLTV model [20], and other some nonlocal models. The nonlocal models they proposed are very useful in image processing. Their models have been used and extended in various problems; see, for example, [32–40].Motivated by the work of Gilboa-Osher and the work in geometric analysis (see, for example, [41]), Jin-Jost-Wang proposed new nonlocal operators [42]. These new nonlocal operators match the geometric structure of images well by using the weight ω. With these new nonlocal operators, they proposed a new nonlocal H1 model [43]. The new nonlocal H1 model provides good denoising results. By experiments we found that with only a few iterations in this nonlocal H1 model one can already obtain very good results for image denoising. This motivates us to propose in this paper an improved nonlocal means filter model (INLM)(11)u=14f+12Nf+14NNf.Here N is defined by (5) and N(N(f)) denotes the twice use of the nonlocal means filter N.The computation of INLM is almost as simple as the NLM. Our experiments show that the INLM model is much better thanN(N(f)) and also better than the nonlocal means filter (NLM) for many images with higher textures.


## 2. A New NonlocalH1 Model and Its Discrete Version

In [42, 43] Jin-Jost-Wang introduced a new nonlocal variational setting, under which they obtained the same nonlocal Dirichlet functional, but a different nonlocal TV model and a different H1 model.In this section we first briefly recall this new nonlocal variational setting and then present its discrete version, especially the discrete version of the new nonlocalH1 model. Motivated by this model we propose at the end of this section our model as an improved nonlocal means filter.


### 2.1. A New NonlocalH1 Model

Letf:Ω→R be a noisy image that we want to consider and the weight ω:Ω×Ω→R, computed by (4), which measures the similarity of images. Let ω-:Ω→R be defined by (6). Motivated by differential geometry, in [42] the authors used ω and ω- to define the L2-norms for functions u:Ω→R and vector field p:Ω×Ω→R. First one defines a scalar product for functions with respect to ω- by(12)u1,u2Lω-2≔∫u1xu2xω-xdx.Hence the Lω-2-norm for functions is defined by (13)uLω-22=u,uLω-2=∫u2xω-xdx.For vector fields one defines a scalar product with respect to ω(x,y) by(14)p,qLω-2≔∫px,yqx,yωx,ydxdy,for any pair of vector fields p,q:Ω×Ω→R. The difference vector field of a function (an image) u:Ω→R is defined by(15)Dux,y=uy-ux,which is different from the nonlocal gradient vector field given in [20, 29, 30]. Here one views ω- as a metric. A map p:Ω×Ω→R is viewed as a vector field. Using ω and ω- one can define the divergence operator divp:Ω→R by(16)divpx≔1ω-x∫px,y-py,xωx,ydy.Then one can check that for any u:Ω→R and p:Ω×Ω→R(17)Du,pLω-2=u,divpLω-2.From this variational setting it is natural to define a (nonlocal) Dirichlet functional (18)14Du,DuLω-2=14∫Ω∫Ωux-uy2ωx,ydxdy=Juand a (nonlocal) Laplacian of functions (19)Δω-ux≔12divDu=1ω-x∫uy-uxωx,ydy=u-x-ux,which can also be defined directly from the difference operator D and the divergence operator div. This functional (18) is a regularization of the nonlocal means filter, which is the same as the functional obtained by Gilboa and Osher. However, the viewpoint of Jin-Jost-Wang is different from that of Gilboa and Osher. This difference leads Jin-Jost-Wang to introduce a different nonlocal TV model and H1 model in [43]. Here we only consider the H1 model [43], (20)Fu=Du+λ2f-uLω-2=14∫∫uy-ux2ωx,ydydx+λ2∫u-f2xω-xdxThe difference to the nonlocal setting of Gilboa-Osher appears only in the fidelity term, where a different definition of L2-norm of a function is used. This difference makes (though slightly) different between Gilboa-Osher’s nonlocal H1 model and Jin-Jost-Wang’s H1 model. It was showed that Jin-Jost-Wang’s nonlocal H1 model is more closer the nonlocal means filter than Gilboa-Osher’s nonlocal H1 model. The Euler-Lagrange equation of (20) is(21)Δω-u=λu-f,or equivalently(22)ux-u-x=-λu-fx.


### 2.2. Its Discrete Version

In this subsection, we present the discrete version of the new nonlocalH1 model, which has its own interest. Now we represent a digital image by a (discrete) function u:Ω→R, where Ω is a set {k,l∣1≤k≤M,1≤l≤N}. Hence u is a digital image with pixels M×N. For simplicity, we denote u(i) by ui for i∈Ω. The weight ω:Ω×Ω→R is denoted by ωij, an MN×MN symmetric matrix with nonnegative entries. Then ω-:Ω→R is given by(23)ω-i=∑j∈Ωωij,which is a discrete version of  ω-. For a digital image u we define its weight L2-norm by (24)uLω¯2=∑iui2ω-i1/2.This is the discrete version of (13). For a pair of u,v:Ω→R we define a scalar product by(25)u,vL2=∑iuiviω-i.Then the difference vector field defined above is given by(26)duij=uj-ui,which is a discrete version of (15). As above a map from Ω×Ω→R is considered as a vector field. For a pair of vector fields p,q:Ω×Ω→R we define a scalar product(27)p,q=∑i,jpijqijωij.From the scalar product we have a weight L2-norm of p, which is given by(28)pLω¯2=∑i,jpij2ωij1/2.Now for a vector field p:Ω×Ω→R, its divergence divp:Ω→R is defined by(29)divpi≔1ω-i∑jpji-pijωij.One can then check as above: for any u:Ω→R and p:Ω×Ω→R(30)∇u,pL2=u,divpL2.This means that div is the adjoint operator of d. Now with the gradient operator and the divergence operator we can define the (normalized) Laplacian of function u as above by (19)(31)Δu≔12div∇uor equivalently,(32)Δui≔u¯i-ui,where u-:Ω→R is the nonlocal average of u(33)u-i=1ω-i∑juiωij.A (discrete) function u satisfying Δu=0, or equivalent u-u-=0, is called a harmonic function. It is easy to check that a harmonic function is a critical point of the following nonlocal Dirichlet energy: (34)Ju=14du2=14∑ijuj-ui2ωij.This functional is the discrete version of functional (18), which is viewed as a regularization of the nonlocal means filter. Now the new nonlocal H1 model has the following discrete version:(35)Fu=Ju+λ2f-uL2=14∫∫uy-ux2ωx,ydydx+12∫u-f2xω-xdx=14∑ijuj-ui2ωij+λ2∑iui-fi2ω-i.One can easily check that the minimizer (critical) point of F satisfies(36)ui-u-i=-λui-fi,which is the discrete version of (22). To find a minimizer u, the following heat equation is considered in [43](37)ut=Δu-λu-f=-ux-u-x-λu-fx,which is the (negative) L2 gradient flow of F in the space of functions with the L2-norm with respect to ω. The discrete version of (37) is(38)uin+1=uin+Δt∑kωik∑lωiluln-uin+λΔtfi-uin=1-Δtuin+Δt∑kωik∑lωiluln+λΔtfi-uin,where uin=ui(nΔt). The initial condition is(39)ui0=fi.If 1≥Δt(1+λ), then the coefficients in (38) are nonnegative. Therefore we have the following.Proposition 1.
This algorithm is stable, provided that(40)1≥Δt1+λ.


### 2.3. An Improved Nonlocal Means Filter Model

In [43] Jin-Jost-Wang presented experiments to show that their new nonlocal H1 model is very good in image denoising. It was observed in [43] that with a few iterations one can already get good results. In this paper we choose λ=0 and Δt=1/2 and iterate (38) twice. For the first iteration of (38) we have(41)ui1=12fi+12Nfi.Then iterating formula (38) again we obtain(42)ui2=14fi+12Nfi+14NNfi.This is the model we want to propose in this paper. Let us rewrite it in the following form:(43)u=14f+12Nf+14NNf.Recall that N(N(f)) is the twice use of nonlocal means filter (NLM2). Our experiments show that our model (43) is much better than N(N(f)) and also better than the nonlocal means filter for many images as shown in our experiments.


## 2.1. A New NonlocalH1 Model

Letf:Ω→R be a noisy image that we want to consider and the weight ω:Ω×Ω→R, computed by (4), which measures the similarity of images. Let ω-:Ω→R be defined by (6). Motivated by differential geometry, in [42] the authors used ω and ω- to define the L2-norms for functions u:Ω→R and vector field p:Ω×Ω→R. First one defines a scalar product for functions with respect to ω- by(12)u1,u2Lω-2≔∫u1xu2xω-xdx.Hence the Lω-2-norm for functions is defined by (13)uLω-22=u,uLω-2=∫u2xω-xdx.For vector fields one defines a scalar product with respect to ω(x,y) by(14)p,qLω-2≔∫px,yqx,yωx,ydxdy,for any pair of vector fields p,q:Ω×Ω→R. The difference vector field of a function (an image) u:Ω→R is defined by(15)Dux,y=uy-ux,which is different from the nonlocal gradient vector field given in [20, 29, 30]. Here one views ω- as a metric. A map p:Ω×Ω→R is viewed as a vector field. Using ω and ω- one can define the divergence operator divp:Ω→R by(16)divpx≔1ω-x∫px,y-py,xωx,ydy.Then one can check that for any u:Ω→R and p:Ω×Ω→R(17)Du,pLω-2=u,divpLω-2.From this variational setting it is natural to define a (nonlocal) Dirichlet functional (18)14Du,DuLω-2=14∫Ω∫Ωux-uy2ωx,ydxdy=Juand a (nonlocal) Laplacian of functions (19)Δω-ux≔12divDu=1ω-x∫uy-uxωx,ydy=u-x-ux,which can also be defined directly from the difference operator D and the divergence operator div. This functional (18) is a regularization of the nonlocal means filter, which is the same as the functional obtained by Gilboa and Osher. However, the viewpoint of Jin-Jost-Wang is different from that of Gilboa and Osher. This difference leads Jin-Jost-Wang to introduce a different nonlocal TV model and H1 model in [43]. Here we only consider the H1 model [43], (20)Fu=Du+λ2f-uLω-2=14∫∫uy-ux2ωx,ydydx+λ2∫u-f2xω-xdxThe difference to the nonlocal setting of Gilboa-Osher appears only in the fidelity term, where a different definition of L2-norm of a function is used. This difference makes (though slightly) different between Gilboa-Osher’s nonlocal H1 model and Jin-Jost-Wang’s H1 model. It was showed that Jin-Jost-Wang’s nonlocal H1 model is more closer the nonlocal means filter than Gilboa-Osher’s nonlocal H1 model. The Euler-Lagrange equation of (20) is(21)Δω-u=λu-f,or equivalently(22)ux-u-x=-λu-fx.


## 2.2. Its Discrete Version

In this subsection, we present the discrete version of the new nonlocalH1 model, which has its own interest. Now we represent a digital image by a (discrete) function u:Ω→R, where Ω is a set {k,l∣1≤k≤M,1≤l≤N}. Hence u is a digital image with pixels M×N. For simplicity, we denote u(i) by ui for i∈Ω. The weight ω:Ω×Ω→R is denoted by ωij, an MN×MN symmetric matrix with nonnegative entries. Then ω-:Ω→R is given by(23)ω-i=∑j∈Ωωij,which is a discrete version of  ω-. For a digital image u we define its weight L2-norm by (24)uLω¯2=∑iui2ω-i1/2.This is the discrete version of (13). For a pair of u,v:Ω→R we define a scalar product by(25)u,vL2=∑iuiviω-i.Then the difference vector field defined above is given by(26)duij=uj-ui,which is a discrete version of (15). As above a map from Ω×Ω→R is considered as a vector field. For a pair of vector fields p,q:Ω×Ω→R we define a scalar product(27)p,q=∑i,jpijqijωij.From the scalar product we have a weight L2-norm of p, which is given by(28)pLω¯2=∑i,jpij2ωij1/2.Now for a vector field p:Ω×Ω→R, its divergence divp:Ω→R is defined by(29)divpi≔1ω-i∑jpji-pijωij.One can then check as above: for any u:Ω→R and p:Ω×Ω→R(30)∇u,pL2=u,divpL2.This means that div is the adjoint operator of d. Now with the gradient operator and the divergence operator we can define the (normalized) Laplacian of function u as above by (19)(31)Δu≔12div∇uor equivalently,(32)Δui≔u¯i-ui,where u-:Ω→R is the nonlocal average of u(33)u-i=1ω-i∑juiωij.A (discrete) function u satisfying Δu=0, or equivalent u-u-=0, is called a harmonic function. It is easy to check that a harmonic function is a critical point of the following nonlocal Dirichlet energy: (34)Ju=14du2=14∑ijuj-ui2ωij.This functional is the discrete version of functional (18), which is viewed as a regularization of the nonlocal means filter. Now the new nonlocal H1 model has the following discrete version:(35)Fu=Ju+λ2f-uL2=14∫∫uy-ux2ωx,ydydx+12∫u-f2xω-xdx=14∑ijuj-ui2ωij+λ2∑iui-fi2ω-i.One can easily check that the minimizer (critical) point of F satisfies(36)ui-u-i=-λui-fi,which is the discrete version of (22). To find a minimizer u, the following heat equation is considered in [43](37)ut=Δu-λu-f=-ux-u-x-λu-fx,which is the (negative) L2 gradient flow of F in the space of functions with the L2-norm with respect to ω. The discrete version of (37) is(38)uin+1=uin+Δt∑kωik∑lωiluln-uin+λΔtfi-uin=1-Δtuin+Δt∑kωik∑lωiluln+λΔtfi-uin,where uin=ui(nΔt). The initial condition is(39)ui0=fi.If 1≥Δt(1+λ), then the coefficients in (38) are nonnegative. Therefore we have the following.Proposition 1.
This algorithm is stable, provided that(40)1≥Δt1+λ.


## 2.3. An Improved Nonlocal Means Filter Model

In [43] Jin-Jost-Wang presented experiments to show that their new nonlocal H1 model is very good in image denoising. It was observed in [43] that with a few iterations one can already get good results. In this paper we choose λ=0 and Δt=1/2 and iterate (38) twice. For the first iteration of (38) we have(41)ui1=12fi+12Nfi.Then iterating formula (38) again we obtain(42)ui2=14fi+12Nfi+14NNfi.This is the model we want to propose in this paper. Let us rewrite it in the following form:(43)u=14f+12Nf+14NNf.Recall that N(N(f)) is the twice use of nonlocal means filter (NLM2). Our experiments show that our model (43) is much better than N(N(f)) and also better than the nonlocal means filter for many images as shown in our experiments.


## 3. Experiments

In experiments we want compare our model (43), which is denoted as INLM with NLM (1), (7) and NLM2.For experiments, the first task is how to compute the weightω. We compute it by following the method given in [11]. For a given image f:Ω→R one computes the weight by using the difference of patches around each point (pixel). The patch px(f) of size r×r around x∈Ω is given by(44)pxft=fx+t,fort∈-r-12,…,r-122,where r is an odd integer. Let da be the Gaussian weight Euclidean distance, i.e.,(45)dax,y=pxf-pyfa2,where pxf-pyfa2 is the discrete version of (46)∫R2Gafx+t-fy+t2dt.Now the weight we will use is computed by (47)ωx,y=e-dax,y/h2.In the computation of the weightω we use r=5, i.e., patch of size 5×5. The search window as mentioned above is of size 11×11.Give a noisy imagef=u0+v0, where u0 is the ordinary true image and v0 is a random noise (white Gaussian noise) with mean zero and standard deviation σ. In order to compare different models, we use the peak signal-to-noise ratio (PSNR) to measure images and compare noisy images and denoised images. The peak signal-to-noise ratio (PSNR) is defined by(48)PSNR=10·log10MAXu2MSE,where MAXu is the maximum possible pixel value of the image u.MSE is the mean squared error defined by(49)MSE=1MN∑i=0M-1∑j=0N-1ui,j-u0i,j2.Here u denotes the denoised image from the noisy image f.


### 3.1. On Test Images

The images we use are taken from USC-SIPI image database with the same name and three standard test images (Cameraman, Barbara, and Lena). The three standard test images and USC-SIPI images database are widely used in the image processing literature, for example, [2, 11, 20, 36, 40]. All images in this experiment are of size 256×256.The parameterh in (47) usually corresponds to the standard derivation of the noise. If h is small, noise remains in the denoised image, while larger h will oversmooth the image. So if NLM is applied twice, h should be large for the first time and much smaller for the second. In our experiments, for the first use of NLM we searched the best h (i.e., the best ω), denoted by h1, so thatPSNR of denoised images N(f) has the largest value. Then we applied NLM method again to denoised images N(f) to get denoised images N(N(f)) and used N(f) to calculate the weight ω (47) and the weighted average value (7), here using N(f) is better than using f. For the second use of NLM we also searched the best h, denoted by h2, to makePSNR of N(N(f)) be the highest. The experiment results are presented in Table 1; the corresponding denoised images are showed in Figures 1 and 2.Table 1
PSNR values of noisy images and denoised images.
Images h 1 h 2 PSNR values noisy imageσ=10 NLM NLM2 INLM Cameraman 13.04 8.37 28.15 31.50 30.40 32.05 Lena 12.25 8.37 28.15 32.89 31.96 32.77 Barbara 13.42 10.00 28.14 30.79 29.97 31.33 1.1.10 10.49 8.37 28.14 30.70 29.77 31.01 1.1.11 9.49 7.07 28.14 29.97 29.03 30.32 1.1.12 9.49 6.32 28.14 29.79 28.83 30.29 1.1.13 11.40 8.94 28.13 30.04 28.96 30.58 1.3.01 11.83 8.94 28.14 30.68 29.91 31.10 1.3.02 10.49 7.07 28.14 31.11 30.42 31.29 1.4.02 10.49 8.37 28.09 32.11 31.48 32.33 1.5.03 10.49 7.07 28.13 30.87 30.04 31.15Figure 1
Denoising of Cameraman, Barbara, and Lena images using three different methods, respectively. From top to bottom: the original imagesu0, noisy images f with a white Gaussian noise (σ=10), and denoised images u by NLM, NLM2, and INLM.Figure 2
Denoising of the images using three different methods. The images from top to bottom are 1.1.10, 1.1.11, 1.1.12 1.1.13, 1.3.01, and 1.5.03, respectively. The first column: the original imagesu0, the second column: noisy images f with a white Gaussian noise (σ=10), respectively, the third column: denoised images by NLM, the forth column: denoised images by NLM2, and the fifth column: denoised images by INLM.The experiment shows that PSNR of denoised image by INLM is much better than NLM2. It is also better than NLM for most images. INLM improves the NLM, while NLM2 gets worse results than the NLM.In Figures3, 4, and 5 we present local zooming images taken from the Barbara image and the 1.1.13 image. From these three images one can see that the denoised images obtained by the INLM model are closer to the original images than the denoised images by the NLM model. The INLM model can preserve more image edges and details while deniosing.Figure 3
A local zoomed-in zone of the Barbara image. Top left: the original image, top right: the noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 4
A local zoomed-in zone of the Barbara image. Top left: the original image, top right: noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 5
A local zoomed-in zone of the image 1.1.13. Top left: the original image, top right: the noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.We also compared our INLM with the Wiener enhanced NLM proposed in [18]. The experiments in [18] demonstrated that the Wiener enhanced NLM [18] has much better performance than the NLM for removing AWGN from MR images. We wonder how it performs for removing AWGN from noisy natural images. Based on this consideration, we applied the Wiener enhanced NLM [18] to the natural images as shown in Table 1: Cameraman, Barbara, Lena, Images 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.3.01, 1.3.02, 1.4.02, and 1.5.03, corrupted by AWGN with the standard derivation σ=10, respectively. The experiment results showed that the PSNRs of the denoised images by the Wiener enhanced NLM [18] are lower than NLM, NLM2, and our model INLM. It means that, for denoising natural images corrupted by AWGN, the Wiener enhanced NLM [18] does not perform as well as when denoising MRI corrupted by AWGN.


### 3.2. On Real Images

In order to further illustrate the performance and the robustness of our model, we also apply our INLM model to real natural images and compare the results with those obtained by NLM and NLM2. Three real images used in the experiments are of size512×512 and shown in Figures 6, 7, and 8. We use the blind metric BRISQUE proposed by A. Mittalet al. [44] to assess denoised images. BRISQUE is one of the state-of-the-art blind no-reference image quality metrics when noise level in the image is unknown. The smaller the BRISQUE value is, the better the performance of image restoration is [44]. We calculate BRISQUE values by directly using the software of BRISQUE which is available online at http://live.ece.utexas.edu/research/quality/.Figure 6
Denoising of the image 1 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 7
Denoising of the image 2 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 8
Denoising of the image 3 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.In this experiment, let the decay parameterh1=7.0 and h2=3.0. The experiment results in Table 2 show that BRISQUE values of denoised image by INLM are the smallest, which means that INLM is better than other two models. The corresponding denoised images are showed in Figures 6, 7, and 8.Table 2
BRISQUE values of denoised images by NLM, NLM2, and INLM.
Real images no. BRISQUE values of denoised images NLM NLM2 INLM 1 16.0894 22.8669 9.7968 2 13.1608 18.0299 9.1733 3 3.3613 6.4891 0.0729


## 3.1. On Test Images

The images we use are taken from USC-SIPI image database with the same name and three standard test images (Cameraman, Barbara, and Lena). The three standard test images and USC-SIPI images database are widely used in the image processing literature, for example, [2, 11, 20, 36, 40]. All images in this experiment are of size 256×256.The parameterh in (47) usually corresponds to the standard derivation of the noise. If h is small, noise remains in the denoised image, while larger h will oversmooth the image. So if NLM is applied twice, h should be large for the first time and much smaller for the second. In our experiments, for the first use of NLM we searched the best h (i.e., the best ω), denoted by h1, so thatPSNR of denoised images N(f) has the largest value. Then we applied NLM method again to denoised images N(f) to get denoised images N(N(f)) and used N(f) to calculate the weight ω (47) and the weighted average value (7), here using N(f) is better than using f. For the second use of NLM we also searched the best h, denoted by h2, to makePSNR of N(N(f)) be the highest. The experiment results are presented in Table 1; the corresponding denoised images are showed in Figures 1 and 2.Table 1
PSNR values of noisy images and denoised images.
Images h 1 h 2 PSNR values noisy imageσ=10 NLM NLM2 INLM Cameraman 13.04 8.37 28.15 31.50 30.40 32.05 Lena 12.25 8.37 28.15 32.89 31.96 32.77 Barbara 13.42 10.00 28.14 30.79 29.97 31.33 1.1.10 10.49 8.37 28.14 30.70 29.77 31.01 1.1.11 9.49 7.07 28.14 29.97 29.03 30.32 1.1.12 9.49 6.32 28.14 29.79 28.83 30.29 1.1.13 11.40 8.94 28.13 30.04 28.96 30.58 1.3.01 11.83 8.94 28.14 30.68 29.91 31.10 1.3.02 10.49 7.07 28.14 31.11 30.42 31.29 1.4.02 10.49 8.37 28.09 32.11 31.48 32.33 1.5.03 10.49 7.07 28.13 30.87 30.04 31.15Figure 1
Denoising of Cameraman, Barbara, and Lena images using three different methods, respectively. From top to bottom: the original imagesu0, noisy images f with a white Gaussian noise (σ=10), and denoised images u by NLM, NLM2, and INLM.Figure 2
Denoising of the images using three different methods. The images from top to bottom are 1.1.10, 1.1.11, 1.1.12 1.1.13, 1.3.01, and 1.5.03, respectively. The first column: the original imagesu0, the second column: noisy images f with a white Gaussian noise (σ=10), respectively, the third column: denoised images by NLM, the forth column: denoised images by NLM2, and the fifth column: denoised images by INLM.The experiment shows that PSNR of denoised image by INLM is much better than NLM2. It is also better than NLM for most images. INLM improves the NLM, while NLM2 gets worse results than the NLM.In Figures3, 4, and 5 we present local zooming images taken from the Barbara image and the 1.1.13 image. From these three images one can see that the denoised images obtained by the INLM model are closer to the original images than the denoised images by the NLM model. The INLM model can preserve more image edges and details while deniosing.Figure 3
A local zoomed-in zone of the Barbara image. Top left: the original image, top right: the noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 4
A local zoomed-in zone of the Barbara image. Top left: the original image, top right: noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 5
A local zoomed-in zone of the image 1.1.13. Top left: the original image, top right: the noisy image with a white Gaussian noise (σ=10), bottom left: denoised image by NLM, bottom middle: denoised image by NLM2, and bottom right: denoised image by INLM.We also compared our INLM with the Wiener enhanced NLM proposed in [18]. The experiments in [18] demonstrated that the Wiener enhanced NLM [18] has much better performance than the NLM for removing AWGN from MR images. We wonder how it performs for removing AWGN from noisy natural images. Based on this consideration, we applied the Wiener enhanced NLM [18] to the natural images as shown in Table 1: Cameraman, Barbara, Lena, Images 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.3.01, 1.3.02, 1.4.02, and 1.5.03, corrupted by AWGN with the standard derivation σ=10, respectively. The experiment results showed that the PSNRs of the denoised images by the Wiener enhanced NLM [18] are lower than NLM, NLM2, and our model INLM. It means that, for denoising natural images corrupted by AWGN, the Wiener enhanced NLM [18] does not perform as well as when denoising MRI corrupted by AWGN.


## 3.2. On Real Images

In order to further illustrate the performance and the robustness of our model, we also apply our INLM model to real natural images and compare the results with those obtained by NLM and NLM2. Three real images used in the experiments are of size512×512 and shown in Figures 6, 7, and 8. We use the blind metric BRISQUE proposed by A. Mittalet al. [44] to assess denoised images. BRISQUE is one of the state-of-the-art blind no-reference image quality metrics when noise level in the image is unknown. The smaller the BRISQUE value is, the better the performance of image restoration is [44]. We calculate BRISQUE values by directly using the software of BRISQUE which is available online at http://live.ece.utexas.edu/research/quality/.Figure 6
Denoising of the image 1 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 7
Denoising of the image 2 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.Figure 8
Denoising of the image 3 using three different methods. Top left: the real image, top right: denoised image by NLM, bottom left: denoised image by NLM2, and bottom right: denoised image by INLM.In this experiment, let the decay parameterh1=7.0 and h2=3.0. The experiment results in Table 2 show that BRISQUE values of denoised image by INLM are the smallest, which means that INLM is better than other two models. The corresponding denoised images are showed in Figures 6, 7, and 8.Table 2
BRISQUE values of denoised images by NLM, NLM2, and INLM.
Real images no. BRISQUE values of denoised images NLM NLM2 INLM 1 16.0894 22.8669 9.7968 2 13.1608 18.0299 9.1733 3 3.3613 6.4891 0.0729


## 4. Conclusions

In this paper we first present a discrete version of Jin-Jost-Wang’s nonlocalH1 model which was proposed in [43]. Then we propose an improved nonlocal means filter (INLM) (43). This INLM is as simple as the NLM and is simpler than Jin-Jost-Wang’s nonlocal H1 model proposed in [43]. Our experiments show that this INLM restores the original image from noisy image very well while preserving the image edges and details. Particularly this model is much better than the method by using the NLM model twice. It is also better than the NLM model when we consider the denoising for images with high textures.



---

*Source: 8593934-2018-07-04.xml*