# Multiscale Hybrid Nonlocal Means Filtering Using Modified Similarity Measure

Authors: Zahid Hussain Shamsi; Dai-Gyoung Kim
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

A new multiscale implementation of nonlocal means filtering (MHNLM) for image denoising is proposed. The proposed algorithm also introduces a modification of the similarity measure for patch comparison. Assuming the patch as an oriented surface, the notion of a normal vectors patch is introduced. The inner product of these normal vectors patches is defined and then used in the weighted Euclidean distance of intensity patches as the weight factor. The algorithm involves two steps: the first step is a multiscale implementation of an accelerated nonlocal means filtering in the discrete stationary wavelet domain to obtain a refined version of the noisy patches for later comparison. The next step is to apply the proposed modification of standard nonlocal means filtering to the noisy image using the reference patches obtained in the first step. These refined patches contain less noise, and consequently the computation of normal vectors and partial derivatives is more precise. Experimental results show equivalent or better performance of the proposed algorithm compared to various state-of-the-art algorithms.


---

## Body

## 1. Introduction

The phenomenon of image degradation is quite natural due to the digitization and quantization processes in signal acquisition devices. Although various image denoising techniques have been extensively studied and effectively employed in the last two decades, the preservation of texture, edges, and fine details during image denoising is an open problem and needs rigorous treatment.In advance of the nonlocal methodology, a variety of variational [1–6] PDE [7–12] and wavelet based [13–16] approaches were proposed for image denoising that rely on the local features of image data. A major shift towards nonlocal filtering was initiated by the usage of bilateral filtering [17], which exploits spatial and intensity domains for image denoising. In this approach, spatially proximate pixels are given more weights in the similarity measure. Later on, the wavelet-based BLS-GSM [18] method provided the best results in terms of PSNR measure; however, these denoised images contain ringing artifacts and have low visual quality. More recently, Buades et al. [19] introduced nonlocal means filtering for image denoising. Although the PSNR of nonlocal means filtering was found to be less than the wavelet-based BLS-GSM [18], the notion of the patch-based approach combined with the idea of nonlocality has led to an entirely new way of attacking the problem. Earlier, approaches similar to nonlocal means were used for image inpainting [20] and texture synthesis [21]. Ever since the nonlocal means were proposed, more rigorous research for better estimation of parameters or finding suitable similarity measures has improved the performance of nonlocal means filtering for a variety of noise models in various image processing applications.Kervrann et al. [22] provided a theoretical foundation for an intuitive nonlocal means approach using Bayesian statistics. In this approach, refined adaptive dictionaries of similar patches are obtained using Bayesian estimation, while the irrelevant patches are rejected. Afterwards, these learned dictionaries are used for patch-based comparison using a modified similarity measure. Elad and Aharon [23] proposed learned dictionaries of patches using K-means SVD algorithm and then employed sparse representation using L
0 pseudonorm over the learned dictionaries for construction of denoised image. Tasdizen [24] proposed using the similarity of patches in the principal component analysis domain. Extensive research in patch-based denoising has resulted in state-of-the-art algorithms [25, 26]. Dabov et al. [25] achieved enhanced sparsity for similar patches in the predesigned 3D dictionaries like discrete cosine transform (DCT) or discrete Haar wavelets transform. These dictionaries are separable and can be extended from two-dimensional to three-dimensional form using tensor product. Furthermore, Mairal et al. [26] extended the dictionary learning approach [23] using L
1 norm for learning phase and L
0 pseudonorm for the final construction phase. The major distinction between this approach and [25] is the use of learning phase to construct a dictionary rather than to use a predesigned dictionary. The learned dictionary is developed either from the given noisy image or from a database of patches extracted from large collection of natural images.Several attempts have been made to relate nonlocal means filtering with the variational and PDE based image denoising techniques. Gilboa and Osher [27] provided an elegant interpretation of the nonlocal means approach as a generalization of variational and PDE-based formulations. Brox et al. [28] proposed a computationally efficient algorithm for nonlocal filtering that arranged the data in a cluster tree. This special arrangement further helps in preselection of similar patches. Also, an iterative version of nonlocal filtering based on the variational framework was suggested in [28]. Pizarro et al. [29] introduced a discrete version of variational formulation that exploits the nonlocal data and smoothness (NDS) constraints for a variety of generalized dissimilarity measures defined on the space of image patches. This formulation results in a new similarity measure that considers not only the patch similarity of the two selected pixels but also the similarity of the respective neighbors. Moreover, the formulation emphasized the connection between diffusion based approaches and NDS formulation. Yang and Jacob [30] proposed a unified variational framework for nonlocal regularization by introducing robust distance norm to determine interpatch distances. Furthermore, by using this formulation for inverse problems, theoretical justification is provided for heuristic iterative nonlocal means approaches. Tschumperlé and Brun [31] defined a patch space for implementing PDE-based diffusion or smoothing process.In addition to the photometric similarity, which is used for patch-based comparison, the patches contain much more information that requires the attention of researchers. With this motivation, we propose the notion of a normal vectors patch corresponding to each intensity patch. By employing this new notion in the second step of our algorithm, we achieve remarkably better results than most of the state-of-the-art algorithms in the presence of moderate or severe noise. Inspired by the special treatment of the central patch in [32], we also employ a slightly higher weight than in the standard nonlocal means approach. The weight value in our approach is associated with the central patch empirically through experiments. This modification has further improved our results.Earlier, Mahmoudi and Sapiro [33] have proposed the average gradient orientation difference in combination with nonlocal means filtering which seems to be similar to the second step of our proposed method. However, the approach of [33] significantly differs from the proposed approach due to two main reasons. Firstly, for [33], the average gradient information is employed only for preclassification of the intensity patches to increase the computational efficiency of standard nonlocal filtering without the modification of the classical similarity measure. Whereas, the proposed approach exploits the interactions of normal vectors patches for the modification of the similarity weights without any preclassification step. Secondly, the average gradient orientations of patches are used in [33] on the basis of the assumption that the average gradient direction is expected to be similar in the presence of additive white Gaussian noise. This assumption is somewhat arguable in the presence of severe noise level.The rest of the paper is organized as follows. A brief review of methodologies used in this paper is provided in Section2. The new multiscale algorithm and its implementation are explained in Section 3. Experimental results are described and discussed in Section 4, and conclusions are drawn in Section 5.


## 2. Preliminaries

### 2.1. Nonlocal Means Filtering

Consider a noisy gray-scale intensity image(1)
u
=
u
o
+
υ
0
,
σ
2
I
,where u
0 is the true noise free image to be recovered, υ represents the zero mean additive white Gaussian noise of known variance σ
2 and I is the Identity matrix with the same dimensions as those of the given image. Instead of the nonlocal filtering, it is preferable to use the notion of semilocal filtering. It was mentioned in [32] that considering the whole image to search for similar patches has no major benefit, with the exception of periodic or quasiperiodic images. Also, searching the whole image for each pixel is computationally too expensive. Therefore, in the rest of this paper, the term nonlocal means refers specifically to semilocal filtering. The nonlocal means filtering is defined [19] as follows:(2)
u
n
l
m
i
=
1
K
i
∑
j
∈
Δ
i
‍
w
i
,
j
u
j
,where u
n
l
m
i denotes the denoised value at pixel location i and w
i
,
j is the weight obtained by determining similarity of noisy intensity patches P
i and P
j around the central pixel i and its neighboring pixel j, respectively, within the search window Δ
i. The normalization factor is given by K
i
=
∑
j
∈
Δ
i
‍
w
i
,
j.The weights,w
i
,
j, are obtained using the Gaussian weighted L
2 norm [19]:(3)
w
i
,
j
i
≠
j
=
e
x
p
-
P
i
-
P
j
2
,
α
2
h
2
,where α is the standard deviation of Gaussian function to consider the spatial proximity of the central patch and its neighboring patches in the search window. The patches, in the search window, spatially closer to the central patch are assigned higher weights than those for the distant patches. The nonlocal means approach involves three parameters: the size of the patch P
i, the size of the search window Δ
i, and the filtering or smoothing parameter h. Detailed discussions on the suitable choices of these parameters can be found in [32, 34].Note that the similarity measure, given in (3), trivially assigns the largest value of 1 to the patch when compared to itself, so that the central patch has the weight 1 as P
i
-
P
j
2
,
α
2
=
0 for i
=
j. However, the weight value assigned to the central patch may not be reliable for the noisy image data. To avoid this unreliable self-similarity weight, Buades et al. [19] offered the maximum value of all the weights computed for j
≠
i around the central patch for the center self-similarity weight. The standard similarity measure can then be given by(4)
w
i
,
j
=
e
x
p
-
P
i
-
P
j
2
,
α
2
h
2
j
≠
i
m
a
x
k
∈
Δ
i
;
k
≠
i
w
i
,
k
j
=
i
.


### 2.2. Accelerated Nonlocal Means Filtering

To increase the computational efficiency of nonlocal means filtering, several approaches [28, 33, 34, 36] have been introduced. Buades et al. [34] suggested an accelerated version (block-based) of nonlocal means algorithm that, instead of using the central pixel, replaces the whole patch around the central pixel with a weighted average of patches around the neighboring pixels in the search window. Mathematically this filtering process is defined as [34](5)
P
n
l
m
i
=
1
K
i
∑
j
∈
Δ
i
‍
w
i
,
j
P
j
,where the similarity measure, w
i
,
j, is the same as defined in (3). Finally, the pixel value at central location i is recovered by averaging all the resulting estimators (patches) containing that pixel location. However, the cost for the computational improvement of the accelerated nonlocal means is a slight degradation in the visual quality of the denoised image.Mahmoudi and Sapiro [33] proposed a fast implementation of nonlocal means filtering through preclassification step to remove unrelated patches prior to the computation of similarity weights. This preclassification step is implemented on the basis of either the comparison of the local average gray values computed from intensity patches or the comparison of average gradients computed from the gradient patches. In either case, due to the presence of noise, this preclassification step is followed by thresholding process. Finally, the weights are computed only with the preclassified patches. We employ the block-based nonlocal means filtering [34] in the first step of our algorithm exploiting its relative simplicity as compared to other fast implementations.


### 2.3. Adaptive Similarity Measure Approaches

