Faster Image Denoising with Small Graph Diameter

2 downloads 0 Views 303KB Size Report
[32], and which can be defined equivalently as. 2. 3. 2. 3 . 2! 3! tL t t t e. I tL. L. L. K. −. = = −. +. −. +". (9) .... [23] L.Grady and M.P.Jolly. Weights and Topology: A ...
Journal of Computational Information Systems 7:4 (2011) 1132-1139 Available at http://www.Jofcis.com

Faster Image Denoising with Small Graph Diameter Guojin LIU†, Xiaoping ZENG, Qian ZHANG College of Communication Engineering, Chongqing University, Chongqing 400044, China

Abstract Conventional 4-connected and 8-connected graph-theoretic image processing algorithms have large graph diameter, the speed of the algorithm will be slow because of large graph diameter. To address the issue, a new graph structures with smaller graph diameter have been presented. With the new graph topology, large speedup is achieved with the same performance in terms of root mean square error (RMSE). Experimental results have shown that the proposed scheme has a better performance. Keywords: Graph Laplacian; Anisotropic Diffusion; Image Denoising; Graph Diameter

1. Introduction Since the pioneering work of Witkin and Koenderink in the early 80's[1,2,3,4,5], the framework of linear PDE’s has particularly raised a strong interest for image processing. One of the problems associated with this approach is that important structural features such as boundaries are smoothed and blurred along the flow, as the processed image evolves in time. Perona and Malik (P-M) [6] addressed this issue by using the general divergence diffusion form to construct a nonlinear adaptive denoising process. Catte et al.[7] have shown the ill-posedness of the P-M diffusion coefficients, and proposed a regularized version wherein the coefficient is a function of a smoothed gradient. Weickert et al. [8] investigated the stability of the P-M equation by spatial discretization, and proposed a generalized regularization formula in the continuous domain. More recently, many different methods[9,10,11,12,13,14,15,16,17] have been proposed to solve different forms of noise. In 2008, Fan Zhang use heat kernel diffusion on a graph to smooth the image[18], where an 8-connected graph is constructed. Based on the constructed graph, the weight function between two vertices and graph Laplacian matrix are generated. However, the most widely used graph structure in image processing is 4 or 8- connected graph, where each node is connected to its four immediate neighbors in the horizontal and vertical direction or its eight immediate neighbors in the horizontal, vertical and oblique direction. Although this model is simple, it suffers from a number of drawbacks. First, the graph diameter is large, for an image with size N*N, the graph diameter will be N in 8-connected graph and 2N in 4-connected graph. If N is too large, the speed of the algorithm will be slow (the reason will be explained in the second part of the paper). Second, it is sensitive to noise. †

Corresponding author. Email addresses: [email protected] (Guojin LIU).

1553-9105/ Copyright © 2011 Binary Information Press April, 2011

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

1133

In this paper, we present a new graph structure with small graph diameter. The graph structure are generated by using some long range connection between some vertices in the horizontal, vertical and oblique direction. This can decrease the graph diameter and thus increase the speed of algorithm. The paper is organized as follows. In section 2, we present graph diffusion method for image smoothing and theoretically analyze the properties of the proposed algorithm by computing the graph diameter between our method and alternative algorithms. Section 3 provides implementation details, experimentally illustrates the effectiveness of the method. Finally, we conclude the paper and give some future work in Section 4. 2. Construction Graph with Small Diameter 2.1. Graph Generation with Small Diameter Graph-based image processing algorithms [19, 20, 21, 22, 23, 24, 25] typically take the pixels as the node set and connect the nodes locally with a four or eight connected edge set. As literature [22] shows that in most cases, 4-connected and 8-connected graphs have been employed, without much discussion of why one choice was made over another. Different from traditional graph-based image processing algorithms, we use a sparse long-range connection between vertices in the horizontal, vertical and oblique directions to construct the graph and give the theoretical analysis. Consider a set of nodes V (which correspond to the image pixels) arranged on an image, where there is a spatial Euclidean distance defined between each pair of nodes. By choosing edges, we can construct a graph that has a fixed topology. Generally, each node is connected to other nodes at Euclidean distance 2k away from it in horizontal and vertical directions for integer values k such that 0 ≤ k ≤ 3 . The reason why

we choose k ≤ 3 is the fact. In a two-dimensional image, pixels with long Euclidean distance have less similarity than pixels with short distance. Using both horizontal and vertical directions pixels to construct a graph will have fewer orientations, which can not capture the directional information in the original image grid. To address this issue, we use the oblique (top left, lower right, upper right, lower left-hand) pixels to construct the edges and capture the directional information. Adding edges which connect each nodes and nodes at Euclidean distance 2 2 away from it may effectively capture the directional information in the original image. The graph structure is shown in Fig.1. k

