A Combination Algorithm for Image Denoising and Deblurring Yiping Xu
Hanlin Chen
School of Science, Southwest School of Science,Southwest University of Science and Technology, University of Science and Technology, Mianyang, Sichuan, China. Mianyang, Sichuan, China. Email:
[email protected] Email:
[email protected]
Abstract—In this paper, we propose an efficient combination algorithm of split Bregman method, algebraic multigrid method and Krylov acceleration method for image denoising and deblurring. The split Bregman method is used to convert nonlinear TV model into linear systems. The linear systems with the blur operator are difficult for solving. We apply an algebraic multigrid (AMG) method and Krylov acceleration method to solve the linear systems in the inner iteration. For the linear systems, we have added an auxiliary linear term that significantly stabilizes and accelerates the outer iteration. The inclusion of the linear stabilizing term plays a crucial role in our algorithm. We have also conducted numerical experiments. The results show that our algorithm is efficient and robust. The results of numerical experiments are given and compared with ones of [6], [11].
I. I NTRODUCTION Image restoration is a fundamental subject with many applications in both image processing and computer vision. The purpose of image restoration is to recover original image u from the observed data z (noisy and blurred image) from the relation z = Ku + n, (1) where K is a linear blur operator and n is a Gaussian white noise. Typically, the blur operator K and partial information on the noise n are known. A well-known model for noise removal and image deblurring is the total variation based restoration method proposed by Rudin, Osher, and Fatemi [9]. The image restoration can then be formulated as the following minimization problem: 1 2 2 |∇u| + β dxdy + Ku − z2 . (2) min α u 2 Ω Here .2 denotes the 2-norm, α > 0 is the penalty parameter, β > 0 is the diffusion regularization parameter and is typically small. The functional in (2) is strictly convex with a unique global minimizer. The corresponding Euler-Lagrange equation for (2) is given by −α∇ · (
∇u ) + K ∗ (Ku − z) = 0, |∇u|2 + β
where K ∗ is the adjoint operator of K.
in Ω, (3)
Kelong Zheng and School of Science, Southwest University of Science and Technology, Mianyang, Sichuan, China. Email:
[email protected]
Several numerical methods have been proposed to solve for the Euler-Lagrange equation (3). The majority of the numerical examples in the literature are focused on two types of applications. The first one is the pure denoising problems where K = I. Earlier works include the time-marching scheme proposed in [9] and fixed point iteration [10]. Later on, Chang and Chern [1] proposed the combination method of the algebraic multigrid method, Krylov subspace acceleration and extrapolation of initial data. Recently, several fast algorithms are proposed. Goldstein and Osher [5] proposed a split Bregman method, which is very efficient. Chambolle [4] proposed a fast algorithm for minimizing the total variation. It is based on a dual formulation. Another important application is to recover noisy, blurred images from generic blur operator K. For example, Na, Chan, and Tang [7] proposed a fast algorithm based on the discrete cosine transform to recover blurred images with 50dB Gaussian white noise. In [2], Chang, Wang, and Xu developed a stabilizing technique adapted to the blur operator K such that the nonlinear equation with a blurring operator can be solved efficiently. For the image restoration, solving the nonlinear partial differential equation with a blurring operator is difficult. The basic idea of these methods is to split deblurring and denoising. The procedure of image reconstruction is completed in two steps. In this paper, we propose an efficient numerical algorithm of denoising and deblurring based on combination of the split Bregman method, the algebraic multigrid method [3] and the Krylov acceleration method. A stabilizing technique is applied to the blur operator K such that the linear system of equations with a blurring operator can be solved efficiently. This is done by adding a linear term on both sides of the equation. This linear stabilizing term is expressed explicitly in terms of the mask of K. The inclusion of the linear stabilizing term plays a crucial role in our algorithm. We have also conducted numerical experiments. The results show that our algorithm is efficient and robust. The results of numerical experiments are given and compared with ones of [6], [11]. The rest of the paper is organized as follows. In section II, we present main algorithm. In section III, we briefly describe the AMG method and Krylov acceleration method used to solve the linear systems and pure deblurring problem. In
978-1-4244-3709-2/10/$25.00 ©2010 IEEE
sections IV, we give discussion of algorithm, numerical results and comparisons. We end this paper with a brief summary at section V. mds May 16, 2010
which can be abbreviated as
II. T HE M AIN A LGORITHM A. The Split Bregman Method In [5], the split Bregman method was applied to the ROF model for image denoising problem. It is easy to extend the split Bregman method to denoising and deblurring problems. Firstly, ROF model is discretized as μ |∇u|dxdy + Ku − z22 2 Ω μ ≈ (∇x u)2i,j + (∇y u)2i,j + Ku − z22 , 2 i,j
For the denoising, the systems (8) is solved by only one Gauss-Seidel iteration in [5]. But, solving the system (8) for the denoising and deblurring is difficult, because the eigenvalues distribution of the blur operator is different with ones of Laplace operator. In [2], Chang, Wang, and Xu proposed an approach of stabilizing and accelerating iteration for outer iteration of a nonlinear system. Now, we apply the technique of stabilizing and accelerating iteration for the system (8). To motivate our approach, we notice that an efficient algorithm for (8) should avoid inverting the matrix K ∗ K since it is much denser than the five-points scheme. A natural approach would then be
u
−u
u
−u
where (∇x u)i,j ≡ i+1,jh i,j , (∇y u)i,j ≡ i,j+1h i,j and h denotes step size of space. Let dx ≈ ∇x u and dy ≈ ∇y u , The split Bregman formulation of the isotropic problem then becomes: μ 2 min (dx , dy )2 + Ku − z2 (4) u,dx ,dy 2 λ λ 2 2 + dx − ∇x u − bx 2 + dy − ∇y u − by 2 , 2 2 where 1 2 dx,i,j + d2y,i,j , (dx , dy )2 = 2 N i,j and N is number of points in one direction of the image. Converting (4) into three subproblems: 2 μ λ 2 Ku − z2 + dkx − ∇x u − bkx 2 u 2 2 2 λ k k + dy − ∇y u − by 2 . 2
uk+1 = min
(5)
λ dkx − ∇x uk+1 − bkx 2 2 dx ,dy 2 (6) λ 2 + dky − ∇y uk+1 − bky 2 . 2 ⎧ k+1 k+1 k+1 k ⎨ bx,i,j = bx,i,j + (∇x ui,j − dx,i,j ), i, j = 1, 2, · · · , N. ⎩ k+1 k+1 by,i,j = bky,i,j + (∇y uk+1 − d ), i,j y,i,j (7) The formula (5) is l1 -norm, it can be solved using the variation approach. Formula (6) can be explicitly computed the optimal value of d using shrinkage operators [12]. The formula (7) can be computed directly. The corresponding difference scheme of (5) is λ k+1 k+1 μ(K ∗ Kuk+1 )ij + 2 (4uk+1 − uk+1 ij i+1,j − ui−1,j − ui,j+1 − h λ k ∗ k k k uk+1 i,j−1 ) = μ(K z)ij + [(dx − bx )i−1,j − (dx − bx )i,j h + (dky − bky )i,j−1 − (dky − bky )i,j ], (dk+1 , dk+1 ) = min (dx , dy )2 + x y
= Fi,j , μ(K ∗ Kuk+1 )ij + λuk+1 ij
i, j = 1, 2, · · · , N, (8)
B. Method of Solving the (8)
λu(s+1) = −μK ∗ Ku(s) + Fi,j ,
(9)
where the superscript (k + 1) of the outer iteration is omitted. It turns out that the iteration (9) is not robust and may diverge even for weak blur operator corresponding to the mask 1 T 64 (1, 1, 4, 1, 1) (1, 1, 4, 1, 1) with λ = 10. To overcome this instability, we propose to add a linear term Su on both sides of (9) (λ + S)u(s+1) = −(μK ∗ K − S)u(s) + Fi,j ,
(10)
where S is a symmetric matrix. In this paper, we take (11) S = μ · diag(K ∗ K) + γμI, ⎛ ⎞ 1 γ ≥ γ ∗ = max ⎝ (K ∗ K)i,j − (K ∗ K)i,i ⎠. 2 i j=i
The parameter γ is chosen according to the strength of the blur operator K. The larger value of the parameter γ is taken for stronger blur operator K. III. AMG A LGORITHM AND K RYLOV ACCELERATION T ECHNIQUE A. AMG Algorithm The linear system (10) results in an N 2 × N 2 system AU = F.
(12)
Here the matrix A corresponds to the operator λ+S in (10). In general, A varies wildly near areas of high contrast of the image and need not be diagonally dominant. Nevertheless, A is symmetric and positive definite. We adopt a special version of AMG developed in ([1], [3]) as the linear solver and stabilize the inner iteration. We have conducted numerical tests and found that the combination results in an efficient and robust scheme.
B. The Krylov Acceleration Technique
B. Discussion on Algorithm
To accelerate and stabilize the inner iteration, we have incorporated the Krylov subspace method [1] in our implementation. The approximate solution is optimized every p steps on a subspace of dimension M ≤ p. To be more precise, we take two fixed integers 0 < M ≤ p and for any integer n > 0, let
In all our simulations, it is enough to apply four single V cycle in the AMG step with the Gauss-Seidel iteration as the smoother. The rate of convergence of the outer iteration can be significantly improved by the Krylov subspace technique. In our experiments, we apply the Krylov acceleration procedure every 3 steps with the Krylov dimension M = 2. The sufficient condition (11) for our stability matrix S has been gotten. The outer iteration should converge for γ ≥ γ ∗ , but not necessarily. The combination of γ ≈ γ ∗ and M = 2 gives the optimal result among possible choices of γ and M in general. The number of iteration is insensitive to the variation of γ near γ ∗ , and gradually grows as γ increases. For simplicity of presentation, we take γ = 0.6 and M = 2 in all other numerical examples.
M
u ˜(c1 , · · · , cM ) = u(pn) +
cm (u(pn+1−m) − u(pn−m) ).
m=1
(13)
The residual of u ˜(c1 , · · · , cM ) can be approximated by def
r˜(c1 , · · · , cM ) = r(pn) +
M
cm (r(pn+1−m) − r(pn−m) ).
m=1
(14) One then minimizes ˜ r(c1 , · · · , cM )L2 with respect to (c1 , · · · , cM ) to get min ˜ r(c1 , · · · , cM )L2 =
c1 ,··· ,cM
˜ r(c∗1 , · · ·
, c∗M )L2 ,
(15)
˜(c∗1 , · · · , c∗M ) before going to (pn + 1)th and reset u(pn) to u outer iteration. In our algorithm, the AMG method and the Krylov acceleration method is applied to solve the system ( 10). For every outer iteration, four V-cycles of the AMG and one Krylov acceleration method with two dimensions are done. IV. N UMERICAL E XPERIMENTS AND D ISCUSSION A. Models and Blurring Operators In order to compare computational results, the numerical examples given in this paper are based on the two images shown in Fig. 1. The first one (left) is a Cameraman 256*256 (image 1), the second (right) is Car No 301*301 (image 2) used in the literature [6]. For the two images, each pixel is assigned an integer value in [0, 255].
In this paper, we compare our combination algorithm (called by ” CA ”) with two methods of restoration proposed in 2008. I. The iterative algorithms 1, 2 and 3 based on decoupling of denoising and deblurring ( see [11] ). II. The fast TV minimization method ( see[6] ). D. Numerical Results In this subsection, we discuss the efficiency of proposed CA algorithm. In our algorithm, main CPU time is taken by the AMG method for solving the linear system of equations (10). The operator numbers of our CA algorithm is order O(N 2 ) for N × N image, i.e., the operator numbers of the CA algorithm is linearly proportional to number of pixels in the image. In the algorithms 1, 2 and 3, the operator numbers of their algorithms are order O(N 2 log(N 2 )) for N × N image. From the figures and tables given below, it is clear that our algorithm is efficient, fast and takes less CPU time. To compare results with two different papers, the following quantities are defined: SN R = 10 ∗ LOG10 (
||z0 ||2 ), ||z0 − u||2
P SN R = 20 ∗ LOG10 (
50
50
C. The Relative Methods for Comparison
||z0 ||2 ), ||z0 − u||2
100 100
BSN R = 20 ∗ LOG10 (
150 150 200 200
ReErr =
250
250
300 50
Fig. 1. (right).
100
150
200
250
50
100
150
200
250
||z||2 ), ||n||2
||z0 − u||2 , ||z0 ||2
300
Original images: Cameraman 256*256 (left) and Car No. 301*301
We experiment on restoring the two model images noised by Gaussian white noisy with means 0 and variance σ and blurred by the following two different blur operators: , −7 ≤ i, j ≤ 7 , Blur I : square Gaussian blur 1+i2c+j 2 where c is chosen such that i,j ki,j = 1, Blur II : motion blur with length 4 and angle 45o .
where z0 , z, z¯0 and u are the original image, the blurred and noisy image, mean of the original image and the restored image, respectively. In all our examples, we start the iteration with the observed image u(0) = z. and choose S according to (11) with γ = 0.6. The outer iteration is stopped , when u(k) − u(k−1) 2 ≤ε u(k) 2 is reached. The ε = 10−4 is taken.
The all numerical experiments are implemented in Fortran 6.5, and hardware environment uses on ” Lenovo ” Computer with an Intel Core 2 Duo CPU at 2.33 GHZ and 1.96 GB of memory. The results of numerical experiments are given in following examples. Example 1: (Cameraman Image ( Image 1 ) degraded by the blur I and a noise with σ = 2.83 ) This example is for comparison with the iterative Algorithm 1, 2 and 3, and their results of the example 3 in table 2 of [11]. The computational results are displayed in table I, and the degraded image and restored image by CA method is in Fig. 2. TABLE I T HE COMPARISON OF C AMERAMAN IMAGE WITH BLUR I AND σ = 2.83 method CA method Agorithm 1 Agorithm 2 Agorithm 3
parameter (μ, λ)=(6.0, 0.1) ( garrote thre. α1 =1.40 ) ( soft thre. α1 =0.4 ) ( hard thre. α1 =1.40 )
SNR 5.92 5.69 5.56 5.64
50
50
100
100
150
150
200
200
250
250
300
300 50
100
150
200
250
300
50
100
150
200
250
300
Fig. 3. Noisy and blurred images(left) with blur II and BSNR=40, and restored images (right) by CA method for Car No Image.
computational time and gives the smaller errors for examples from the tables I - II. In addition, the algorithm (10) still converges for pure deblurring problems even with strong blur operators. One only needs to take a large μ and a small λ enough to preserve the detail information of the image. ACKNOWLEDGMENT
50
50
100
100
150
150
200
200
250
In this work, we are supported by NSFC (10971169) of China and Youth Foundation (10zx3103) of SWUST. R EFERENCES
250 50
100
150
200
250
50
100
150
200
250
Fig. 2. Noisy and blurred images(left) with blur I and σ = 2.83, and restored images (right) by CA method for Cameraman image.
Example 2: (Image of Car No ( Image 2 ) degraded by the blur II ( motion blur with length 4 and angle 450 ) and a noise with BSNR=40 ) This example is for comparison with the fast TV minimization method ( Algorithm II ) and their results in table 1 of [6]. The computational results are given in table II. In Fig. 3, we show the degraded image and restored image by CA method. TABLE II N UMBER OF ITERATION NEEDED FOR I MAGE OF C AR N O WITH BLUR II AND BSNR=40 method CA method Agorithm II
parameter (μ, λ)=(6.0, 0.1) ( α2 = 2.2 )
N 14 40
PSNR 27.74 27.54
ReErr 0.0410 0.0420
cpu time 4.20 6.41
V. C ONCLUSION In this paper, we propose a new algorithm for the image denoising and deblurring. Through analysis, we derived an explicit formula for a linear stabilizing term. Together with Krylov subspace extrapolation and a special version of algebraic multigrid method, the combined numerical scheme is efficient and robust. From the numerical results, we know that our combination algorithm is competitive with those existing new algorithms which were proposed in 2008. Our CA algorithm takes less
[1] Q. C HANG AND I. C HERN, Acceleration methods for total variationbased image denoising, SIAM J. Sci. Comput. 25 (2003) pp. 983–994. [2] Q. C HANG , W. WANG , AND J. X U, A method for total variation-based reconstruction of noisy and blurrdimage, In Image Processing Based on Partial Differential Equations, (Eds. by X. Tai, K. Lie, T. F. Chan and S. Osher ) Springer (2006) pp. 92-108. [3] Q. C HANG , YAUSHU W ONG , AND H. F U, On the algebraic multigrid method, J. Comput. Phys., 125(1996), pp. 279–292. [4] A. C HAMBOLLE, An algorithm for total variation minimization and applications , J. of Math. Imaging Vision, 20(2004), pp 89-97. [5] T OM G OLDSTEIN AND S TANLEY O SHER, The Split Bregman Method for L1 Regularized Problems, SIAM J. Image Sciences, 2 (2009), pp 323-343. [6] Y. H UANG , M. K. N G , AND Y. W EN, A fast total variation minimization method for image restoration, SIAM J. Multiscale model Simul., 7 (2008) pp. 774–795. [7] M. NA , R. C HAN , AND W. TANG, A fast algorithm for deblurring models with Neumann boundary conditions, SIAM J. Sci. Comput., Vol. 22, (1999) pp. 851–866. [8] S. O SHER AND L. RUDIN, Feature-oriented image enhancement using shock filters, SIAM J. Numer. Anal., 27 (1990), pp. 919–940. [9] L. RUDIN , S. O SHER , AND E. FATEMI, Nonlinear total variation based noise removal algorithms, Phys. D, 60(1992), pp. 259–268. [10] C. R. VOGEL AND M. E. O MAN, Iterative methods for total variation denoising, SIAM J. Sci. Comput., 17(1996), pp. 227–238. [11] Y. W EN , M. K. N G , AND W. C HING, Iterative algorithms based on decoupling of deblurring and denoising fo imag restoration, SIAM J. Sci. Comput., 30 (2008) pp. 2655–2647. [12] W. Y IN , S. O SHER , D. G OLDFARB , AND J. DARBON, Bregman iterative algorithms for L1 -minimization with applications to compressed sensing , SIAM J. Image Sciences, l. (2008), pp 143-168.