In this section, we briefly discuss the recent approaches proposing effective modifications to the similarity measure used in the classical nonlocal means filtering. For further details of these modifications, we refer to [37, 38]. The weighted patch-wise photometric distance between patches P
i and P
j can be expressed in vectorial notation as(6)
P
i
-
P
j
2
=
P
i
-
P
j
t
G
P
i
-
P
j
,where G denotes a fixed diagonal matrix which contains Gaussian weights. Despite the fact that the weighted L
2 norm represented by weight matrix G performs quite well, nonlocal means filtering results in oversmoothing in a certain area of a given image due to fixed weight matrix. One of the most effective approaches to incorporate the locally adaptive similarity weights is based on finding the local covariance matrix. The locally adaptive photometric distance is therefore defined as(7)
P
i
-
P
j
2
=
P
i
-
P
j
t
C
P
j
-
1
P
i
-
P
j
,where the C
P
j is the local covariance matrix for the patch centered at pixel j. However, it is not possible to obtain reliable covariance matrix from a single observation that contains noise as well. In order to overcome this problem, a certain redundancy in the given image is used as an implicit prior which is generally true in case of natural images. Exploiting this assumption, the noisy patches in the observed image similar to the reference patch are sampled and grouped to obtain an estimate of covariance matrix. Several methods [35, 39, 40] have been proposed to obtain robust and reliable estimates of locally adaptive covariance matrix which are briefly described below.Dabov et al. [39] proposed further enhancement for the original BM3D method [25] by introducing shape adaptive transform basis (BM3D-SAPCA) instead of fixed DCT or wavelet transform basis. This shape adaptivity is achieved by incorporating the following modifications. Firstly, the shape adaptive 3D groups of patches similar to the reference patch are constructed as described in [41]. Secondly, the local covariance matrix is estimated from this group provided that the number of similar patches is large enough to ensure the reliable estimation of the local covariance matrix. Thirdly, PCA transform is obtained by the eigen-decomposition of the estimated covariance matrix and only those eigenvectors are retained as principal components whose eigenvalues are greater than a fixed threshold value. Next, the truncated PCA transform is applied on the 3D group of the shape adaptive patches with 1D orthogonal wavelet transform along the third direction of the group. All the remaining process is same as that of the original BM3D [25].Zhang et al. [40] proposed LGP-PCA approach where PCA is performed on the local covariance matrix estimated by local pixel grouping (LPG) of the patches. Afterwards, the linear minimum mean square-error estimation (LMMSE) technique is used for coefficient shrinkage in the PCA transform domain obtained from diagonalization of the covariance matrix. This approach is similar to BM3D-SAPCA [39] in the sense that it involves two steps denoising process. However, in contrast to the BM3D, it does not depend on basic estimate (oracle) obtained in first iteration. Recently, Lebrun et al. [35] has proposed NL-Bayes algorithm to merge the Fourier transform domain like methods with Bayesian framework. In this case, a reliable estimate of the covariance matrix is obtained by applying Bayes’ rule for 3D groups of noisy patches followed by MAP (maximuma posteriori) estimation. The LPG-PCA method [40] can be realized as a special case of this more general approach.As will be described in the next section, the proposed modification to the classical similarity measure significantly differs from the above mentioned approaches. It assigns the adaptive similarity weights based on the correlation of normal vectors patches in addition to the similarity of intensity patches. Also, unlike the above techniques, the proposed approach does not apply 2D or 3D grouping of the similar patches.


### 2.4. Discrete Stationary Wavelet Transform

Wavelets have numerous applications, in particular, in signal and image processing, thanks to the efficient time-frequency localization and multiresolution properties. The wavelet transform is generated by the convolution integral with a waveletψ which defines a Riesz basis for L
2
R with a two parameter family {
ψ
j
,
l
}
j
,
l
∈
Z, where(8)
ψ
j
,
l
x
=
2
j
/
2
ψ
2
j
x
-
l
j
,
l
∈
Z
.The wavelet decomposition of f
∈
L
2
R is given by(9)
f
x
=
∑
j
,
l
∈
Z
‍
d
j
,
l
ψ
j
,
l
x
w
i
t
h
d
j
,
l
=
f
,
ψ
~
j
,
l
,where ψ
~
j
,
l is the dual wavelet to ψ
j
,
l. For the orthogonal wavelet case, ψ
~
j
,
l
=
ψ
j
,
l. The wavelet decomposition provides the perfect reconstruction and multiresolution analysis of f, as well. In the practical situation, f is a signal with finite resolution scale. In this case, the wavelet decomposition has the following representation:(10)
f
x
=
∑
l
‍
c
J
0
,
l
ϕ
J
0
,
l
+
∑
j
=
J
0
J
‍
∑
l
‍
d
j
,
l
ψ
j
,
l
x
w
i
t
h
c
J
0
,
l
=
f
,
ϕ
~
J
0
,
l
,where J is the finest resolution scale determined by the size of the signal f and J
0
<
J is a chosen coarsest resolution scale. Also, ϕ is the scaling function associated with the wavelet ψ. The standard discrete wavelet transform (DWT) decomposes a signal f into low and high pass subbands. At a given resolution scale j, (
c
j
,
l
) is the approximate (low-passed) data and (
d
j
,
l
) is the detail (high-passed) data of f. For the properties of the wavelet transform, we refer to [42].The one-dimensional wavelet can be applied through separable extension to obtain a two-dimensional wavelet. One easy way to construct two-dimensional wavelet is to use the tensor product of one-dimensional wavelet. In this case, there are one scaling functionϕ and three kinds of wavelet, ψ
k
(
k
=
1,2
,
3
): ψ
1,  ψ
2, and ψ
3 are horizontally, vertically, and diagonally oriented wavelets, respectively. For a given image data u, the wavelet transform provides the subband data through the wavelets and scaling function at the resolution scale j by(11)
W
j
k
u
=
u
,
ψ
~
j
,
l
k
,
k
=
1,2
,
3
,
(12)
S
j
u
=
u
,
ϕ
~
j
,
l
.So, S
j
(
u
) represents the low-passed data and W
j
k
(
u
) are high-passed detail data: W
j
1
(
u
), W
j
2
(
u
), and W
j
3
(
u
) are horizontal detail, vertical detail, and diagonal detail subband data, respectively. Note that the standard DWT generates the downsampled data due to low and high pass filtering followed by the decimation in the nature of DWT. Also, even if DWT has the perfect reconstruction property, it is not shift invariant as the wavelet coefficients of the given data and its shifted version may not be same [43]. So, the transformed data loses some detail information.To overcome this kind of disadvantage, the discrete stationary wavelet transform (DSWT) was proposed [42, 43]. One of the main ideas of DSWT is to perform low and high pass filtering without decimation. In this approach, multiresolution analysis is achieved by simply inserting zeroes between every adjacent pair of the coefficients in low and high pass filters associated with the wavelet. The insertion of zeroes makes the dimensions of filters at the resolution scale j same as those at the resolution scale j
+
1. Subsequently, the DSWT provides a redundant representation of a data so that the resulting wavelet decomposition is overcomplete. We notice the following advantages of the DSWT in the viewpoint of image denoising.(i)
The redundant representation of data contains more information than the case of nonredundant one.
(ii)
The shift invariance representation has smooth regularity and also does not contain the error due to downsampling.
(iii)
The size of the subband data is same as that of the input image data, so that the spatial information of those data can be directly compared.In the proposed method, we implicitly exploit these advantages to obtain the similarity measure of normal vectors patches. For our notational convenience, we will use the same notation for DSWT as the case of DWT. That is,S
j
(
u
), W
j
k
(
u
), and k
=
1,2
,
3 are the subband data at the resolution scale j generated by the DSWT.


## 2.1. Nonlocal Means Filtering

Consider a noisy gray-scale intensity image(1)
u
=
u
o
+
υ
0
,
σ
2
I
,where u
0 is the true noise free image to be recovered, υ represents the zero mean additive white Gaussian noise of known variance σ
2 and I is the Identity matrix with the same dimensions as those of the given image. Instead of the nonlocal filtering, it is preferable to use the notion of semilocal filtering. It was mentioned in [32] that considering the whole image to search for similar patches has no major benefit, with the exception of periodic or quasiperiodic images. Also, searching the whole image for each pixel is computationally too expensive. Therefore, in the rest of this paper, the term nonlocal means refers specifically to semilocal filtering. The nonlocal means filtering is defined [19] as follows:(2)
u
n
l
m
i
=
1
K
i
∑
j
∈
Δ
i
‍
w
i
,
j
u
j
,where u
n
l
m
i denotes the denoised value at pixel location i and w
i
,
j is the weight obtained by determining similarity of noisy intensity patches P
i and P
j around the central pixel i and its neighboring pixel j, respectively, within the search window Δ
i. The normalization factor is given by K
i
=
∑
j
∈
Δ
i
‍
w
i
,
j.The weights,w
i
,
j, are obtained using the Gaussian weighted L
2 norm [19]:(3)
w
i
,
j
i
≠
j
=
e
x
p
-
P
i
-
P
j
2
,
α
2
h
2
,where α is the standard deviation of Gaussian function to consider the spatial proximity of the central patch and its neighboring patches in the search window. The patches, in the search window, spatially closer to the central patch are assigned higher weights than those for the distant patches. The nonlocal means approach involves three parameters: the size of the patch P
i, the size of the search window Δ
i, and the filtering or smoothing parameter h. Detailed discussions on the suitable choices of these parameters can be found in [32, 34].Note that the similarity measure, given in (3), trivially assigns the largest value of 1 to the patch when compared to itself, so that the central patch has the weight 1 as P
i
-
P
j
2
,
α
2
=
0 for i
=
j. However, the weight value assigned to the central patch may not be reliable for the noisy image data. To avoid this unreliable self-similarity weight, Buades et al. [19] offered the maximum value of all the weights computed for j
≠
i around the central patch for the center self-similarity weight. The standard similarity measure can then be given by(4)
w
i
,
j
=
e
x
p
-
P
i
-
P
j
2
,
α
2
h
2
j
≠
i
m
a
x
k
∈
Δ
i
;
k
≠
i
w
i
,
k
j
=
i
.


## 2.2. Accelerated Nonlocal Means Filtering

To increase the computational efficiency of nonlocal means filtering, several approaches [28, 33, 34, 36] have been introduced. Buades et al. [34] suggested an accelerated version (block-based) of nonlocal means algorithm that, instead of using the central pixel, replaces the whole patch around the central pixel with a weighted average of patches around the neighboring pixels in the search window. Mathematically this filtering process is defined as [34](5)
P
n
l
m
i
=
1
K
i
∑
j
∈
Δ
i
‍
w
i
,
j
P
j
,where the similarity measure, w
i
,
j, is the same as defined in (3). Finally, the pixel value at central location i is recovered by averaging all the resulting estimators (patches) containing that pixel location. However, the cost for the computational improvement of the accelerated nonlocal means is a slight degradation in the visual quality of the denoised image.Mahmoudi and Sapiro [33] proposed a fast implementation of nonlocal means filtering through preclassification step to remove unrelated patches prior to the computation of similarity weights. This preclassification step is implemented on the basis of either the comparison of the local average gray values computed from intensity patches or the comparison of average gradients computed from the gradient patches. In either case, due to the presence of noise, this preclassification step is followed by thresholding process. Finally, the weights are computed only with the preclassified patches. We employ the block-based nonlocal means filtering [34] in the first step of our algorithm exploiting its relative simplicity as compared to other fast implementations.


## 2.3. Adaptive Similarity Measure Approaches

