- Research
- Open access
- Published:

# Rician nonlocal means denoising for MR images using nonparametric principal component analysis

*EURASIP Journal on Image and Video Processing*
**volumeÂ 2011**, ArticleÂ number:Â 15 (2011)

## Abstract

Denoising is always a challenging problem in magnetic resonance imaging (MRI) and is important for clinical diagnosis and computerized analysis, such as tissue classification and segmentation. The noise in MRI has a Rician distribution. Unlike additive Gaussian noise, Rician noise is signal dependent, and separating the signal from the noise is a difficult task. In this paper, we propose a useful alternative of the nonlocal mean (NLM) filter that uses nonparametric principal component analysis (NPCA) for Rician noise reduction in MR images. This alternative is called the NPCA-NLM filter, and it results in improved accuracy and computational performance. We present an applicable method for estimating smoothing kernel width parameters for a much larger set of images and demonstrate that the number of principal components for NPCA is robust to variations in the noise as well as in images. Finally, we investigate the performance of the proposed filter with the standard NLM filter and the PCA-NLM filter on MR images corrupted with various levels of Rician noise. The experimental results indicate that the NPCA-NLM filter is the most robust to variations in images, and shows good performance at all noise levels tested.

## 1 Introduction

Magnetic resonance (MR) images are affected by several types of artifact and noise sources, such as random fluctuations in the MR signal mainly due to the thermal vibrations of ions and electrons. Such noise markedly degrades the acquisition of quantitative measurements from the data. The noise in MR images obeys a Rician distribution [1â€“3]. Unlike additive Gaussian noise, Rician noise is signal dependent, and consequently separating the signal from the noise is difficult.

There is an extensive literature on Rician noise reduction in magnetic resonance imaging (MRI), varying from the use of traditional smoothing filters to more elegant methods. Most conventional mask-based denoising filters, such as Gaussian and Wiener filters [4], are conceptually simple. However, they will most likely fail to reduce Rician noise in MRI, as they usually assume that the noise is Gaussian. Restored images may often look blurred and may be corrupted by artifacts that are usually visible around the edges. One way to overcome the problems of simple smoothing is to use a nonlocal means (NLM) filter [5â€“10]. These methods make use of the self-similarity of images, in that many structures show up more than once in the image. The NLM filter takes advantage of the high degree of redundancy of any natural image and produces an optimal denoising result if the noise can be modeled as Gaussian. Unfortunately, the method requires computation of the weighting terms for all possible pairs of pixels, making it computationally expensive. A number of recent reports on NLM denoising focused on shortcuts to make the method computationally practical [11â€“14]. One of the most compelling strategies is to exclude many weight computations between the image neighborhood feature vectors. Azzabou, et al. [11] and Tasdizen [13, 14] proposed the so-called PCA-NLM filter, which uses the lower dimensional subspace of the space of image neighborhood vectors in conjunction with NLM using principal component analysis (PCA). More important, this approach was also shown to result in increased accuracy over those that use the full-dimensional ambient space.

There are, however, some applications for which the PCA-NLM filter is not recommended because PCA is sensitive to image features and the presence of noise in the data, and the PCA-NLM filter is, therefore, highly dependent on the settings of its parameters.

In this paper, we propose a nonparametric PCA-NLM filter that is a useful alternative to the PCA-NLM filter for Rician noise reduction in MR images. The proposed filter uses PCA with ranked data instead of the original pixel data. We refer to this as the NPCA- NLM filter. We estimate the subspace dimensionality from parallel analysis [15â€“17] based on the artificial rank correlation matrix. In contrast to the method reported by Tasdizen [13, 14], our estimation does not require the assumption of a Gaussian distribution and produces a more robust subspace dimensionality regardless of the images being denoised. We also propose a nonparametric method for optimal smoothing kernel width selection.

## 2 Background

### 2.1 Rician noise in MRI

In MRI, raw data are intrinsically complex valued and corrupted with zero mean Gaussian distributed noise with equal variance [1]. MR magnitude images are formed by simply taking the square root of the sum of the square of the two independent Gaussian random variables (real and imaginary images) pixel by pixel. After this nonlinear transformation, MR magnitude data can be shown to have a Rician distribution [1â€“3, 9, 18]. For an MR magnitude image, the Rician probability density function of the measured pixel intensity *x* is given by