Fig.1 Graph Structure Demo of One Node. The Node is connected to its neighborhood node with from it.

2k or

2

k

2 (k=0,1,2,4) away

1134

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

2.2. Theoretically Analyzing the Properties of the Proposed Algorithm

The inclusions of the graph offer the following advantages over conventional 4-connected or 8-connected graph. 1) Smaller graph diameter. Traditional solution methods to partial differential equations often culminate in the solution of a large, sparse, symmetric system of linear equations where the sparsity pattern of the matrix corresponds directly to the topology of the sampling grid [26]. Literature [27] have shown that conjugate gradients is generally the algorithm of choice for solving a large, sparse, system of linear equations. When applied to a matrix generated as a result of graph topology, it has been shown [28,29,30,31] that the rate of convergence for the conjugate gradients method is a function of the graph diameter. The diameter of a graph d (G ) is defined formally as d (G ) = max {d G (i , j )} ,

(1)

x , y ∈V

Where

d G (i , j )

denotes the number of nodes traversed in the shortest path between two nodes

(i , j )

. The

graph requires fewer hops to reach one node from another, as is illustrated in Fig.1. Suppose we inject a unit amount of heat at an arbitrary node of a graph, and allow the heat to diffuse through the edges of the graph to other nodes. The rate of diffusion is determined by the hops and weight functions. Smaller hops mean faster diffusion process. In the example with image size 256*256, the graph diameter in Fig.1 is 34. While for an 8-connected graph, it is 255. Smaller graph diameter means faster iterations speed. The following paragraphs explain the process of calculating the graph diameter in Fig.1. Assume the minimal hop number from one node to a directly adjacent node in the graph is 1, whether the direction is horizontal, vertical, or oblique. In an 8-connected graph, each node inside the graph (not at the boundary) only connects with its 8 neighboring nodes. Here we denote two nodes i and j as (xi,yi) and (xj,yj). From node i, we could jump ︳xi-xj ︴times

along the horizontal direction to arrive node (xj,yi),

then jump ︳yi-yj ︴times along the vertical direction to arrive node j. The hop number is ︳xi-xj ︴+ ︳yi-yj ︴ . But it may not be the shortest path between two nodes because we could jump obliquely

(horizontally and vertically simultaneously). So it’s easy to get that the minimal hop number between nodes i and j is

(

)

hops ( i, j )8 − connected = min xi − x j , yi − y j .

(2)

The diameter of 8-connected graph is d (G8− connected ) = max hops ( i, j )8− connected . i , j∈V

In the proposed graph shown in Fig.1, xi − x j

and yi − y j can be denoted as

xi − x j = 8ax + 4bx + 2cx + d x , yi − y j = 8a y + 4by + 2c y + d y ,

Where a x , a y ∈ Z and

bx , by , c x , c y , d x , d y ∈ {−1, 0,1} .

(3)

The minimal hop number between nodes i and j is

(4) (5)

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

hops(i, j )our method = max ( ax , a y ) + max ( bx , by ) + max ( cx , c y ) + max ( d x , d y ) .

1135 (6)

So the diameter of the graph shown in Fig.1 is d ( Gour methd ) = max hops ( i, j )our methd .

(7)

i , j∈V

For an 8-connected graph by which a 256*256 image is represented, the diameter is 255 . For a graph shown in Fig 1, the diameter is 34. As noted above, compared to 8-connected graph, the proposed graph has smaller graph diameter, it implies that our method has low computational cost. 2) Increased resistance to noise. The proposed method addresses the local bias problem by using more connection on nodes. In 4 or 8-connected graph, these are piecewise structures where each node is connected to its local neighbors. This structure can not capture important higher order statistics of natural scenes. In image denoising, second order spatial terms are important for representing intensity change. In 2 ( k = 1, 2, 3) k

our method, we use additional vertices at Euclidean distance

away from it to connect the

current vertex, which will capture the second-order spatial information in the noisy image. After the construction of graph topology, we use the heat diffusion equation[18] to filter the noisy image. ∂ K t = − LK t , t > 0, ∂t

(8)

Where, L=T-W , T(i,j)=∑w(i,j), W is symmetric weighting matrix and

W (i , i ) = 0 , K t

is a time dependent

square matrix of same dimension as L, and I is the identity matrix. The heat equation Eq.(8) has a unique solution which is the matrix exponential K = exp ( −tL ) [32], and which can be defined equivalently as t

K

t

=e

− tL

= I − tL +

t

2

L − 2

2!

t

3

L + ". 3

(9)

3!

When t tends to zero, Kt=I-tL. In order to use the diffusion equation to smooth noisy image, following the idea of [18,19,33], we transform the noisy image into a column vector I0, we will use the following equation to smooth the noisy image. ⎧ ∂U = − LU ⎪ . ⎨ ∂t ⎪U = I 0 ⎩ t