In this section, we briefly discuss the recent approaches proposing effective modifications to the similarity measure used in the classical nonlocal means filtering. For further details of these modifications, we refer to [37, 38]. The weighted patch-wise photometric distance between patches P
i and P
j can be expressed in vectorial notation as(6)
P
i
-
P
j
2
=
P
i
-
P
j
t
G
P
i
-
P
j
,where G denotes a fixed diagonal matrix which contains Gaussian weights. Despite the fact that the weighted L
2 norm represented by weight matrix G performs quite well, nonlocal means filtering results in oversmoothing in a certain area of a given image due to fixed weight matrix. One of the most effective approaches to incorporate the locally adaptive similarity weights is based on finding the local covariance matrix. The locally adaptive photometric distance is therefore defined as(7)
P
i
-
P
j
2
=
P
i
-
P
j
t
C
P
j
-
1
P
i
-
P
j
,where the C
P
j is the local covariance matrix for the patch centered at pixel j. However, it is not possible to obtain reliable covariance matrix from a single observation that contains noise as well. In order to overcome this problem, a certain redundancy in the given image is used as an implicit prior which is generally true in case of natural images. Exploiting this assumption, the noisy patches in the observed image similar to the reference patch are sampled and grouped to obtain an estimate of covariance matrix. Several methods [35, 39, 40] have been proposed to obtain robust and reliable estimates of locally adaptive covariance matrix which are briefly described below.Dabov et al. [39] proposed further enhancement for the original BM3D method [25] by introducing shape adaptive transform basis (BM3D-SAPCA) instead of fixed DCT or wavelet transform basis. This shape adaptivity is achieved by incorporating the following modifications. Firstly, the shape adaptive 3D groups of patches similar to the reference patch are constructed as described in [41]. Secondly, the local covariance matrix is estimated from this group provided that the number of similar patches is large enough to ensure the reliable estimation of the local covariance matrix. Thirdly, PCA transform is obtained by the eigen-decomposition of the estimated covariance matrix and only those eigenvectors are retained as principal components whose eigenvalues are greater than a fixed threshold value. Next, the truncated PCA transform is applied on the 3D group of the shape adaptive patches with 1D orthogonal wavelet transform along the third direction of the group. All the remaining process is same as that of the original BM3D [25].Zhang et al. [40] proposed LGP-PCA approach where PCA is performed on the local covariance matrix estimated by local pixel grouping (LPG) of the patches. Afterwards, the linear minimum mean square-error estimation (LMMSE) technique is used for coefficient shrinkage in the PCA transform domain obtained from diagonalization of the covariance matrix. This approach is similar to BM3D-SAPCA [39] in the sense that it involves two steps denoising process. However, in contrast to the BM3D, it does not depend on basic estimate (oracle) obtained in first iteration. Recently, Lebrun et al. [35] has proposed NL-Bayes algorithm to merge the Fourier transform domain like methods with Bayesian framework. In this case, a reliable estimate of the covariance matrix is obtained by applying Bayes’ rule for 3D groups of noisy patches followed by MAP (maximuma posteriori) estimation. The LPG-PCA method [40] can be realized as a special case of this more general approach.As will be described in the next section, the proposed modification to the classical similarity measure significantly differs from the above mentioned approaches. It assigns the adaptive similarity weights based on the correlation of normal vectors patches in addition to the similarity of intensity patches. Also, unlike the above techniques, the proposed approach does not apply 2D or 3D grouping of the similar patches.


## 2.4. Discrete Stationary Wavelet Transform

Wavelets have numerous applications, in particular, in signal and image processing, thanks to the efficient time-frequency localization and multiresolution properties. The wavelet transform is generated by the convolution integral with a waveletψ which defines a Riesz basis for L
2
R with a two parameter family {
ψ
j
,
l
}
j
,
l
∈
Z, where(8)
ψ
j
,
l
x
=
2
j
/
2
ψ
2
j
x
-
l
j
,
l
∈
Z
.The wavelet decomposition of f
∈
L
2
R is given by(9)
f
x
=
∑
j
,
l
∈
Z
‍
d
j
,
l
ψ
j
,
l
x
w
i
t
h
d
j
,
l
=
f
,
ψ
~
j
,
l
,where ψ
~
j
,
l is the dual wavelet to ψ
j
,
l. For the orthogonal wavelet case, ψ
~
j
,
l
=
ψ
j
,
l. The wavelet decomposition provides the perfect reconstruction and multiresolution analysis of f, as well. In the practical situation, f is a signal with finite resolution scale. In this case, the wavelet decomposition has the following representation:(10)
f
x
=
∑
l
‍
c
J
0
,
l
ϕ
J
0
,
l
+
∑
j
=
J
0
J
‍
∑
l
‍
d
j
,
l
ψ
j
,
l
x
w
i
t
h
c
J
0
,
l
=
f
,
ϕ
~
J
0
,
l
,where J is the finest resolution scale determined by the size of the signal f and J
0
<
J is a chosen coarsest resolution scale. Also, ϕ is the scaling function associated with the wavelet ψ. The standard discrete wavelet transform (DWT) decomposes a signal f into low and high pass subbands. At a given resolution scale j, (
c
j
,
l
) is the approximate (low-passed) data and (
d
j
,
l
) is the detail (high-passed) data of f. For the properties of the wavelet transform, we refer to [42].The one-dimensional wavelet can be applied through separable extension to obtain a two-dimensional wavelet. One easy way to construct two-dimensional wavelet is to use the tensor product of one-dimensional wavelet. In this case, there are one scaling functionϕ and three kinds of wavelet, ψ
k
(
k
=
1,2
,
3
): ψ
1,  ψ
2, and ψ
3 are horizontally, vertically, and diagonally oriented wavelets, respectively. For a given image data u, the wavelet transform provides the subband data through the wavelets and scaling function at the resolution scale j by(11)
W
j
k
u
=
u
,
ψ
~
j
,
l
k
,
k
=
1,2
,
3
,
(12)
S
j
u
=
u
,
ϕ
~
j
,
l
.So, S
j
(
u
) represents the low-passed data and W
j
k
(
u
) are high-passed detail data: W
j
1
(
u
), W
j
2
(
u
), and W
j
3
(
u
) are horizontal detail, vertical detail, and diagonal detail subband data, respectively. Note that the standard DWT generates the downsampled data due to low and high pass filtering followed by the decimation in the nature of DWT. Also, even if DWT has the perfect reconstruction property, it is not shift invariant as the wavelet coefficients of the given data and its shifted version may not be same [43]. So, the transformed data loses some detail information.To overcome this kind of disadvantage, the discrete stationary wavelet transform (DSWT) was proposed [42, 43]. One of the main ideas of DSWT is to perform low and high pass filtering without decimation. In this approach, multiresolution analysis is achieved by simply inserting zeroes between every adjacent pair of the coefficients in low and high pass filters associated with the wavelet. The insertion of zeroes makes the dimensions of filters at the resolution scale j same as those at the resolution scale j
+
1. Subsequently, the DSWT provides a redundant representation of a data so that the resulting wavelet decomposition is overcomplete. We notice the following advantages of the DSWT in the viewpoint of image denoising.(i)
The redundant representation of data contains more information than the case of nonredundant one.
(ii)
The shift invariance representation has smooth regularity and also does not contain the error due to downsampling.
(iii)
The size of the subband data is same as that of the input image data, so that the spatial information of those data can be directly compared.In the proposed method, we implicitly exploit these advantages to obtain the similarity measure of normal vectors patches. For our notational convenience, we will use the same notation for DSWT as the case of DWT. That is,S
j
(
u
), W
j
k
(
u
), and k
=
1,2
,
3 are the subband data at the resolution scale j generated by the DSWT.


## 3. The Proposed Algorithm

In this section, we adopt a hybrid approach to nonlocal means filtering. Our scheme is composed of two steps, as shown in Figure1. In the first step, we apply the accelerated (block-based) version in the wavelet transform domain to obtain a predenoised image as shown in Figure 2. In the second step, we employ a modified version of conventional nonlocal means filtering on the given noisy image. In this step, the weights are computed using the predenoised image obtained in the first step.Figure 1
Schematic depiction of the proposed nonlocal means filtering algorithm. Phase 1 image is obtained in the first step. Afterwards, in the second step, phase 1 image is used in combination with the given noisy image to obtain a final denoised image.Figure 2
Schematic depiction of the first step of the proposed algorithm at the scalej with J
0
≤
j
≤
J.


### 3.1. Multiscale Accelerated Nonlocal Means Filtering

Inspired by various approaches [22, 23, 25], based on using predenoised images to obtain refined patches, we seek to obtain a predenoised image in our approach. However, in contrast to those techniques, we adopt a very simple approach as shown in Figure 2. We first decompose the image u using the two-dimensional discrete stationary wavelet transform [43] with a chosen coarsest level J
0,(13)
D
S
W
T
u
=
W
j
1
,
W
j
2
,
W
j
3
J
0
≤
j
≤
J
,
S
J
0
u
,where W
j
1
u, W
j
2
u, and W
j
3
u represent the horizontal, vertical, and diagonal detailed data, respectively, obtained with (11) at the scale j with j
=
J
0
,
…
,
J. Also, S
J
0
u is the approximate data given by (12) at the coarsest resolution scale J
0.The accelerated (block-based) version of nonlocal means filtering [34] is performed on each of the detail data W
j
1
u, W
j
2
u, and W
j
3
u at each scale j. To be precise, the estimated wavelet coefficients patch (or block) w
^
j
k
u
t at location t from the detailed data W
j
k
u is obtained by applying (5) as(14)
w
^
j
k
u
t
=
1
K
r
∑
s
∈
Δ
t
‍
w
t
,
s
w
j
k
u
s
,where the weights w
t
,
s are computed using wavelet coefficients patches w
j
k
u
s instead of using intensity patches P
s in (4). Subsequently, the denoised wavelet coefficient w
^
j
k
u
(
t
) at central location t is recovered by averaging all the resulting estimated blocks containing that location. This process is implemented on each detailed subband data independently and finally the predenoised image is obtained using the inverse discrete stationary wavelet transform. Thanks to overcomplete, shift invariant, and sparse representation of an image in the DSWT domain, the image can be efficiently denoised using accelerated nonlocal means filtering without severe degradation of texture, edges, and fine details. This predenoised image will further be used as a reference image along with the given noisy image for computation and comparison of normal vectors patches in the subsequent section. It is worth noticing that several recent methods [44, 45] have implemented nonlocal means filtering in wavelet domain for super-resolution of images and video sequences.


### 3.2. Normal Vectors Patches and Weight Factors