where *I*_{0} is the modified zeroth-order Bessel function of the first kind, *A* is the underlying noise-free signal amplitude, and *Ïƒ* denotes the standard deviation of the Gaussian noise in the real and imaginary images. When *A/Ïƒ* is high, the Rician distribution approaches a Gaussian; when *A/Ïƒ* approaches 0, i.e., when only noise is present, the Rician distribution becomes Rayleigh distributed and Equation 1 reduces to [1]

### 2.2 NLM filter

Starting from a true, discrete image *u*, a noisy observation of *u* at pixel *i* is defined as Ï…*(i) = u(i)* + *n(i)*. Let {\mathcal{N}}_{i} and v\left({\mathcal{N}}_{i}\right) denote a square neighborhood centered around pixel *i* and the image neighborhood vector, the elements of which are the gray-level values of Ï… at {\mathcal{N}}_{i}, respectively. Also, let *S*_{
i
}be a square search-window of fixed size centered around pixel *i*. Then, the NLM filter [5, 6] defines an estimator for *u(i)* as

where *Z*_{
i
}is a normalization constant and *h* acts as a smoothing parameter controlling the decay of the exponential function.

This method is too slow to be practical. The high computational complexity is due to the cost of weight calculation for all pixels in the image during the process of denoising. For every pixel being processed, the whole image is searched and the differences between corresponding neighborhoods computed.

## 3 Proposed NPCA-NLM denoising

### 3.1 NPCA approach

We include a brief description of the projections of the image neighborhood vectors onto a lower dimensional space by NPCA, which uses their ranks instead of the original data. Let Î© denote the entire set of pixels in the image and let Î¨ be a randomly chosen subset of Î©. Also, let **R**_{
i
}denote the rank vector of {*x*_{
i
}, *i* = 1, ..., *Q*} in each window of *Q* size, where *Q = r* Ã— *r*. The principal components of *Q* rank vector can be obtained from the eigenvectors of the rank covariance matrix

where \stackrel{\xcc\u201e}{R}=\left(1\xe2\u02c6\u2022\left|\mathrm{\xce\xa8}\right|\right){\xe2\u02c6\u2018}_{i\xe2\u02c6\u02c6\mathrm{\xce\xa8}}{R}_{i} is the rank mean and |Î¨| is the number of elements in the set Î¨. Let {e_{
p
}: *p* = 1,..., *Q*} be the eigenvectors of *C*_{
R
}, i.e., the principal neighborhoods, sorted in order of descending eigenvalues. Let the *d*-dimensional NPCA subspace be the space spanned by {e_{
p
}: *p* = 1,..., *d*}. Then, the projection of the image neighborhood vectors onto *d*-dimensional NPCA subspace is

where (**R**_{
i
}â—¦ **e**_{
p
}) denotes the inner product of the two vectors.

Let {f}_{i}^{d}={\left[\left({R}_{i}\xe2\u02c6\u02dc{\mathsf{\text{e}}}_{1}\right),\xe2\u2039\xaf\phantom{\rule{0.3em}{0ex}},\left({R}_{i}\xe2\u02c6\u02dc{\mathsf{\text{e}}}_{d}\right)\right]}^{T} be the *d*-dimensional vector of projection coefficients. Then, because of the orthonormality of the basis

Then, the *d*-dimension NLM algorithm in NPCA space is

where {Z}_{i}^{d}={\xe2\u02c6\u2018}_{j\xe2\u02c6\u02c6{S}_{i}}{e}^{-{\xe2\u02c6\xa5{f}_{i}^{d}-{f}_{j}^{d}\xe2\u02c6\xa5}^{2}\xe2\u02c6\u2022{h}^{2}} is the new normalizing term. Note that the proposed approach with *d = Q* is equivalent to the useful NLM filter when applied to ranks rather than the original observations, i.e., Equation 4 with *d = Q* becomes Equation 2 when calculated on the ranks.

### 3.2 Optimal smoothing parameter selection

Given a noisy image and a combination of \mathcal{N} and *d*, there exists an optimal choice of the parameter *h* in Equation 3.2 that yields the best output in terms of peak signal-to-noise ratio (PSNR). Figure 1 shows the PSNR of the estimator output *Ã»*_{
d
}as a function of *h* for an image corrupted with Rician noise *(Ïƒ=* 30).

