Edge Patch Based Image Denoising Using Modified NLM Approach Rahul Kumar Dongardive 1, Ritu Shukla 2, Dr. Y K Jain 3 1 Research Scholar of SATI Vidisha, M.P., India 2 Asst. Prof., Computer Science and Engineering Department, SATI Vidisha, M.P., India 3 HOD, Computer Science and Engineering Department, SATI Vidisha, M.P., India ABSTRACT The modified technique of a Non Local Mean method (NLM) is proposed in this paper, i.e. by combining the Non Local Means approach with the transform domain. This technique is grounded on estimating the noise free image significantly and efficiently as compared with the existing method. Our main focus is on the preservation of edges during the Denoising process. Since the edges are the important feature of the image, hence we use edge preserving filters to preserve the edges so that it reduces the chances of discontinuity and distortion of edges efficiently. The performance of proposed approach is experimentally verified on a variety of images and noise levels. The results presented in this paper demonstrate that our proposed method is at par or exceeding the current state of the art, both visually and quantitatively. Keywords: Image Denoising, Non Local Means, Edge preserving filter, Edge Patch. 1. INTRODUCTION Fundamentally the image denoising is considered as the restoration of image to decrease unwanted distortions and noise without adding artifacts and preserving features, such as smoothness, variations, edges, and textures. The challenge of any image denoising algorithm is to suppress noise while producing images without loss of essential details. The researchers than proposed denoising method by weighted averaging pixels similar in intensity within a local neighborhood. Under strong noise, identifying such similar pixels can be challenging. Many denoising algorithms have been proposed such as linear filtering, PDE based filtering [1], [2], TV minimization [3], [4], wavelet based [5]-[8] and bilateral filtering [9]-[11]. PDE based approach progressively estimated the initial image by its filtered versions which are smoother in some sense. This method is more consistent to preserve straight edges. However, corners are not conserved well. TV minimization approach maintains sharp edges but slanted edges are not conserved well. Bilateral filter as well as a range filter falls under the group of filters which include a small neighbourhood around the pixel. In the manner of preserving edges very well this filter performs better as compared with others. However, edges with a poor distinction suffer. A distinction from these local filters is a nonlocal means filter [12]. The Non Local Mean filter works on the hypothesis that natural images consist of many continual patterns. These continual patterns when identified and averaged remove random noise efficiently. These repetitive patches were exploited for better denoising by Buades et al. [12] in NLM filtering. NLM filter is more vigorous in denoising compared to other local neighbourhood based filters as a small patch around each pixel is considered instead of considering only the center pixel. Our method is very diverse in the sense, we build a single dictionary as a pre-processing step. The dictionary is created so that the searching of similar patches will become faster which results in better computation of the NLM algorithm. Since the dictionary contains the information about the similar patches. The dictionary is created to contain the information of variety of patches belonging to different textual pattern, since the data base of dictionary is too large because the same dictionary can be used to search similar types of patterns for any given test image. Due to this, the searching process in the dictionary becomes very slow since the size of dictionary becomes too large. This is the main limitation of the patch based dictionary. To overcome this limitation we create the dictionary containing the information about edges only which reduces the size of dictionary and makes the searching of similar edge patches faster than the previous one. However, it is essential that sharpness of edges is 272
preserved while capturing the edge patches. In this paper we are using edge preserving filter viz. Bilateral filter and anisotropic diffusion filter followed by the modified NLM which uses edge patch for Denoising the image and also preserves the edges in a better way. The primary goal of this paper is to design a computationally presumable NLM algorithm. Computational cost is high because distances between all the patches lying in the search window have to be computed even if the patches are dissimilar. On the contrary, in our approach we retrieve a few most similar patches very quickly for the given reference patch from the global dictionary, saving the computational time. The organization of the paper is as follows. Section II gives a brief introduction of NLM Denoising algorithm. Section III describes the edge preserving filters. Section IV briefly describes the motivation behind developing the NLM algorithm with the Multi Scale PCA. In Section V, the results with an appropriate discussion are demonstrated. In Section VI we have concluding remarks. 2. NLM DENOISING ALGORITHM A nonlocal means filter replaces each pixel of the image which is containing noise with the weighted average of all other pixels in the image. This can be represented as, NLM u i = j u w(n i, N j )u(j) where u(i ) is the pixel which need to be filtered or being corrupt with the noise, u( j ) is any pixel in the image, Ni is the nearest neighbor of i th pixel in the image and w(ni, Nj ) is the weight with which each noisy pixel is multiplied with. Weight function is the measure of the similarity between any two neighboring pixel (Ni) and (Nj) and it is computed by finding the Euclidean distance between the neighboring pixel. The pixels which are near to the center of the neighborhood is given more weight than pixels at far and thus this distance function is again weighted by a Gaussian kernel of standard deviation b. This can be represented as, 2 d = (u N i u(n j ) 2,b This. 2 2,b represents Gaussian weighted Euclidean distance function and b is the standard deviation of the Gaussian kernel. The weight function is as follow w N i, N j = 1 Z(i) e d h 2 whereh is the filtering parameter and Z is a normalization constant given by, Z i = e d h 2 j. In this paper, we put forward a modified technique by accelerating the NLM method by identifying and grouping all similar patches in a dictionary. Our searching practice is very fast and it extracts patches very precisely due to the built in dictionary. 3. EDGE PRESERVING FILTER Edges between domains are essential features for the understanding of images. However, smoothing operators have a tendency to distort the edges or boundaries between the different domains. Hence, in order to preserve the edges, filter to be used which remove the noise from the image but not degrades the quality of edges, i.e. an edge preserving filter to be used. The patterns of domains characterized by grey value, the boundaries between the domains are characterized by the difference in grey value. This difference can directly be measured in the image. The edge preserving filter describe in this section are Bilateral Filter and Anisotropic Diffusion Filter. 3.1 Bilateral Filter Bilateral filter was developed by Tomasi et al. [9] and it is the nonlinear filter which efficiently demises the image and in addition with the image Denoising it also preserves edges very well. Bilateral filter combines both domain and range filters. Pixels which are very near (spatially) to the center pixel are weighted more in domain filtering whereas photo metrically close pixels are given additional weight age in range filtering. Pixels which are very 273
dissimilar in intensity values are filtered by using averaging, leading to efficient edge preservation. Bilateral filter reinstate each noisy pixel by a weighted average of all neighbourhood pixels given by u x = 1 Z x y N x w S x, y w R x, y u(y) where N (x) is a spatial neighbourhood around pixel x, Z(x) is a normalization term given by, Z = w S x, y w R (x, y) y N x w S, w R are weights for spatial and range filtering, respectively. They are defined as, w S = e u x u (y ) 2 e h 2 where ρ and h are the filtering parameter. 3.2 Anisotropic Diffusion Filter x y 2 ρ 2 and w R = Anisotropic diffusion filter was designed by Perona and Malik [1]. It was designed after the Isotropic diffusion Filter, it smoothes the image in order to remove noise. But also blurs out the fine details and edges. So to overcome the drawbacks of Isotropic filter, Anisotropic diffusion filter was designed. Anisotropic Diffusion is the technique which aims to reduce image from the noise without removing the significant or important parts of the image such as edges, lines or other finer details that are important for the interpretation of the image. Anisotropic diffusion works on the principle of scale space demonstration of the image. Image structures are handled at different scales by representing an image as a one parameter family of smoothed images. Image is convolved with Gaussian kernel with different scale parameters (t). Anisotropic diffusion is given by u t = div(c x, y, t u = c x. y. t Δu + c. u Where div is the divergent operator, and _ respectively the gradient and Laplacian operators and c is diffusion coefficient. The magnitude of c depends on the presence of edge/object boundaries. To stop the diffusion in the image at the regions of object boundaries, magnitude of c is chosen to be 0 and at other regions it is 1. Hence it gives more importance to the intra region blurring than the inter region blurring. Perona and Malik suggested the following choice for c function, Where, κ is a constant. u(x, y, t) c x, y, t = exp [ ( ϰ ) 2] 4.1 Principal Component Analysis(PCA) 4. PROPOSED METHODOLOGY Principal component analysis (PCA) is an algebraic procedure which converts set of observation of possibly correlated variable into a set of values which are linearly uncorrelated variable known as principal component, which is calculated on the basis of orthogonal transformation. The number of principal components is less than or equal to the number of original variables. This orthogonal transformation is defined in such a way first principal component has the largest possible variance (that is, accounts for as much of the variability in the data as possible), and each succeeding component in turn has the highest variance possible under the constraint that it is orthogonal to (i.e., uncorrelated with) the preceding components. It is guaranteed that the principal components are independent if the data is normally distributed. PCA is responsive to the comparative scaling of the original variables. It is the method used for analysis which reduces the multidimensional data to lower dimensions. The PCA is quite similar as SVD (Singular Value Decomposition) and the only difference is that SVD could be applied with any type of matrices but the PCA is calculated on the basis of covariance or correlation. The formula is expressed is as follows C = BT B n 1 274
The results of a PCA are generally discussed in terms of component scores, occasionally called factor scores (the transformed variable values related to a particular data point), and loadings (the weight by which each identical original variable should be multiplied to get the component score). 4.2 Multi Scale PCA The aim of Multi Scale PCA is to restructure the simplified multivariate signal, which starts from a multivariate signal and than using a simple representation at each resolution level. Multi Scale principal components analysis generalizes the PCA of a multivariate signal which is represented as a matrix by concurrently performing a PCA on the matrices having details of different levels. A PCA is can also performed on the wide range coefficients matrix in the wavelet domain and also on the final reconstructed matrix. Hence by selecting the numbers of adjourned principal components, interesting simplified signals can be reconstructed. In this paper, scale was introduced to enhance the performance of PCA on datasets. That is, we will use in the definition of Multi Scale PCA maximization of the sum of point-to-point weighted distances between the orthogonal projections of data points for the pairs of points with distances in some intervals In this paper, scale was introduced to enhance the performance of PCA on datasets. That is, we will use in the definition of MultiScale PCA maximization of the weighted sum of point-to-point squared distances between the orthogonal projections of patches for the similar patches with distances in some intervals. The result of this is PCA decomposition of the data which depend on the scale chosen. The proposed method of denoising procedure for the edge patch based image using NLM with MultiScale PCA is as follows: 1. Select the image from data base. 2. Degrade the image with sufficient amount of Gaussian noise. 3. For any noisy test image (I n ), we apply an edge Preserving filter, than subtract the output result (O e ) from the input test image to obtain residual image (I r ) i.e., perform (I r ) = (I n ) (O e ). 4. From the residual image (I r ), create the edge patch dictionary. 5. Apply MultiScale PCA on the patches and denoise them by using NLM method. 6. Add the result obtained from step 5 to the output result of edge preserving filters (O e ) to obtain the final denoised result i.e., perform (O f ) = (O e ) + (O n ). 5. RESULT ANALYSIS The proposed denoising algorithm is tested on a number of images and results for well known test for different images includes medical images as well is being verified. We use bilateral and anisotropic diffusion filter, as both these filters are excellent in terms of preserving edges well and it uses the edge patch based dictionary. We compare the denoising results obtained with these methods to find the best suited filter for the construction of edge patch based dictionary. The result of the proposed algorithm is shown below with comparison to the previous method. Table 1. Comparative PSNR (db) results for different images between the proposed and the previous method of both bilateral and anisotropic filter with varying noise levels (σ) Image Cameraman Barbara Leena Noise Level (σ) Previous Method Proposed Method NLM(B) NLM(A) MSPCA(B) MSPCA(A) 32.3596 32.1339 34.1690 33.9553 30.034 29.8596 31.53 30.9811 27.0844 27.014 27.9701 28.0242 30.5334 30.5238 32.9386 32.9609 28.6608 28.7043 30.2349 30.4161 26.1116 26.3005 27.2457 27.5598 31.6344 31.55 33.3674 33.2486 29.475 29.4506 30.5516 30.5449 26.6873 26.7875 27.5765 27.7766 275
Cell X-Ray Image Moon Satellite Image MRI 35.5289 35.2845 36.6813 36.3994 31.9067 31.7053 32.7478 32.6194 28.3017 28.1342 28.93 29.04 36.0437 35.6146 36.8493 36.3803 32.3094 31.8727 32.9322 32.6021 28.2873 28.0802 28.8618 28.9040 36.4568 35.9254 37.3899 36.7125 32.5641 31.9889 33.2611 32.7130 28.3837 28.3047 28.8943 29.0336 29.117 29.2604 31.1472 31.2573 26.4631 27.7168 28.7308 29.01 25.2479 25.6521 26.3973 26.7603 33.1604 32.8049 34.7197 34.3563 30.503 30.2969 31.4798 31.43 27.3425 27.3532 28.1437 28.2937 Original image Degraded image NLM(A) denoised image MSPCA denoised Original image Degraded image NLM(B) denoised image MSPCA denoised Figure 1MRI image tested with the NLM(B)(Previous Method) = 26.1116, NLM(A)(Previous Method) =26.3005and MSPCB(Proposed Method) = 27.2457, MSPCA(Proposed Method) =27.5598on the basis of PSNR for noise variance(σ = ) Original image Degraded image NLM(B) denoised image MSPCA denoised 276
Original image Degraded image NLM(A) denoised image MSPCA denoised Figure 2. MRI image tested with the NLM(B)(Previous Method) = 27.3425, NLM(A)(Previous Method) =27.3532and MSPCB(Proposed Method) = 28.1437, MSPCA(Proposed Method) =28.2937on the basis of PSNR for noise variance(σ = ) The denoising methods based on these edge preserving filters are referred as NLMMSPCA (B) (B for bilateral) and NLMMSPCA (A) (A for anisotropic), respectively. Table. I provide comparative results among NLM (B) and NLM (A) methods. From the table it is observed that NLMMSPCA (both for Bilateral and Anisotropic filter) methods provide results much better than the previous method of NLM. In Figure 1 and 2 shows the images of Barbara and MRI which was degraded by noise having value of σ=, and it is observed that the proposed method of NLM is better than the previous method and it can be seen visually. The above result shown on the Table I. is compared on the basis of the PSNR value of the previous and the propose method. The PSNR is calculated as follows, PSNR = log ( L2 MSE ) Where L is the dynamic range of image, for eg: for 8 bit image value of L is 255 and MSE is the mean square error and it is calculated as, Where I and J are images of size M*N. MSE = 1 MN M N i=1 j=1 (I i, j J i, j ) 2 40 35 30 25 5 0 NLM(B) NLM(A) MSPCA(B) 40 35 30 25 5 NLM(B) NLM(A) MSPCA(B) MSPCA(A) 0 MSPCA(A) Figure 4(a) Figure 4(b) The above figure represents the graphical analysis of the figure 1 and figure 2 respectively. The horizontal axis of the graph represents the Noise Level and the vertical axis of the graph represents the PSNR value. 277
CONCLUSION In this paper, the novel strategies to speed-up nonlocal means filter by building global dictionaries for image edges is proposed. The proposed searching method or a given reference patch in the edge patch based dictionaries allows us an efficient and more precise preselection of similar patches which are grouped together by means of the same distance measure as used by the nonlocal means filter itself. Improvement in denoising is further observed by combining the NLM with the MultiScale PCA, as it helps to find out the principal component of the similar patches on different scale and denoise them by using NLM and extract out the best result. We observe that the proposed methods provide results much faster than even these pre-filtering based methods. In addition, these achieve a better accuracy. Future work could be to extend the technique by selecting by different patch forms. Another addition might be to extend it for more general kinds of noise. REFERENCES [1] P. Perona and J. Malik, Scale-space and edge detection using anisotropic diffusion, IEEE Trans. Pattern Anal. Mach. Intell., vol. 12, no. 7,pp. 629 639, Jul. 1990. [2] Y. L. You, W. Xu, A. Tannenbaum, and M. Kaveh, Behavioral analysis of anisotropic diffusion in image Processing, IEEE Trans. Image Process., vol. 5, no. 11, pp. 39 53,Nov. 1996. [3] D. Strong and T. Chan, Edge-preserving andscale dependent properties of total variation regularization, Inverse Problems, vol. 19, no. 6, pp. 165 187, 03. [4] L. I. Rudin, S. Osher, and E. Fatemi, Nonlineartotal variation based noise removalalgorithms, Phys. D, Nonlinear Phenomena, vol. 60, pp. 259 268, Nov. 1992. [5] S. G. Chang, B. Yu, and M. Vetterli, Adaptive waveletthresholding for image Denoising and compression, IEEE Trans. Image Process., vol.9, no. 9, pp. 32 46, Sep. 00. [6] D. L. Donoho and J. M. Johnstone, Ideal spatial adaptation by wavelet shrinkage, Biometrika,vol. 81, no. 3, pp. 425 455, 1994. [7] F. Luisier, T. Blu, and M. Unser, A new SUR Eapproach to image denoising: Interscaleorthonormal wavelet thresholding, IEEE Trans.Image Process., vol. 16, no. 3, pp. 593 606,Mar.07. [8] M. Malfait and D. Roose, Wavelet-based imagedenoising using a Markov random field apriorimodel, IEEE Trans. Image Process., vol. 6, no. 4, pp. 549 565, Apr. 1997. [9] C. Tomasi and R. Manduchi, Bilateral filteringfor gray and color images, in Proc. 6th Int.Conf. Comput. Vis., Washington, DC, USA, Jan.1998, pp. 839 846. [] M. Elad, On the origin of the bilateral filter andways to improve it, IEEE Trans. Image Process., vol. 11, no., pp. 1141 11, Oct.02. [11] M. Zhang and B. K. Gunturk, Multiresolution bilateral filtering for image denoising, IEEETrans. Image Process., vol. 17, no. 12,pp. 2324 2333, Dec. 08 [12] A. Buades, B. Coll, and J. M. Morel, A non-local algorithm for image denoising, in Proc. IEEE CVPR, Jun. 05, pp. 60 65. 278