Assuming the patches as surfaces, to each intensity patch of sizem
×
m at pixel location i, we associate a normal vectors patch N
~
i of size 2
m
×
2
m. In order to construct this normal vectors patch, we first compute the gradient of the image at each pixel location and then form the patches of horizontal and vertical components of the gradient vectors around each pixel i. These partial derivative patches are denoted by N
i
,
x and N
i
,
y, where the subscripts x and y represent partial derivatives in the horizontal and vertical directions, respectively. The size of N
i
,
x and N
i
,
y patches is the same as that of the intensity patch.Definition 1.
The normal vectors patchN
~ is defined as(15)
N
~
≡
N
x
m
×
m
⊕
N
y
m
×
m
=
N
x
O
O
N
y
2
m
×
2
m
,where ⊕ denotes the direct sum of matrices and O is the zero matrix of size m
×
m.For a similarity measure between two normal vectors patchesN
~
i and N
~
j, we employ the inner product for square real matrices induced by the trace as follows:(16)
N
~
i
,
N
~
j
=
t
r
Γ
i
j
,where we set the matrix Γ
i
j as(17)
Γ
i
j
=
N
~
i
t
N
~
j
=
N
i
,
x
⊕
N
i
,
y
t
N
j
,
x
⊕
N
j
,
y
Γ
i
j
=
N
i
,
x
t
N
j
,
x
⊕
N
i
,
y
t
N
j
,
y
.Recall that for square real matrices A and B with same size, A
,
B
=
t
r
(
A
t
B
) is a well-defined inner product. The inner product defined above signifies the geometric correlation between the central normal vectors patch N
~
i at central location i and the neighboring patch N
~
j at the position j in the search window. The higher the absolute value of inner product the more the similarity between the normal vector patches and vice versa. In order to obtain the individual normal vector in the neighboring patch that may have the highest correlation with that of the central patch, we define the diagonal matrix as follows:(18)
Λ
i
j
=
d
i
a
g
N
i
,
x
t
N
j
,
x
+
N
i
,
y
t
N
j
,
y
.The maximum individual correlation, denoted by τ
i
j, is defined as(19)
τ
i
j
=
Λ
i
j
∞
=
m
a
x
1
≤
p
≤
m
∑
q
=
1
n
‍
λ
p
q
,where A
∞ norm denotes the maximum of absolute row sum of a matrix A. Since the matrix Λ
i
j is the diagonal matrix, this norm yields the maximum absolute value of all diagonal entries of Λ
i
j. In order to obtain the modified similarity measure between normal vectors patches in the next section, we define a weight factor as follows.Definition 2.
A weight factorη
i
,
j based on two normal vectors patches N
~
i and N
~
j is defined as(20)
η
i
,
j
i
≠
j
=
e
x
p
-
N
~
i
,
N
~
j
τ
i
j
m
2
-
1
η
i
,
j
i
≠
j
=
e
x
p
-
t
r
Γ
i
j
τ
i
j
m
2
-
1
.Remark 3.
It can be easily verified that the weight factorη satisfies the following properties to measure the similarity between normal vectors patches. (i)
η
i
,
j
>
0
∀
j
∈
Δ
i (Positivity).
(ii)
η
i
,
j
=
η
j
,
i
∀
j
∈
Δ
i (Symmetry).
(iii)
η
i
,
j
≤
M
<
∞
∀
j
∈
Δ
i (Bounded).It can be noticed that in case of more similar normal vectors patches,t
r
Γ
i
j
/
τ
i
j
m
2
-
1 is a large value resulting in the small value of η
i
,
j and vice versa. The intuitive motivation for introducing this factor is to acquire the degree of similarity of the original intensity patches, based on the similarity of the corresponding normal vectors patches, as shown in Figure 3. Note that the weight factor involves the computation of derivatives which is sensitive to the noise level in the image. Since in the predenoised image obtained in the first step, the noise level is much lower than in the given noisy image, the computation of partial derivatives is more reliable. Therefore, we use the weight factor in the second step of our algorithm.Figure 3
Schematic depiction for normal vectors patches, corresponding to the respective intensity patches, extracted from Barbara image.
(a)
Intensity based patches
(b)
Normal vectors patches


### 3.3. Modified Nonlocal Means Filtering

After obtaining predenoised image as defined in Section3.1, we perform the modified version of standard nonlocal means filtering on a given noisy image, based on the similarity of reference patches from the predenoised image.Definition 4.
The modified similarity measure between distinct intensity patchesP
i and P
j is defined as(21)
w
i
,
j
i
≠
j
=
e
x
p
-
P
i
-
P
j
2
2
η
i
,
j
h
2
,where the weight factor η
i
,
j is given in Definition 2.It can be noticed that the Gaussian weightG
α in (3) is replaced by the weight factor η
i
,
j obtained with (20). The Gaussian weights were used to take into account the spatial proximity of the patches around the central patch. However, the proposed weight factor is based upon the similarity or correlation of the mean normal orientation of the central patch with other patches in the search window. The smaller the value of the weight factor η
i
,
j, the higher the similarity weight w
i
,
j assigned to the corresponding intensity patch and vice versa. The proposed metric performs better than the standard L
2 norm. This is due to the fact that the standard metric, using spatial proximity weights, G
α, may assign a small weight value to a distant but similar intensity patch in the search window. On the other hand, the new metric assigns more weight to the distant but similar intensity patch based on the similarity of normal vectors patches.Our second modification to standard nonlocal means filtering is made in the assignment of self-similarity weight. The standard nonlocal means method assigns the maximum of all the computed weights as obtained in (4) for j
=
i. This choice of weight for self-comparison is intuitive and arbitrary. Salmon [32] discussed various choices for assigning self-similarity weight. One of the choices assumed was based on Stein unbiased risk estimation (SURE) for the central patch weight that does not affect the remaining similarity weights. It has been shown in [32] that SURE choice of self-similarity weight is at par with the arbitrary choice [19] for higher levels of noise. However, we follow the approach adopted in [19] with a little modification based on experimental results for various arbitrary values. For low or medium noise levels in the image, we assign a slightly higher self-similarity weight than that in (4), that is, the proposed self-similarity weight is defined by(22)
w
i
,
i
=
4
3
m
a
x
j
∈
Δ
i
;
j
≠
i
w
i
,
j
.The intuitive justification for assigning higher self-similarity weight is based on the assumption that the low or medium levels of noise do not produce a significance effect on self-similarity. Therefore this choice yields slightly better results for low levels of noise. However, for severe noise (σ
>
20), the performance of the self-similarity weights defined in (4) and (22) is found to be the same. We use (22) in our simulations for both the low and high levels of noise. The second modification of self-similarity measure is then optional. The distinction in visual appearance with or without this modification is imperceivable.


### 3.4. Summary of the Proposed Algorithm

The flow chart of the proposed denoising algorithm is shown in Figure4 and it can be summarized as follows.(i)
Construct multiscale data in the wavelet domain by decomposing the noisy image using discrete stationary wavelet transform up to the coarsest scaleJ
0.
(ii)
Perform the accelerated nonlocal means filtering on the multiscale data, as described in Section3.1, to obtain the denoised wavelet transform components.
(iii)
Reconstruct the predenoised image using inverse of the DSWT. This image will be used as a reference in the next step for patch-based comparison.
(iv)
Denoise the given noisy image using the modified nonlocal means filtering as proposed in Section3.3. The patch comparison is performed on the refined patches obtained in the previous step.Figure 4
The flow chart of the proposed MHNLM algorithm. The given image is decomposed up to two scale levels using DSWT and accelerated nonlocal means [34] is applied on the detail data (HL, LH, and HH) at each scale. Afterwards, the predenoised image is obtained using IDSWT. Finally, the modified similarity measure based nonlocal means filtering is employed on the given noisy image using reference normal vector patches extracted from the predenoised image.


### 3.5. Extension to Color Image Denoising

Although the proposed algorithm is primarily designed for gray-scale images, a possible extension to color images is also concerned here. For this purpose, we consider a natural color image inR
G
B color domain with additive i.i.d. zero mean Gaussian noise and variances σ
R
2
=
σ
G
2
=
σ
B
2
=
σ
2 in each of R
G
B channels. Nonlocal means filtering can be extended in a straightforward fashion to joint or simultaneous filtering of all color channels without disturbing the inherent correlations of color channels. However, due to 2D DSWT transform in the first step of the proposed algorithm, we follow the approach as described in [25, 35, 41]. For the first step only, The given noisy image is transformed to Y
U
V color domain using the transformation defined by(23)
A
Y
U
V
=
0.30
0.59
0.11
-
0.15
-
0.29
0.44
0.61
-
0.51
-
0.10
,where Y denotes the luminance channel and U and V are two chrominance channels. The resulting channels are sufficiently decorrelated. Further, due to this transformation, the luminance channel has higher SNR than the other two chrominance channels. The noise variances σ
Y
2, σ
U
2, and σ
V
2 can be determined using the relation [41]:(24)
σ
Y
2
σ
U
2
σ
V
2
=
σ
R
2
σ
G
2
σ
B
2
T
,where T denotes the transpose of A
Y
U
V with element wise square of its entries.The first step of the algorithm, described in Section3.1, is applied to each channel independently. Consequently, a predenoised image in Y
U
V color space is transformed back to original R
G
B color space. For the second step of the proposed algorithm, let the normal vectors patch, N
~
i, centered at pixel i in R
G
B color space be denoted by(25)
N
~
i
:
=
N
~
i
c
c
=
1
3
,where the superscript c
=
1,2
,
3 denotes the individual color channel R,  G,  B, respectively, and N
~
i
(
c
) represents the normal vectors patch in that color channel defined by (15). The similarity of normal vectors patches, denoted by d
i
j
(
N
), is performed jointly on all the color channels as(26)
d
i
j
N
=
1
3
m
2
-
1
∑
c
=
1
3
‍
N
~
i
c
,
N
~
j
c
τ
i
j
c
d
i
j
N
=
1
3
m
2
-
1
∑
c
=
1
3
‍
t
r
Γ
i
j
c
τ
i
j
c
,where Γ
i
j
(
c
) and τ
i
j
(
c
) are defined for each channel using the relations (17) and (19), respectively. The weight factor, η
i
j, used in the proposed similarity measure can then be obtained with(27)
η
i
j
=
e
x
p
-
d
i
j
N
.Finally, the modified photometric similarity measure can be defined as(28)
w
i
,
j
=
e
x
p
-
d
i
j
2
η
i
j
,where d
i
j denotes the classical nonlocal means distance for R
G
B color patches P
(
i
) and P
(
j
) given by(29)
d
i
j
2
=
1
3
∑
c
=
1
3
‍
P
c
i
-
P
c
j
2
h
c
2
.


## 3.1. Multiscale Accelerated Nonlocal Means Filtering