Buades et al. [5, 6] reported that the smoothing parameter *h* depends on the standard deviation of the noise *Ïƒ*, and typically a good choice for 2D images is *h* â‰ˆ 10*Ïƒ*. Tasdizen [14] used simple linear regression based on the least squares method as an automatic way of choosing *h* given an image neighborhood size and subspace dimensionality size. Working under the normality assumption, he achieved a reasonable applicable rule for parameter selection. If the pixel values are not normally distributed, then *h* in [14] may not be optimal. In practice, the choice of *h* that is applicable in situations where the normal procedures cannot be utilized may be appropriate. We take as our model

where *Î²(r, d)* and *Î±(r, d)* are unknown parameters and âˆˆ is an independent and identically distributed random variable with an arbitrary continuous distribution function *F*. We use a nonparametric method [19] for the linear regression problem as an automatic way of choosing *h* given an image neighborhood size and *d*. Table 1 shows the linear fit parameters for several choices of *d* of 7 Ã— 7 image neighborhoods. Parameters such as those shown in Table 1 can be precomputed for all \mathcal{N} and *d* of interest.

Unlike Tasdizen [14], the linear fit parameters in Table 1 do not require the assumption of a Gaussian distribution of the noise with which the images are corrupted. Therefore, we expect that *h* produced by these parameters will yield results for a much larger set of images than that from which they were learned.

### 3.3 Automatic dimensionality selection

Determining the number of components to retain is a crucial problem when using PCA. Of several methods proposed for determining the significance of principal components, the K1 method proposed by Kaiser [20] is the best known and most commonly utilized in practice [21]. However, this method often overextracts components [22]. Another commonly used approach is based on Cattell's Scree test [23], which involves the visual exploration of a graphical representation of the eigenvalues. This method has been criticized for its subjectivity, as there is no objective definition of the cutoff point between the important and trivial factors. Parallel analysis [15] is more accurate than the above methods for determining the number of retained components, but it tends to overextract components [22]. Tasdizen [14] proposed a modification of the parallel analysis algorithm for determining the number of components in PCA of image neighborhoods for denoising. One of the main drawbacks of parallel analysis is that the number of principal components to retain is highly dependent on the images and the noise. Therefore, different numbers of principal components are required for images with different features. A quick solution to this problem is to use a modified procedure for parallel analysis of ranked data. Let *Î»*_{
p
}for 1 â‰¤ *p* â‰¤ *Q* denote the eigenvalues of *C*_{
R
}in Equation 3 sorted in descending order. Similarly, let *Î±*_{
p
}denote the sorted eigenvalues of the artificial rank covariance matrix. Parallel analysis estimates data dimensionality as

Figure 2 shows the automatic dimensionality selection results for *brain, body*, and *knee* images with noise *Ïƒ* ranging from 5 to 50 in increments of 5. The numbers of significant components for PCA as shown in Figure 2 were computed as about 10, 14, and 16 for *brain, body*, and *knee* images, respectively; however, the numbers of significant components for NPCA were all computed as about 15. It is important to note that the numbers of components vary more significantly with noise levels for PCA than for NPCA. Therefore, the number of principal components for NPCA is more robust to variations in noise as well as in images than for PCA.

Figure 3 shows the PSNR of the estimator output *Ã»* as a function of *d* for a *brain* image that was corrupted with Rician noise(*Ïƒ* = 10). The curve for PCA showed a steep increase until the peak *d*, for example, *d =* 15, after which the curve declined significantly. In contrast, the curve for NPCA increased similarly until the peak point, after which it became considerably flat. Therefore, as expected, the incorrect determination of the number of components for PCA can result in remarkable PSNR loss.

## 4 Experiments and results

The proposed NPCA-NLM filter was tested using 256 Ã— 256, 8-bits/pixel MR images, i.e., the *brain, body*, and *knee* images shown in Figure 4. The performance of the proposed filter was tested for various levels of noise corruption and compared with the standard NLM filter and recently proposed PCA-NLM filter.

We generated MR magnitude data by adding Rician noise to noise-free images. The Rician noise was created as {y}_{e}\left({t}_{i}\right)=\sqrt{{\left[y\left({t}_{i}\right)+{e}_{1}\right]}^{2}+{e}_{2}^{2}},, where *y* is the true signal and *e*_{1} and *e*_{2} are random numbers from a Gaussian distribution with zero mean and standard deviation *Ïƒ*[9]. Four levels of noise were tested with *Ïƒ* = [10, 20, 30, 40]. Figure 5 shows close-up images of the test images in Figure 4, which were corrupted with Rician noise *Ïƒ =* 10 and 40.