t

(10)

0

If we discretize the time (or scale) t of Eq.(10), we obtain the following discrete version of the diffusion process U k +1 = ( I − tL)U k ,

(11)

Where t>0 is the time step size. 3. Practical Details of Implementation and Experiments

In this section, to evaluate the proposed method, we compare our method with Zhang’s method. The parameters that our method used are: 1) the size of the neighborhoods window, 2) The graph structure, 3) weighting functions. We choose wij = exp(−( g (vi ) − g (v j )) 2 / k )

(12)

1136

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

as the weighting function, The width of the Gaussian k is 0.09 for all experiments. Time step is 0.01. Fig.2 displays outputs of the first experiment from our model and Zhang’s method for different gray images at different noise level, illustrating the comparable quality of our method and Zhang’s method. The two methods have the similar minimal RMSE values 5.2 (Seen in Fig.2b). In Fig.2a, the RMSE values of our method and Zhang’s algorithm begin to increase after the minimal RMSE values. The reason why RMSE value begin to increase after the minimal RMSE values is that as the iteration increase, the noisy image will be smoother. However, our method is faster than Zhang’s method. In Fig.2a (256*256 gray Lena image with noise level 0.01), our method needs 20 iterations to get the minimal RMSE, while Zhang’s method needs 300 iterations in 8-connected graph and 120 iterations in radically connected graph with radius 2. The speed of our method is about 15 times faster than 8-connected graph and 6 times faster than radically connected graph with radius 2. This also can be verified by Fig.2b~Fig.2e. Fig.2b~Fig.2e show the denoising results at the minimal RMSE values of different methods. Fig.2e is the result of our method, while Fig.2b and Fig.2c are the results of Zhang’s algorithm with 8-connected graph and radically connected graph with radius 2. From Fig.2b~Fig.2e, we can see that the two methods have similar visual quality in the minimal RMSE values. It can be verified that the speed of our method is faster than Zhang’s method. The reason is that our method has smaller graph diameter than Zhang’s algorithm, as the above analysis in the second section.

Fig.2a The Relationship of RMSE Versus Iterations of Different Methods with Weight Function Eq.(12).

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

(2b)

1137

(2c)

(2d)

(2e)

Fig.2b~2e Filtering Results of a Lena Image at Minimal RMSE. (2b) Noisy Lena with 0.01 Zero Mean Gaussian Noise. (2c–2e) Denoising Results of Zhang’s Method with 8-connected Graph, Zhang’s Method with Radically Connected with Radius 2 and Our Method, Respectively.

4. Conclusion and Perspectives

In this paper we propose a new graph structure, which has smaller graph diameter than conventional 8-connected or radically connected graph with radius 2. It can decrease the algorithm’s iterations, which is important because fast speed means less computational cost. Experimental results have shown that compared to the 8-connected graph and radically connected graph with radius 2, it has the comparable performance (similar minimal RMSE) but higher speed than conventional graph structure. Future work includes that as our graph structure can decrease the algorithm’s speed, it can also use to graph based image segmentation algorithm such as random walk [34] and isoperimetric algorithm [35].

1138

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

Acknowledgement

This work is supported by the National Natural Science Foundation of China (60971016), the Natural Science Foundation of Changing (CSTC, 2009BB2358), Chongqing University Postgraduates Innovative Team Project (200909C1015) and the Fundamental Research Funds for the Central Universities (CDJZR10160005) References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24]