Inspired by various approaches [22, 23, 25], based on using predenoised images to obtain refined patches, we seek to obtain a predenoised image in our approach. However, in contrast to those techniques, we adopt a very simple approach as shown in Figure 2. We first decompose the image u using the two-dimensional discrete stationary wavelet transform [43] with a chosen coarsest level J
0,(13)
D
S
W
T
u
=
W
j
1
,
W
j
2
,
W
j
3
J
0
≤
j
≤
J
,
S
J
0
u
,where W
j
1
u, W
j
2
u, and W
j
3
u represent the horizontal, vertical, and diagonal detailed data, respectively, obtained with (11) at the scale j with j
=
J
0
,
…
,
J. Also, S
J
0
u is the approximate data given by (12) at the coarsest resolution scale J
0.The accelerated (block-based) version of nonlocal means filtering [34] is performed on each of the detail data W
j
1
u, W
j
2
u, and W
j
3
u at each scale j. To be precise, the estimated wavelet coefficients patch (or block) w
^
j
k
u
t at location t from the detailed data W
j
k
u is obtained by applying (5) as(14)
w
^
j
k
u
t
=
1
K
r
∑
s
∈
Δ
t
‍
w
t
,
s
w
j
k
u
s
,where the weights w
t
,
s are computed using wavelet coefficients patches w
j
k
u
s instead of using intensity patches P
s in (4). Subsequently, the denoised wavelet coefficient w
^
j
k
u
(
t
) at central location t is recovered by averaging all the resulting estimated blocks containing that location. This process is implemented on each detailed subband data independently and finally the predenoised image is obtained using the inverse discrete stationary wavelet transform. Thanks to overcomplete, shift invariant, and sparse representation of an image in the DSWT domain, the image can be efficiently denoised using accelerated nonlocal means filtering without severe degradation of texture, edges, and fine details. This predenoised image will further be used as a reference image along with the given noisy image for computation and comparison of normal vectors patches in the subsequent section. It is worth noticing that several recent methods [44, 45] have implemented nonlocal means filtering in wavelet domain for super-resolution of images and video sequences.


## 3.2. Normal Vectors Patches and Weight Factors

Assuming the patches as surfaces, to each intensity patch of sizem
×
m at pixel location i, we associate a normal vectors patch N
~
i of size 2
m
×
2
m. In order to construct this normal vectors patch, we first compute the gradient of the image at each pixel location and then form the patches of horizontal and vertical components of the gradient vectors around each pixel i. These partial derivative patches are denoted by N
i
,
x and N
i
,
y, where the subscripts x and y represent partial derivatives in the horizontal and vertical directions, respectively. The size of N
i
,
x and N
i
,
y patches is the same as that of the intensity patch.Definition 1.
The normal vectors patchN
~ is defined as(15)
N
~
≡
N
x
m
×
m
⊕
N
y
m
×
m
=
N
x
O
O
N
y
2
m
×
2
m
,where ⊕ denotes the direct sum of matrices and O is the zero matrix of size m
×
m.For a similarity measure between two normal vectors patchesN
~
i and N
~
j, we employ the inner product for square real matrices induced by the trace as follows:(16)
N
~
i
,
N
~
j
=
t
r
Γ
i
j
,where we set the matrix Γ
i
j as(17)
Γ
i
j
=
N
~
i
t
N
~
j
=
N
i
,
x
⊕
N
i
,
y
t
N
j
,
x
⊕
N
j
,
y
Γ
i
j
=
N
i
,
x
t
N
j
,
x
⊕
N
i
,
y
t
N
j
,
y
.Recall that for square real matrices A and B with same size, A
,
B
=
t
r
(
A
t
B
) is a well-defined inner product. The inner product defined above signifies the geometric correlation between the central normal vectors patch N
~
i at central location i and the neighboring patch N
~
j at the position j in the search window. The higher the absolute value of inner product the more the similarity between the normal vector patches and vice versa. In order to obtain the individual normal vector in the neighboring patch that may have the highest correlation with that of the central patch, we define the diagonal matrix as follows:(18)
Λ
i
j
=
d
i
a
g
N
i
,
x
t
N
j
,
x
+
N
i
,
y
t
N
j
,
y
.The maximum individual correlation, denoted by τ
i
j, is defined as(19)
τ
i
j
=
Λ
i
j
∞
=
m
a
x
1
≤
p
≤
m
∑
q
=
1
n
‍
λ
p
q
,where A
∞ norm denotes the maximum of absolute row sum of a matrix A. Since the matrix Λ
i
j is the diagonal matrix, this norm yields the maximum absolute value of all diagonal entries of Λ
i
j. In order to obtain the modified similarity measure between normal vectors patches in the next section, we define a weight factor as follows.Definition 2.
A weight factorη
i
,
j based on two normal vectors patches N
~
i and N
~
j is defined as(20)
η
i
,
j
i
≠
j
=
e
x
p
-
N
~
i
,
N
~
j
τ
i
j
m
2
-
1
η
i
,
j
i
≠
j
=
e
x
p
-
t
r
Γ
i
j
τ
i
j
m
2
-
1
.Remark 3.
It can be easily verified that the weight factorη satisfies the following properties to measure the similarity between normal vectors patches. (i)
η
i
,
j
>
0
∀
j
∈
Δ
i (Positivity).
(ii)
η
i
,
j
=
η
j
,
i
∀
j
∈
Δ
i (Symmetry).
(iii)
η
i
,
j
≤
M
<
∞
∀
j
∈
Δ
i (Bounded).It can be noticed that in case of more similar normal vectors patches,t
r
Γ
i
j
/
τ
i
j
m
2
-
1 is a large value resulting in the small value of η
i
,
j and vice versa. The intuitive motivation for introducing this factor is to acquire the degree of similarity of the original intensity patches, based on the similarity of the corresponding normal vectors patches, as shown in Figure 3. Note that the weight factor involves the computation of derivatives which is sensitive to the noise level in the image. Since in the predenoised image obtained in the first step, the noise level is much lower than in the given noisy image, the computation of partial derivatives is more reliable. Therefore, we use the weight factor in the second step of our algorithm.Figure 3
Schematic depiction for normal vectors patches, corresponding to the respective intensity patches, extracted from Barbara image.
(a)
Intensity based patches
(b)
Normal vectors patches


## 3.3. Modified Nonlocal Means Filtering

After obtaining predenoised image as defined in Section3.1, we perform the modified version of standard nonlocal means filtering on a given noisy image, based on the similarity of reference patches from the predenoised image.Definition 4.
The modified similarity measure between distinct intensity patchesP
i and P
j is defined as(21)
w
i
,
j
i
≠
j
=
e
x
p
-
P
i
-
P
j
2
2
η
i
,
j
h
2
,where the weight factor η
i
,
j is given in Definition 2.It can be noticed that the Gaussian weightG
α in (3) is replaced by the weight factor η
i
,
j obtained with (20). The Gaussian weights were used to take into account the spatial proximity of the patches around the central patch. However, the proposed weight factor is based upon the similarity or correlation of the mean normal orientation of the central patch with other patches in the search window. The smaller the value of the weight factor η
i
,
j, the higher the similarity weight w
i
,
j assigned to the corresponding intensity patch and vice versa. The proposed metric performs better than the standard L
2 norm. This is due to the fact that the standard metric, using spatial proximity weights, G
α, may assign a small weight value to a distant but similar intensity patch in the search window. On the other hand, the new metric assigns more weight to the distant but similar intensity patch based on the similarity of normal vectors patches.Our second modification to standard nonlocal means filtering is made in the assignment of self-similarity weight. The standard nonlocal means method assigns the maximum of all the computed weights as obtained in (4) for j
=
i. This choice of weight for self-comparison is intuitive and arbitrary. Salmon [32] discussed various choices for assigning self-similarity weight. One of the choices assumed was based on Stein unbiased risk estimation (SURE) for the central patch weight that does not affect the remaining similarity weights. It has been shown in [32] that SURE choice of self-similarity weight is at par with the arbitrary choice [19] for higher levels of noise. However, we follow the approach adopted in [19] with a little modification based on experimental results for various arbitrary values. For low or medium noise levels in the image, we assign a slightly higher self-similarity weight than that in (4), that is, the proposed self-similarity weight is defined by(22)
w
i
,
i
=
4
3
m
a
x
j
∈
Δ
i
;
j
≠
i
w
i
,
j
.The intuitive justification for assigning higher self-similarity weight is based on the assumption that the low or medium levels of noise do not produce a significance effect on self-similarity. Therefore this choice yields slightly better results for low levels of noise. However, for severe noise (σ
>
20), the performance of the self-similarity weights defined in (4) and (22) is found to be the same. We use (22) in our simulations for both the low and high levels of noise. The second modification of self-similarity measure is then optional. The distinction in visual appearance with or without this modification is imperceivable.


## 3.4. Summary of the Proposed Algorithm

The flow chart of the proposed denoising algorithm is shown in Figure4 and it can be summarized as follows.(i)
Construct multiscale data in the wavelet domain by decomposing the noisy image using discrete stationary wavelet transform up to the coarsest scaleJ
0.
(ii)
Perform the accelerated nonlocal means filtering on the multiscale data, as described in Section3.1, to obtain the denoised wavelet transform components.
(iii)
Reconstruct the predenoised image using inverse of the DSWT. This image will be used as a reference in the next step for patch-based comparison.
(iv)
Denoise the given noisy image using the modified nonlocal means filtering as proposed in Section3.3. The patch comparison is performed on the refined patches obtained in the previous step.Figure 4
The flow chart of the proposed MHNLM algorithm. The given image is decomposed up to two scale levels using DSWT and accelerated nonlocal means [34] is applied on the detail data (HL, LH, and HH) at each scale. Afterwards, the predenoised image is obtained using IDSWT. Finally, the modified similarity measure based nonlocal means filtering is employed on the given noisy image using reference normal vector patches extracted from the predenoised image.


## 3.5. Extension to Color Image Denoising

Although the proposed algorithm is primarily designed for gray-scale images, a possible extension to color images is also concerned here. For this purpose, we consider a natural color image inR
G
B color domain with additive i.i.d. zero mean Gaussian noise and variances σ
R
2
=
σ
G
2
=
σ
B
2
=
σ
2 in each of R
G
B channels. Nonlocal means filtering can be extended in a straightforward fashion to joint or simultaneous filtering of all color channels without disturbing the inherent correlations of color channels. However, due to 2D DSWT transform in the first step of the proposed algorithm, we follow the approach as described in [25, 35, 41]. For the first step only, The given noisy image is transformed to Y
U
V color domain using the transformation defined by(23)
A
Y
U
V
=
0.30
0.59
0.11
-
0.15
-
0.29
0.44
0.61
-
0.51
-
0.10
,where Y denotes the luminance channel and U and V are two chrominance channels. The resulting channels are sufficiently decorrelated. Further, due to this transformation, the luminance channel has higher SNR than the other two chrominance channels. The noise variances σ
Y
2, σ
U
2, and σ
V
2 can be determined using the relation [41]:(24)
σ
Y
2
σ
U
2
σ
V
2
=
σ
R
2
σ
G
2
σ
B
2
T
,where T denotes the transpose of A
Y
U
V with element wise square of its entries.The first step of the algorithm, described in Section3.1, is applied to each channel independently. Consequently, a predenoised image in Y
U
V color space is transformed back to original R
G
B color space. For the second step of the proposed algorithm, let the normal vectors patch, N
~
i, centered at pixel i in R
G
B color space be denoted by(25)
N
~
i
:
=
N
~
i
c
c
=
1
3
,where the superscript c
=
1,2
,
3 denotes the individual color channel R,  G,  B, respectively, and N
~
i
(
c
) represents the normal vectors patch in that color channel defined by (15). The similarity of normal vectors patches, denoted by d
i
j
(
N
), is performed jointly on all the color channels as(26)
d
i
j
N
=
1
3
m
2
-
1
∑
c
=
1
3
‍
N
~
i
c
,
N
~
j
c
τ
i
j
c
d
i
j
N
=
1
3
m
2
-
1
∑
c
=
1
3
‍
t
r
Γ
i
j
c
τ
i
j
c
,where Γ
i
j
(
c
) and τ
i
j
(
c
) are defined for each channel using the relations (17) and (19), respectively. The weight factor, η
i
j, used in the proposed similarity measure can then be obtained with(27)
η
i
j
=
e
x
p
-
d
i
j
N
.Finally, the modified photometric similarity measure can be defined as(28)
w
i
,
j
=
e
x
p
-
d
i
j
2
η
i
j
,where d
i
j denotes the classical nonlocal means distance for R
G
B color patches P
(
i
) and P
(
j
) given by(29)
d
i
j
2
=
1
3
∑
c
=
1
3
‍
P
c
i
-
P
c
j
2
h
c
2
.