In addition to the visual quality, the performance of the proposed filter was measured by the following criteria: PSNR, mean absolute error (MAE), and structural dissimilarity (DSSIM). For 8-bit images, PSNR and MAE are defined as follows:

where *ÃŽ(i,j)* and *I(i,j)* denote the pixel values of the restored image and the original image, respectively, at location *(i,j)* and M Ã— N is the size of the image. Higher PSNR values indicate better restoration, and smaller MAE values indicate that the filter can preserve more details and edges. However, they were not very well matched to perceived visual quality. DSSIM is a distance metric derived from structural similarity (SSIM), which takes into account the human visual system, and was defined as follows [24]:

where SSIM is given by

where *Î¼*_{
x
}and *Î¼*_{
y
}are means of *x* and *y*, respectively; {\mathrm{\xcf\u0192}}_{x}^{2} and {\mathrm{\xcf\u0192}}_{y}^{2} are variances of *x* and *y*, respectively; and cov_{
xy
}is covariance of *x* and *y*. The constants were set as follows: *c*_{1}*=* 0.01L and *c*_{2} = 0.03L, and *L* was 255 for 8-bits/pixel gray scale images.

### 4.1 Visual quality comparison

Figures 6 and 7 show the results of applying the three filters to noisy images corrupted with Rician noise *Ïƒ =* 10 in Figure 5a-c, and Rician noise *Ïƒ =* 40 in Figure 5d-f, respectively.

As shown in Figure 6, the three filters based on the NLM filter performed well on images with low noise variance *(Ïƒ =* 10). The differences in performance of these filters are difficult to distinguish in the restored images for low noise, but inspection of images with high noise in Figure 7 showed that the denoising effects of the NPCA-NLM filter and PCA-NLM filter were almost identical, except for slight blurring of the output from the PCA-NLM filter. However, the impact of noise on the standard NLM filter was clearly visible, and the restored images contained considerable noise spots.

### 4.2 Quantitative comparison

The quantitative performances in terms of PSNR, MAE, and DSSIM for all of the algorithms are given in Tables 2, 3, and 4, respectively. The results shown in these tables indicate that the NPCA-NLM filter had the best performance among the filters examined for the *brain* image over all noise ranges *Ïƒ* = 10, 20, 30, 40. The NPCA-NLM filter showed better performance than the NLM filter and PCA-NLM filter for *body* and *knee* images, which were corrupted with *Ïƒ = 10* and 40. It should be noted that the performance gap between the NPCA-NLM filter and the PCA-NLM filter increased on images with high noise. This was expected, as the PCA-NLM filter is more sensitive to noise. Our filter with the PCA-NLM filter still showed good performance on images that were corrupted with *Ïƒ* = 20 and 30.

Of the three filters investigated, the NPCA-NLM filter appeared to be the most robust to variations in images, performing well at all noise distributions tested.

## 5 Conclusion

We proposed an NPCA-NLM filter, which is a useful alternative to the PCA-NLM filter for Rician noise reduction in MR images. The filter uses PCA with ranked data instead of the original pixel data. The image neighborhood vectors used in the NLM filter are projected onto a lower dimensional subspace using NPCA. Therefore, the lower dimensional projections are not only used as search criteria, but also for computing similarity weights resulting in better accuracy in addition to reduced computational cost.

We estimated the subspace dimensionality from parallel analysis based on the artificial rank correlation matrix. We demonstrated that the numbers of components varied more significantly with noise level for PCA than for NPCA. Therefore, the number of principal components was more robust to variations in the noise as well as in the images for NPCA than for PCA. We also proposed a nonparametric method for optimal smoothing kernel width selection that produces results for a much larger set of images than that from which they were learned.

We investigated the performance of the proposed filter in comparison with the standard NLM filter and the recently proposed the PCA-NLM filter for various levels of Rician noise corruption. The experimental results showed that the NPCA-NLM filter was the most robust to variations in images, performing well at all noise levels tested.

## References

Gudbjartsson H, Patz S: The Rician distribution of noisy MRI data.

*Magn Reson Med*1995, 34(6):910-914.Macovski A: Noise in MRI.