J.Weickert. Anisotropic Diffusion in Image Processing. Teubner-Verlag, Stuttgart, Germany, 1998. G. Sapiro. Geometric Partial Differential Equations and Image Analysis. Cambridge University Press, Cambridge, 2001. A. Witkin. Scale-space filtering. Proceedings of the International Joint Conference on Artificial Intelligence, pp. 1019-1021,1983. J. Koenderink. The structure of images. Biol. Cybern, 50:363-370,1984. J. Babaud, A. Witkin, M. Baudin, R. Duda. Uniqueness of the Gaussian kernel for scale-space filtering. IEEE Trans. Pattern Anal. Mach. Intell, 8(1):26-33,1986. P. Perona, J. Malik. Scale-space and edge detection using anisotropic diffusion. IEEE Trans. Pattern Anal. Mach. Intell, 12(7):629-639,1990. F. Catté, P. Lions, J. Morel, T. Coll. Image selective smoothing and edge detection by nonlinear diffusion. SIAM J. Numer. Anal. 29: 182-193,1992. J. Weickert. Coherence-enhancing diffusion filtering. Int. J. Comput. Vision 31:111-127,1999. M. Black, G. Sapiro, D. Marimont, D. Heeger. Robust anisotropic diffusion. IEEE Trans. Image Process. 7(3): 421-432,1998. Y. Bao, H. Krim. Smart nonlinear diffusion: a probabilistic approach. IEEE Trans.Pattern Anal. Mach. Intell. 26 (1):63-72,2004. G. Gilboa, N. Sochen, Y. Zeevi. Image enhancement and denoising by complex diffusion processes. IEEE Trans. Pattern Anal. Mach. Intell. 26(8):1020-1036,2004. D. Tschumperle, R. Deriche. Vector-valued image regularization with PDEs: a common framework for different applications. IEEE Trans. Pattern Anal. Mach. Intell. 27(4):506-517,2005. K. Krissian, C.F.Westin, R. Kikinis and K.Vosburgh. Oriented Speckle Reducing Anisotropic Diffusion. IEEE Trans.Image Process, 16(5):1412-1424.2007. S.Aja-Fern´andez, C.Alberola-L´opez. On the estimation of the coefficient of variation for anisotropic diffusion speckle filtering. IEEE Trans. Image Process, 15(9):2694–2701,2006. Y.Yu, S.Acton. Speckle reduction anisotropic diffusion. IEEE Trans. Image Process, 11(11):1260-1270,2002. J.Yu ,Y.Y. Wang, Y.Z. Shen. Noise reduction and edge detection via kernel anisotropic diffusion. Pattern Recognition Letters, 29(10):1496-1503,2008. S.Gai, P.Liu, J.Liu, X.Tang. A new image denoising algorithm via bivariate shrinkage based on quaternion wavelet transform. Journal of Computational Information Systems, 6 (11) : 3751- 3760,2010. F.Zhang,E.R.Hancock. Graph spectral image smoothing using the heat kernel. Pattern Recognition, 41(11): 3328-3342,2008. A. Szlam, M. Maggioni, and R. R. Coifman. Regularization on graphs with function adapted diffusion process. Journal of Machine Learning Research, 9:1711-1739,2008. Y.Boykov, M..P.Jolly. Interactive graph cuts for optimal boundary & region segmentation of objects in N-D images. Proc. of ICCV 2001, pp. 105–112 (2001) L.Grady. Random walks for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell, 28(11): 1768-1783, 2006. J.K.Udupa, S. Samarasekera. Fuzzy connectedness and object definition: Theory, algorithms,and applications in image segmentation. GMIP 58(3), 246–261 (1996) L.Grady and M.P.Jolly. Weights and Topology: A Study of the Effects of Graph Construction on 3D Image Segmentation, Proc. of MICCAI 2008, vol. 1, 2008, pp. 153-161, Sept., New York City, New York J.B. Shi and J.Malik. Normalized cuts and image segmentation, IEEE Trans. Pattern Anal. Mach. Intell, 22(8),

G. Liu et al. /Journal of Computational Information Systems 7:4 (2011) 1132-1139

1139

pp:888-905, August 2000. [25] S. Sarkar and P.Soundararajan. Supervised learning of large perceptual organization: Graph spectral partitioning and learning automata. IEEE Trans. Pattern Anal. Mach. Intell, 22(5), pp:504-525, May 2000. [26] Y.Boykov, O.Veksler, and R.Zabih. Fast approximate energy minimization via graph cuts. IEEE Trans. Pattern Anal. Mach. Intell, 23(11):1222-1239, 2001. [27] W. Hackbusch. Iterative Solution of Large Sparse Systems of Equations, Springer-Verlag, 1994. [28] G.Golub and C.V. Loan. Matrix Computations, The John Hopkins University Press, 3rd edition, 1996. [29] K.Gremban. Combinatorial preconditioners for sparse, symmetric diagonally dominant linear systems, Ph.D. thesis, Carnegie Mellon University, Pittsburgh, PA, October 1996. [30] J. J. Dongarra, I. S. Duff, D. C. Sorenson, and H. A. vander Vorst. Solving Linear Systems on Vector and Shared Memory Computers, Society for Industrial and Applied Mathematics, Philadelphia, 1991. [31] L.Grady and E.L. Schwartz. Faster graph-theoretic image processing via small-world and quadtree topologies. Proceedings of CVPR04, pp.360-365, Washington, DC, June-July 2004 [32] R. Kondor, J. Lafferty. Diffusion kernels on graphs and other discrete structures. Proceedings of the 19th International Conference on Machine Learning, pp. 315-322,2002. [33] F.R.K. Chung. Spectral Graph Theory, American Mathematical Society, Providence, RI, 1997. [34] L.Grady, E.L. Schwartz. Isoperimetric Graph Partitioning for Image Segmentation. IEEE Trans. Pattern Anal. Mach. Intell, 28(3):469-475, 2006. [35] L.Grady. Random Walks for Image Segmentation. IEEE Trans. Pattern Anal. Mach. Intell, 28(11):1768-1783, 2006.