## 4. Results and Discussion

### 4.1. Gray-Scale Image Denoising

To evaluate the results of the proposed method, the benchmark gray-scale intensity images of Lena, Barbara, Boats, Peppers, and House are considered. We use9
×
9 patches, 15
×
15 search windows, and h
=
6
σ as the filtering parameter in the first step. In the second step, we select 7
×
7 patches with filtering parameter h
=
4
σ. The filtering parameter is empirically reduced to 4
σ from 6
σ to avoid the oversmoothing phenomenon. The finest resolution scale for 512
×
512 gray-scale image is J
=
9. The proposed algorithm, denoted by MHNLM, is compared with various state-of-the-art algorithms: those by Dabov et al. [25] (BM3D), Lebrun et al. [35] (NL-Bayes), Portilla et al. [18] (BLS-GSM), Buades et al. [19] (NLM), Elad and Aharon [23] (K-SVD), and Kervrann et al. [22] (BNLM) (Table 3). The denoising results for NL-Bayes and the standard NLM methods are obtained using source codes [46, 47], respectively.


### 4.2. Computational Complexity Comparison

In what follows, we present the comparison of computational complexity in terms of the number of operations required. In our proposed algorithm, the computational time is proportional toN
2
n
2
m
2
1
+
3
(
J
-
J
0
)
/
m
2, where N
2, n
2, and m
2 are the sizes of image, search window, and patch, respectively. The first term in this expression refers to the number of operations required in classical nonlocal means filtering. The second term refers to complexity of the accelerated nonlocal mean filtering on three detail subbands at each scale. The coarsest level of multiscale decomposition in DSWT domain is J
0
=
7. In our simulations, we employ biorthogonal spline wavelet transform for DSWT decomposition. The time complexity of the nonlocal means filtering is N
4
n
2 where the search window is set as the whole image. However, for semilocal version of the standard NLM [19], compared here, the time complexity is given by N
2
n
2
m
2. In case of BNLM [22], the computational time depends upon the sub-sampling size L of the image and is given by N
2
n
2
m
2
/
L
2. In the absence of sub-sampling scheme (L
=
1), the computational complexity of BNLM is the same as that of NLM. For BM3D [25], the time complexity, excluding the 3D transformation overhead, is given by 2
(
n
1
2
+
n
2
)
m
2
N
2
/
L
2, where the sum, n
1
2
+
n
2 represents the number of operations required for grouping the patches in 3D transform domain. The multiplication factor, 2, is used to indicate the two step image denoising nature of BM3D algorithm. The sub-sampling parameter, L is the sliding window size used for block matching and is set to 1 when the grouped patches do not overlap. The computational complexity of NL-Bayes [35] is similar to that of BM3D. This is due the fact that NL-Bayes algorithm employs Bayes’ rule to the the 3D groups obtained with BM3D approach. Finally, the computational cost of K-SVD [23] is given by 4
K
m
2
L
+
2
K
(
L
+
m
2
)
+
K
3
N
2 [48], where K denotes the desired sparsity level and L represents the number of atoms (columns) in the dictionary. The remaining terms, m
2 and N
2 have the usual meanings of patch and image size, respectively. Among all the methods compared here, K-SVD algorithm is the most expensive due to the sequential update of each of the L atoms (columns) in the dictionary. From the above analysis, it can be noticed that the computational complexity of the proposed algorithm, somehow, lies between those of the classical nonlocal means filtering and BM3D.


### 4.3. Visual Quality Comparison

Here, we discuss and compare the denoising capability of the proposed algorithm with that of the above mentioned algorithms. The peak signal-to-noise ratio (PSNR) is used for comparing the denoising capability of each scheme. For an original gray-scale imageu
o of size M
×
N, let u
^ be the denoised image obtained as its estimate using certain denoising algorithm. The PSNR is then defined as (30)
P
N
S
R
u
^
=
10
l
o
g
255
2
M
N
-
1
∑
i
=
1
M
∑
j
=
1
N
u
o
i
,
j
-
u
^
i
,
j
2
.Table 1 provides the PSNR comparison values for the above cited approaches; the bold-faced values represent the best performance among the last five columns. The results of BM3D and NL-Bayes are quite competitive regardless of the noise level and are better than the rest of the compared algorithms. The reason for these outstanding results is the enhanced sparse representation obtained with 3D transform domain and collaborative filtering as discussed earlier. NL-Bayes is similar to BM3D in its structure. However, it exploits Bayesian framework rather than hard thresholding or Wiener filtering used in BM3D. For the rest of the algorithms, KSVD performance is better when the noise level is low. On the other hand, the proposed method yields better results in the presence of moderate and severe noise (σ
≥
20). It can be noticed that the results of the proposed algorithm are always better than the classical nonlocal means filtering. Our results can also be confirmed according to the average of the performances at various noise levels. Table 2 indicates that, on average, our algorithm outperforms KSVD, BLS-GSM, and BNLM in the presence of moderate or severe noise. However, the performance of the proposed method is slightly lower than those of the KSVD, BLS-GSM, and BNLM for low level of noise (σ
=
10) as depicted in Figure 8. Therefore, the proposed algorithm is more suitable in the scenarios where the noise levels are high.Table 1
PSNR comparison of the proposed and various state-of-the-art algorithms for gray-scale images.
Image
σ
BM3D [25]
NL-Bayes [35]
GSM [18]
NLM [19]
KSVD [23]
BNLM [22]
MHNLM
Lena
10
35.93
35.88
35.61
34.35
35.47
35.25
35.40
15
34.27
34.02
33.90
32.10
33.70
33.68
33.93
20
33.05
32.88
32.66
31.56
32.38
32.63
32.75
25
32.05
31.89
31.69
30.44
31.32
31.55
31.76
50
28.86
28.83
28.61
27.35
27.79
27.51
28.47
Barbara
10
34.98
34.95
34.03
33.18
34.42
33.83
33.80
15
33.11
32.70
31.86
30.77
32.37
32.21
32.35
20
31.78
31.55
30.32
30.27
30.83
30.88
31.13
25
30.72
30.39
29.13
29.01
29.60
29.77
30.07
50
27.17
26.84
25.48
25.62
25.47
24.91
26.41
Boats
10
33.92
33.93
33.58
32.93
33.64
33.18
32.94
15
32.14
31.93
31.70
30.70
31.73
31.45
31.52
20
30.88
30.71
30.38
29.73
30.36
30.16
30.42
25
29.91
29.68
29.37
28.56
29.28
29.11
29.43
50
26.64
26.40
26.38
25.25
25.95
25.13
26.22
Peppers
10
34.68
34.77
33.77
33.51
34.28
33.87
33.53
15
32.70
32.53
31.74
31.07
32.22
32.06
32.03
20
31.29
31.31
30.31
30.04
30.82
30.75
30.82
25
30.16
30.16
29.21
28.68
29.73
29.77
29.78
50
26.41
26.49
25.90
24.17
26.13
23.84
26.28
House
10
36.71
36.18
35.35
34.91
35.98
35.67
35.78
15
34.94
34.33
33.64
32.70
34.32
34.23
34.23
20
33.77
33.33
32.39
32.43
33.20
33.24
33.11
25
32.86
32.48
31.40
31.18
32.15
32.30
32.15
50
29.37
29.04
28.26
27.62
27.95
27.64
28.38Table 2
Average PSNR comparison for various noise levels.
σ
BM3D [25]
NL-Bayes [35]
GSM [18]
NLM [19]
KSVD [23]
BNLM [22]
MHNLM
10
35.24
35.14
34.47
33.78
34.76
34.36
34.29
15
33.43
33.10
32.57
31.47
32.87
32.73
32.81
20
32.15
31.96
31.21
30.81
31.52
31.53
31.65
25
31.14
30.92
30.16
29.58
30.42
30.50
30.63
50
27.69
27.52
26.93
26.00
26.66
25.81
27.15Table 3
PSNR comparison of the proposed and various state-of-the-art algorithms for color images.
Image
σ
BM3D
NL-Bayes
NLM
MHNLM
Lena
10
35.22
35.26
34.77
34.52
15
33.94
33.75
33.15
33.15
20
33.02
32.95
31.92
32.18
25
32.27
32.08
30.96
31.48
50
29.88
29.89
27.89
28.41
House
10
36.23
35.82
35.22
35.02
15
34.85
34.90
33.75
33.55
20
33.84
33.28
32.55
32.55
25
33.03
32.42
31.44
31.84
50
30.47
30.20
27.50
28.33
Peppers
10
33.78
33.92
33.74
33.20
15
32.60
32.60
32.28
32.27
20
31.83
31.84
31.24
31.27
25
31.20
31.10
30.35
30.66
50
28.93
28.98
27.14
28.02Apart from the quantitative analysis with the PSNR values, the quality of visual appearance for the test images can also be assessed in terms of fine details and textures. For instance, in case of Lena’s face shown in Figure5(d) weak fine marks on the chin are preserved at the moderate noise level of σ
=
20. Barbara image is a well-known example that contains a lot of texture. As shown at the magnified scale in Figures 6(d) and 7(d), our algorithm efficiently retains the texture on the table cover, scarf, and chair. Similarly, the noise free image of house, shown in Figure 7(e) contains very fine regular pattern of bricks that is quite intermingled with the noise. The proposed algorithm has managed to recover the brick structure while removing the noise effectively. Lastly, the boats image is the representative of the benchmark images with very fine details, sharp edges, and discontinuities. Although, our algorithm effectively removes the noise, very thin ropes and strings have not been fully recovered. Moreover, at the magnified scale, there are very weak oscillations across the sharp discontinuities such as edges of ropes and rods. This oscillatory phenomenon may be inherent to wavelet based filtering which we have used in the first step of our algorithm.Figure 5
(a), (b), (c), and (d) represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Lena image, respectively.
(a)
(b)
(c)
(d)Figure 6
(a), (b), (c), and (d) represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Barbara image, respectively.
(a)
(b)
(c)
(d)Figure 7
Columns from left to right represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Barbara, house, and boat images, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)Figure 8
Average PSNR versus noise levelσ comparison of BM3D, NL-Bayes, GSM, NLM, KSVD, BNLM, and MHNLM.An appropriate approach to ascertain the visual quality is the method noise mechanism suggested by Buades et al. [19]. The method noise is defined as the difference between the given noisy image and its denoised version which depicts the noise removed by a specific denoising operator or algorithm. Buades et al. [19] emphasized that the method noise should be as closer to random additive noise as possible to justify the efficacy of certain denoising algorithm. It provides a way to visualize fine geometrical features or details such as texture and edges which may not be preserved by certain denoising algorithm and may be removed along with the noise. Unfortunately, due to complex nature of several state-of-the-art algorithms compared here, the closed form of mathematical description is difficult to be obtained for the method noise comparison. Therefore the method noise will be estimated using the difference images only. It is worth noticing that the visual comparison of the method noise mechanism relies on the suitable selection of noise level of the additive white Gaussian noise. A reasonable value of standard deviation of the noise is 5 or 10 as very nicely explained in [37]. This is due to the fact that when the standard deviation of the additive noise is higher than the image contrast, features even removed during denoising process will not be perceivable as they may be buried in the severe noise removed from the image. In such situation, the empirical visual assessment of the method noise may not be reliable.The method noise of the BM3D [25], NL-Bayes [35], and classical NL-means [19] are compared with that of the proposed algorithm. Each of the gray-scale images of Barbara, Lena, boats, and house is contaminated with additive white Gaussian noise of standard deviation σ
=
10. In order to obtain proper visualization, the difference images are rescaled as described in [37]. The method noise results of the compared algorithms, including the proposed one, are similar to the white Gaussian noise as shown in Figure 9. In case of classical nonlocal means, the amplitude of the noise removed is uniform all over the image regardless of the structures like textures or edges present in the image as can be seen in Figures 9(c), 9(g), 9(k), and 9(o). For the rest of the algorithms, the amplitude of the removed noise varies with the geometrical features of the underlying image. Moreover the magnitudes of those differences obtained through classical nonlocal means are comparatively greater than the respective results for the rest of the approaches. The method noise result of the proposed algorithm is similar to those of the BM3D and NL-Bayes as shown in Figure 9. It is worth noticing that BM3D performs thresholding in 3D transform domain and NL-Bayes exploits the Bayesian framework for shrinkage of 3D groups of similar patches. In contrast to those two approaches, the proposed algorithm does not perform any thresholding. Instead, it applies the accelerated version of the classical nonlocal means filtering on the 2D transform domain. Even then, the noise method is much similar to BM3D and NL-Bayes. This similarity of the method noise indicates that multiscale nonlocal means filtering in transform domain is empirically equivalent to thresholding or shrinkage in transform domain. Further, like BM3D and NL-Bayes, magnitude of the noise removed by the proposed algorithm depends upon the variation of geometry of the underlying image. Due to this fact, the proposed method also removes very fine and sharp discontinuities like thin ropes in boat image as shown in Figure 9(l).Figure 9
Columns from left to right represent difference of the noisy (σ
=
10) and the denoised images using BM3D [25], NL-Bayes [35], NLM [19], and the proposed MHNLM algorithms, respectively. The rows from top to bottom indicate the results on the gray-scale images of Barbara, Lena, boat, and house, respectively.
(a)
Barbara
(b)
(c)
(d)
(e)
Lena
(f)
(g)
(h)
(i)
Boat
(j)
(k)
(l)
(m)
House
(n)
(o)
(p)