*Magn Resonance Med*1996, 36(3):494-497.Nowak RD: Wavelet-based Rician noise removal for magnetic resonance imaging.

*IEEE Trans Image Process*1999, 8(10):1408-1419.Khireddine A, Benmahammed K, Puech W: Digital image restoration by Wiener filter in 2D case.

*Adv Eng Softw*2007, 38: 515-516.Buades A, Coll B, Morel JM: A review of image denoising algorithms, with a new one.

*Multiscale Model Simul*2005, 4(2):490-530.Buades A, Coll B, Morel JM: A non-local algorithm for image denoising.

*Proc IEEE Trans IEEE Conf Computer Vision and Pattern Recognition*2005, 60-65.Orchard J, Ebrahim M, Wang A: Efficient nonlocal-means denoising using the SVD.

*Proc Int Conf Image Processing*2008, 1732-1735.Coupe P, Hellier P, Kervann C, Barillot C: NonLocal means-based speckle filtering for ultrasound images.

*IEEE Trans Image Process*2009, 18(10):2221-2229.He L, Greenshields IR: A nonlocal maximum likelihood estimation method for Rician noise reduction in MR images.

*IEEE Trans Med Imaging*2009, 28(2):165-172.Manjon JV, Coupe P, Mari-Bonmati L, Collins DL, Robles M: Adaptive non-local means denoising of MR images with spatially varying noise levels.

*J Magn Reson Imaging*2010, 31: 192-203.Azzabou N, Paragios N, Guichard F: Image denoising based on adapted dictionary computation.

*Proc Int Conf Image Processing*2007, III: 109-112.Coupe P, Yger P, Prima S, Hellier P, Kervrann C, Barillot C: An Optimized blockwise nonlocal means denoising filter for 3-D magnetic resonance images.

*IEEE Trans Med Imaging*2008, 27(4):425-441.Tasdizen T: Principal components for non-local means image denoising.

*Proc Int Conf Image Processing*2008, 1728-1731.Tasdizen T: Principal neighborhood dictionaries for nonlocal means image denoising.

*IEEE Trans Image Process*2009, 18(12):2649-2660.Horn JL: A rationale and test for the number of factors in factor analysis.

*Psycho-metrica*1965, 30(2):179-185.Glorfeld LW: An improvement on horn's parallel analysis methodology for selecting the correct number of factor's to retain.

*Educ Psychol Meas*1995, 55(3):377-393.Ledesma RD, Valero-Mora P: Determining the number of factors to retain in EFA:an easy-to-use computer program for carrying out parallel analysis.

*Practical Ass Res Eval*2007, 12(2):1-11.Sijbers J, den Dekker AJ, Scheunders P, Dyck DV: Maximum-likelihood estimation of Rician distribution parameters.

*IEEE Trans Med Imaging*1998, 17(3):357-361.Sen PK: Estimates of regression coefficient based on Kendall's tau.

*J Am Stat Assoc*1968, 63: 1379-1389.Kaiser HF: The application of electronic computers to factor analysis.

*Educ Psychol Meas*1960, 20: 141-151.Fabrigar LR, Wegener DT, MacCallum RC, Strahan EJ: Evaluating the use of exploratory factor analysis in psychological research.

*Psychol Methods*1999, 3: 272-299.Zwick WR, Velicer WF: Comparison of five rules for determining the number of components to retain.

*Psychol Bull*1986, 99: 432-442.Cattell RB: The scree test for the number of factors.

*Multivar Behav Res*1966, 1: 245-276.Wang Z, Bovik AC, Sheikh HR, Simoncelli EP: Image quality assessment: From error visibility to structural similarity.

*IEEE Trans Image Process*2004, 13(4):600-612.

## Acknowledgements

This work was supported by the RACS 2010-2014, Production of fine-scale scenario of future climate change using regional climate models and analysis of uncertainties.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

## Authorsâ€™ original submitted files for images

Below are the links to the authorsâ€™ original submitted files for images.

## Rights and permissions

**Open Access**
This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (
https://creativecommons.org/licenses/by/2.0
), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

Kim, D.W., Kim, C., Kim, D.H. *et al.* Rician nonlocal means denoising for MR images using nonparametric principal component analysis.
*J Image Video Proc.* **2011**, 15 (2011). https://doi.org/10.1186/1687-5281-2011-15

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/1687-5281-2011-15