### 4.4. Color Image Denoising

To evaluate the results of the proposed method forR
G
B color images, we consider the color images of Lena, House, and Peppers. In the first step of the algorithm, we use 9
×
9 patches, 15
×
15 search windows, and h
=
5
σ as the filtering parameter. In the second step, we select 7
×
7 patches with filtering parameter h
=
4
σ. The search window size is selected as 15
×
15 for noise levels with σ
≤
25 and is changed to 19
×
19 otherwise. The proposed algorithm (MHNLM) is compared with various state-of-the-art algorithms: those by Dabov et al. [25] (BM3D), Lebrun et al. [35] (NL-Bayes), and Buades et al. [19] (NLM). The denoising results for NL-Bayes and standard NLM methods are obtained using source codes [46, 47], respectively (Figure 10). The source codes are available at the public domain IPOL. The PSNR for R
G
B color images is defined as (31)
P
N
S
R
u
^
=
10
l
o
g
255
2
3
X
-
1
∑
c
=
1
3
∑
x
∈
X
u
o
c
x
-
u
^
c
x
2
,where c
=
1,2
,
3 corresponds to the color channel R,  G,  B, respectively. Also, |
X
| denotes the size of 2D image in the individual channel and u
o and u
^ represent the original and denoised R
G
B color images, respectively.Figure 10
In the first row, the noisyRGB color images of Lena, house, and peppers are shown from left to right with standard deviations σ
=
25, σ
=
25, and σ
=
50, respectively. Columns from left to right in the remaining rows show the denoising results of BM3D [25], NL-Bayes [35], NLM [19], and the proposed MHNLM algorithms, respectively.
(a)
σ
=
25
(b)
σ
=
25
(c)
σ
=
50
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)The results of BM3D and NL-Bayes are almost similar and clearly better than the proposed algorithm. Both the algorithms exploit the 3D grouping strategy, which is not employed in the proposed algorithm. Therefore, it would be interesting to examine the combined effects of 3D collaborative filtering and normal vectors patch comparison on denoising capability. For moderate and severe levels (σ
≥
20) of noise, the proposed algorithm yields better results than the classical nonlocal means in terms of PSNR. However, in the presence of low noise (σ
≤
15) the performance of the classical nonlocal means provides better results over the proposed algorithm. The performance of the proposed algorithm may be enhanced by certain modifications. For instance, 3D grouping used in BM3D or NL-Bayes can be combined with the proposed similarity measure.


## 4.1. Gray-Scale Image Denoising

To evaluate the results of the proposed method, the benchmark gray-scale intensity images of Lena, Barbara, Boats, Peppers, and House are considered. We use9
×
9 patches, 15
×
15 search windows, and h
=
6
σ as the filtering parameter in the first step. In the second step, we select 7
×
7 patches with filtering parameter h
=
4
σ. The filtering parameter is empirically reduced to 4
σ from 6
σ to avoid the oversmoothing phenomenon. The finest resolution scale for 512
×
512 gray-scale image is J
=
9. The proposed algorithm, denoted by MHNLM, is compared with various state-of-the-art algorithms: those by Dabov et al. [25] (BM3D), Lebrun et al. [35] (NL-Bayes), Portilla et al. [18] (BLS-GSM), Buades et al. [19] (NLM), Elad and Aharon [23] (K-SVD), and Kervrann et al. [22] (BNLM) (Table 3). The denoising results for NL-Bayes and the standard NLM methods are obtained using source codes [46, 47], respectively.


## 4.2. Computational Complexity Comparison

In what follows, we present the comparison of computational complexity in terms of the number of operations required. In our proposed algorithm, the computational time is proportional toN
2
n
2
m
2
1
+
3
(
J
-
J
0
)
/
m
2, where N
2, n
2, and m
2 are the sizes of image, search window, and patch, respectively. The first term in this expression refers to the number of operations required in classical nonlocal means filtering. The second term refers to complexity of the accelerated nonlocal mean filtering on three detail subbands at each scale. The coarsest level of multiscale decomposition in DSWT domain is J
0
=
7. In our simulations, we employ biorthogonal spline wavelet transform for DSWT decomposition. The time complexity of the nonlocal means filtering is N
4
n
2 where the search window is set as the whole image. However, for semilocal version of the standard NLM [19], compared here, the time complexity is given by N
2
n
2
m
2. In case of BNLM [22], the computational time depends upon the sub-sampling size L of the image and is given by N
2
n
2
m
2
/
L
2. In the absence of sub-sampling scheme (L
=
1), the computational complexity of BNLM is the same as that of NLM. For BM3D [25], the time complexity, excluding the 3D transformation overhead, is given by 2
(
n
1
2
+
n
2
)
m
2
N
2
/
L
2, where the sum, n
1
2
+
n
2 represents the number of operations required for grouping the patches in 3D transform domain. The multiplication factor, 2, is used to indicate the two step image denoising nature of BM3D algorithm. The sub-sampling parameter, L is the sliding window size used for block matching and is set to 1 when the grouped patches do not overlap. The computational complexity of NL-Bayes [35] is similar to that of BM3D. This is due the fact that NL-Bayes algorithm employs Bayes’ rule to the the 3D groups obtained with BM3D approach. Finally, the computational cost of K-SVD [23] is given by 4
K
m
2
L
+
2
K
(
L
+
m
2
)
+
K
3
N
2 [48], where K denotes the desired sparsity level and L represents the number of atoms (columns) in the dictionary. The remaining terms, m
2 and N
2 have the usual meanings of patch and image size, respectively. Among all the methods compared here, K-SVD algorithm is the most expensive due to the sequential update of each of the L atoms (columns) in the dictionary. From the above analysis, it can be noticed that the computational complexity of the proposed algorithm, somehow, lies between those of the classical nonlocal means filtering and BM3D.


## 4.3. Visual Quality Comparison

Here, we discuss and compare the denoising capability of the proposed algorithm with that of the above mentioned algorithms. The peak signal-to-noise ratio (PSNR) is used for comparing the denoising capability of each scheme. For an original gray-scale imageu
o of size M
×
N, let u
^ be the denoised image obtained as its estimate using certain denoising algorithm. The PSNR is then defined as (30)
P
N
S
R
u
^
=
10
l
o
g
255
2
M
N
-
1
∑
i
=
1
M
∑
j
=
1
N
u
o
i
,
j
-
u
^
i
,
j
2
.Table 1 provides the PSNR comparison values for the above cited approaches; the bold-faced values represent the best performance among the last five columns. The results of BM3D and NL-Bayes are quite competitive regardless of the noise level and are better than the rest of the compared algorithms. The reason for these outstanding results is the enhanced sparse representation obtained with 3D transform domain and collaborative filtering as discussed earlier. NL-Bayes is similar to BM3D in its structure. However, it exploits Bayesian framework rather than hard thresholding or Wiener filtering used in BM3D. For the rest of the algorithms, KSVD performance is better when the noise level is low. On the other hand, the proposed method yields better results in the presence of moderate and severe noise (σ
≥
20). It can be noticed that the results of the proposed algorithm are always better than the classical nonlocal means filtering. Our results can also be confirmed according to the average of the performances at various noise levels. Table 2 indicates that, on average, our algorithm outperforms KSVD, BLS-GSM, and BNLM in the presence of moderate or severe noise. However, the performance of the proposed method is slightly lower than those of the KSVD, BLS-GSM, and BNLM for low level of noise (σ
=
10) as depicted in Figure 8. Therefore, the proposed algorithm is more suitable in the scenarios where the noise levels are high.Table 1
PSNR comparison of the proposed and various state-of-the-art algorithms for gray-scale images.
Image
σ
BM3D [25]
NL-Bayes [35]
GSM [18]
NLM [19]
KSVD [23]
BNLM [22]
MHNLM
Lena
10
35.93
35.88
35.61
34.35
35.47
35.25
35.40
15
34.27
34.02
33.90
32.10
33.70
33.68
33.93
20
33.05
32.88
32.66
31.56
32.38
32.63
32.75
25
32.05
31.89
31.69
30.44
31.32
31.55
31.76
50
28.86
28.83
28.61
27.35
27.79
27.51
28.47
Barbara
10
34.98
34.95
34.03
33.18
34.42
33.83
33.80
15
33.11
32.70
31.86
30.77
32.37
32.21
32.35
20
31.78
31.55
30.32
30.27
30.83
30.88
31.13
25
30.72
30.39
29.13
29.01
29.60
29.77
30.07
50
27.17
26.84
25.48
25.62
25.47
24.91
26.41
Boats
10
33.92
33.93
33.58
32.93
33.64
33.18
32.94
15
32.14
31.93
31.70
30.70
31.73
31.45
31.52
20
30.88
30.71
30.38
29.73
30.36
30.16
30.42
25
29.91
29.68
29.37
28.56
29.28
29.11
29.43
50
26.64
26.40
26.38
25.25
25.95
25.13
26.22
Peppers
10
34.68
34.77
33.77
33.51
34.28
33.87
33.53
15
32.70
32.53
31.74
31.07
32.22
32.06
32.03
20
31.29
31.31
30.31
30.04
30.82
30.75
30.82
25
30.16
30.16
29.21
28.68
29.73
29.77
29.78
50
26.41
26.49
25.90
24.17
26.13
23.84
26.28
House
10
36.71
36.18
35.35
34.91
35.98
35.67
35.78
15
34.94
34.33
33.64
32.70
34.32
34.23
34.23
20
33.77
33.33
32.39
32.43
33.20
33.24
33.11
25
32.86
32.48
31.40
31.18
32.15
32.30
32.15
50
29.37
29.04
28.26
27.62
27.95
27.64
28.38Table 2
Average PSNR comparison for various noise levels.
σ
BM3D [25]
NL-Bayes [35]
GSM [18]
NLM [19]
KSVD [23]
BNLM [22]
MHNLM
10
35.24
35.14
34.47
33.78
34.76
34.36
34.29
15
33.43
33.10
32.57
31.47
32.87
32.73
32.81
20
32.15
31.96
31.21
30.81
31.52
31.53
31.65
25
31.14
30.92
30.16
29.58
30.42
30.50
30.63
50
27.69
27.52
26.93
26.00
26.66
25.81
27.15Table 3
PSNR comparison of the proposed and various state-of-the-art algorithms for color images.
Image
σ
BM3D
NL-Bayes
NLM
MHNLM
Lena
10
35.22
35.26
34.77
34.52
15
33.94
33.75
33.15
33.15
20
33.02
32.95
31.92
32.18
25
32.27
32.08
30.96
31.48
50
29.88
29.89
27.89
28.41
House
10
36.23
35.82
35.22
35.02
15
34.85
34.90
33.75
33.55
20
33.84
33.28
32.55
32.55
25
33.03
32.42
31.44
31.84
50
30.47
30.20
27.50
28.33
Peppers
10
33.78
33.92
33.74
33.20
15
32.60
32.60
32.28
32.27
20
31.83
31.84
31.24
31.27
25
31.20
31.10
30.35
30.66
50
28.93
28.98
27.14
28.02Apart from the quantitative analysis with the PSNR values, the quality of visual appearance for the test images can also be assessed in terms of fine details and textures. For instance, in case of Lena’s face shown in Figure5(d) weak fine marks on the chin are preserved at the moderate noise level of σ
=
20. Barbara image is a well-known example that contains a lot of texture. As shown at the magnified scale in Figures 6(d) and 7(d), our algorithm efficiently retains the texture on the table cover, scarf, and chair. Similarly, the noise free image of house, shown in Figure 7(e) contains very fine regular pattern of bricks that is quite intermingled with the noise. The proposed algorithm has managed to recover the brick structure while removing the noise effectively. Lastly, the boats image is the representative of the benchmark images with very fine details, sharp edges, and discontinuities. Although, our algorithm effectively removes the noise, very thin ropes and strings have not been fully recovered. Moreover, at the magnified scale, there are very weak oscillations across the sharp discontinuities such as edges of ropes and rods. This oscillatory phenomenon may be inherent to wavelet based filtering which we have used in the first step of our algorithm.Figure 5
(a), (b), (c), and (d) represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Lena image, respectively.
(a)
(b)
(c)
(d)Figure 6
(a), (b), (c), and (d) represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Barbara image, respectively.
(a)
(b)
(c)
(d)Figure 7
Columns from left to right represent the magnified original, noisy (σ
=
20), predenoised, and denoised subimages from Barbara, house, and boat images, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)Figure 8
Average PSNR versus noise levelσ comparison of BM3D, NL-Bayes, GSM, NLM, KSVD, BNLM, and MHNLM.An appropriate approach to ascertain the visual quality is the method noise mechanism suggested by Buades et al. [19]. The method noise is defined as the difference between the given noisy image and its denoised version which depicts the noise removed by a specific denoising operator or algorithm. Buades et al. [19] emphasized that the method noise should be as closer to random additive noise as possible to justify the efficacy of certain denoising algorithm. It provides a way to visualize fine geometrical features or details such as texture and edges which may not be preserved by certain denoising algorithm and may be removed along with the noise. Unfortunately, due to complex nature of several state-of-the-art algorithms compared here, the closed form of mathematical description is difficult to be obtained for the method noise comparison. Therefore the method noise will be estimated using the difference images only. It is worth noticing that the visual comparison of the method noise mechanism relies on the suitable selection of noise level of the additive white Gaussian noise. A reasonable value of standard deviation of the noise is 5 or 10 as very nicely explained in [37]. This is due to the fact that when the standard deviation of the additive noise is higher than the image contrast, features even removed during denoising process will not be perceivable as they may be buried in the severe noise removed from the image. In such situation, the empirical visual assessment of the method noise may not be reliable.The method noise of the BM3D [25], NL-Bayes [35], and classical NL-means [19] are compared with that of the proposed algorithm. Each of the gray-scale images of Barbara, Lena, boats, and house is contaminated with additive white Gaussian noise of standard deviation σ
=
10. In order to obtain proper visualization, the difference images are rescaled as described in [37]. The method noise results of the compared algorithms, including the proposed one, are similar to the white Gaussian noise as shown in Figure 9. In case of classical nonlocal means, the amplitude of the noise removed is uniform all over the image regardless of the structures like textures or edges present in the image as can be seen in Figures 9(c), 9(g), 9(k), and 9(o). For the rest of the algorithms, the amplitude of the removed noise varies with the geometrical features of the underlying image. Moreover the magnitudes of those differences obtained through classical nonlocal means are comparatively greater than the respective results for the rest of the approaches. The method noise result of the proposed algorithm is similar to those of the BM3D and NL-Bayes as shown in Figure 9. It is worth noticing that BM3D performs thresholding in 3D transform domain and NL-Bayes exploits the Bayesian framework for shrinkage of 3D groups of similar patches. In contrast to those two approaches, the proposed algorithm does not perform any thresholding. Instead, it applies the accelerated version of the classical nonlocal means filtering on the 2D transform domain. Even then, the noise method is much similar to BM3D and NL-Bayes. This similarity of the method noise indicates that multiscale nonlocal means filtering in transform domain is empirically equivalent to thresholding or shrinkage in transform domain. Further, like BM3D and NL-Bayes, magnitude of the noise removed by the proposed algorithm depends upon the variation of geometry of the underlying image. Due to this fact, the proposed method also removes very fine and sharp discontinuities like thin ropes in boat image as shown in Figure 9(l).Figure 9
Columns from left to right represent difference of the noisy (σ
=
10) and the denoised images using BM3D [25], NL-Bayes [35], NLM [19], and the proposed MHNLM algorithms, respectively. The rows from top to bottom indicate the results on the gray-scale images of Barbara, Lena, boat, and house, respectively.
(a)
Barbara
(b)
(c)
(d)
(e)
Lena
(f)
(g)
(h)
(i)
Boat
(j)
(k)
(l)
(m)
House
(n)
(o)
(p)


## 4.4. Color Image Denoising

To evaluate the results of the proposed method forR
G
B color images, we consider the color images of Lena, House, and Peppers. In the first step of the algorithm, we use 9
×
9 patches, 15
×
15 search windows, and h
=
5
σ as the filtering parameter. In the second step, we select 7
×
7 patches with filtering parameter h
=
4
σ. The search window size is selected as 15
×
15 for noise levels with σ
≤
25 and is changed to 19
×
19 otherwise. The proposed algorithm (MHNLM) is compared with various state-of-the-art algorithms: those by Dabov et al. [25] (BM3D), Lebrun et al. [35] (NL-Bayes), and Buades et al. [19] (NLM). The denoising results for NL-Bayes and standard NLM methods are obtained using source codes [46, 47], respectively (Figure 10). The source codes are available at the public domain IPOL. The PSNR for R
G
B color images is defined as (31)
P
N
S
R
u
^
=
10
l
o
g
255
2
3
X
-
1
∑
c
=
1
3
∑
x
∈
X
u
o
c
x
-
u
^
c
x
2
,where c
=
1,2
,
3 corresponds to the color channel R,  G,  B, respectively. Also, |
X
| denotes the size of 2D image in the individual channel and u
o and u
^ represent the original and denoised R
G
B color images, respectively.Figure 10
In the first row, the noisyRGB color images of Lena, house, and peppers are shown from left to right with standard deviations σ
=
25, σ
=
25, and σ
=
50, respectively. Columns from left to right in the remaining rows show the denoising results of BM3D [25], NL-Bayes [35], NLM [19], and the proposed MHNLM algorithms, respectively.
(a)
σ
=
25
(b)
σ
=
25
(c)
σ
=
50
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)The results of BM3D and NL-Bayes are almost similar and clearly better than the proposed algorithm. Both the algorithms exploit the 3D grouping strategy, which is not employed in the proposed algorithm. Therefore, it would be interesting to examine the combined effects of 3D collaborative filtering and normal vectors patch comparison on denoising capability. For moderate and severe levels (σ
≥
20) of noise, the proposed algorithm yields better results than the classical nonlocal means in terms of PSNR. However, in the presence of low noise (σ
≤
15) the performance of the classical nonlocal means provides better results over the proposed algorithm. The performance of the proposed algorithm may be enhanced by certain modifications. For instance, 3D grouping used in BM3D or NL-Bayes can be combined with the proposed similarity measure.


## 5. Conclusions

A new definition of normal vectors patch is introduced to acquire more information about the similarity of intensity patches combined with a multiscale implementation of the accelerated nonlocal means filtering. The experimental results demonstrate the effectiveness of the proposed algorithm using the notion of normal vectors patch. In future, we plan to extend this approach in3D transform domain that may achieve enhanced sparsity level to further improve the image denoising capability.



---

*Source: 318341-2015-08-27.xml*