Applied Numerical Mathematics 58 (2008) 602–614 www.elsevier.com/locate/apnum
Acceleration methods for image restoration problem with different boundary conditions Yuying Shi a,∗ , Qianshun Chang b a Department of Mathematics and Physics, North China Electric Power University, Beijing 102206, China b Institute of Applied Mathematics, Academy of Mathematics and System Sciences, Beijing 100080, China
Available online 3 February 2007
Abstract In this paper, we propose a new (mean) boundary conditions (BCs) for the total variation-based image restoration problem. We present a proof of the convergence of our difference schemes. An algebraic multigrid method and Krylov subspace acceleration are used when we solve the corresponding linear equations. The results from our new BCs are compared with the results from the other BCs introduced by several image researchers by simple and significant 2D numerical experiments. Experimental results demonstrate that our new BCs can get better restored images than the existing BCs. © 2007 IMACS. Published by Elsevier B.V. All rights reserved. Keywords: Image restoration; Algebraic multigrid; Fixed point method; Total variation; Reflecting BCs; Antireflective BCs; Mean BCs
1. Introduction The restoration process is assumed to be linear and shift-invariant g = h ∗ f + r,
(1.1)
here, g is the observed image, h is the blurring kernel. f is the real image, r is the additive noise. Gaussian white noise r is often used, i.e. the values ri,j of r at the pixels (i, j ) are independent random variables, each with a Gaussian distribution of zero mean and variance σ 2 . In practice, the observed image g is of finite length (and width) and we use it to recover a finite section of f. The function f is not completely determined by g in the same domain where g is defined and it is also affected by the values of f close to the boundary of g, because of the process of convolution. Thus we need some assumptions on reference BCs in the process of deconvolution. The natural and classical approach is to use zero (Dirichlet) BCs [1], where we assume that the values of the image f outside the domain of consideration are zero. But if the true image is not close to zero at the boundaries, it means that the Dirichlet BCs are introducing an artificial discontinuity, which in turn implies a Gibbs phenomenon. The blurring matrix which is a Toeplitz matrix in the one-dimensional case and a block–Toeplitz–Toeplitz–block matrix in the two-dimensional case; These matrices are known to incur in large computational costs, especially in the two-dimensional case. * Corresponding author.
E-mail addresses:
[email protected] (Y. Shi),
[email protected] (Q. Chang). 0168-9274/$30.00 © 2007 IMACS. Published by Elsevier B.V. All rights reserved. doi:10.1016/j.apnum.2007.01.007
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
603
Some researchers used periodic BCs [11]. However the image at the right boundary has nothing to do with the image at the left boundary, so this implies that we are introducing an artificial discontinuity, which in turn leads to ringing effects. The resulting blurring matrix is a circulant matrix in the one-dimension case and a block–circulant–circulant– block matrix in the two-dimensional case. These matrices can be diagonalized by discrete Fourier matrices and hence their inverses can be found by using the fast Fourier transforms (FFTs). Thus the total cost is of O(n log n) (n is the number of pixels) complex operations in one-dimensional case and O(n4 ) complex operations in two-dimensional case. In [13], the authors considered reflecting BCs, which means that the data outside the domain of consideration are taken as a reflection of the data inside. The reflection guarantees the C 0 continuity, but generally fails to guarantee the continuity of the normal derivative except in the nongeneric case, where the normal derivative at the boundary is zero. The resulting blurring matrix is a Toeplitz+Hankel matrix in the one-dimensional case and a two-level Toeplitz+twolevel Hankel matrix in the two-dimensional case. These matrices can be diagonalized by the discrete cosine transform matrix provided that the blurring function h is symmetric and their inverses can be obtained by using fast cosine transforms (FCTs). Thus the total cost is of O(n log n) (n is the number of pixels) complex operations in one-dimensional case and O(n2 log n) complex operations in two-dimensional case. In [17], the author described antireflective BCs which ensures a C 1 continuity in one-dimensional case. The resulting blurring matrix is a special class of Toeplitz+Hankel matrix in the one-dimensional case and a special class of two-level Toeplitz+two-level Hankel matrix in two-dimensional case. These matrices can be diagonalized by the discrete sine transform matrix provided that the blurring function h is symmetric and their inverses can be obtained by using fast sine transforms (FSTs). Thus the total cost is of O(n log n) complex operations in one-dimensional case and O(n2 log n) complex operations in two-dimensional case. Here, we propose a choice of BCs (mean BCs) that further reduces the ringing effects and that keep the same C 1 continuity in one-dimensional case but leads to smaller error than the antireflective BCs. Since it can be viewed as an adaptive antireflection. The only drawback, at least when direct methods are used, is that unless reflective, antireflective, and periodic BCs we are not able to identify a fast transform to diagonalize the resulting matrices. The total variation (TV) restoration models are based on a variational problem with constraints using the TV norm as a nonlinear nondifferentiable functional. The formulation of these models was first given by Rudin et al. in [14] for the denoising model. In spite of the fact that the variational problem is convex, the Euler–Lagrange equation is nonlinear and ill-conditioned. Linear semi-implicit fixed point procedures devised by Vogel and Oman [20], and interior-point primal-dual implicit quadratic methods by Chan et al. [4], were introduced to solve the models. In [5], the authors combined a fixed point method, an improved Algebraic multigrid (AMG) method, the Krylov acceleration, and a good initialization to solve the corresponding linear equations. M. Donatelli and S. Serra Capiz zano [9] combined an algebraic multigrid previously defined ad hoc for structured matrices related to space invariant operators and the classical geometric multigrid. Because it is difficult to use FFTs, FCTs or FSTs when using our mean BCs, the nice computational property mentioned above is lost. We combine a fixed point method, an improved Algebraic multigrid (AMG) method, the Krylov acceleration, and a good initialization in the numerical experiments of this paper. The outline of the paper is as follows. In Section 2, different BCs are considered. In Section 3, we introduce the difference schemes and fixed point algorithm. The convergence of difference schemes is proved. In Section 4, we introduce the AMG algorithm and Krylov subspace acceleration method. In Section 5, experimental results are presented. Some concluding remarks are presented in Section 6. 2. Different BCs For simplicity, we only consider the domain R 1 . Considering the original signal f˜ = (. . . , f−m+1 , . . . , f0 , f1 , . . . , fn , fn+1 , . . . , )T , the blurring function given by h = (. . . , 0, 0, h−m , h−m+1 , . . . , h0 , . . . , hm−1 , hm , 0, 0, . . .)T , and the noise r = (r1 , . . . , rn but also by T f (−m + 1), . . . , f (0)
)T . Thus the blurred and noisy image and
(2.1)
g is determined not only by f = (f (1), . . . , f (n))T
T f (n + 1), . . . , f (n + m) .
(2.2)
604
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
BCs is making certain assumptions on the unknown boundary data f (−m + 1), . . . , f (0) and f (n + 1), . . . , f (n + m), in such a way that the number of unknowns equals the number of equations in the system (2.3). ⎛f ⎞ −m+1
⎛ ⎜ ⎜ ⎜ ⎜ g=⎜ ⎜ ⎜ ⎝
hm
... hm
h0 ..
... h0
h−m h−m ..
. ..
..
. ..
.
..
.
hm 0
.
hm
h0 ...
.
h0
h−m ...
h−m
⎜ f−m+2 ⎟ ⎜ ⎟ .. ⎟ ⎞⎜ . ⎜ ⎟ 0 ⎜ ⎟ f ⎜ ⎟ 0 ⎟⎜ ⎟ ⎜ f1 ⎟ ⎟ ⎟⎜ ⎟ ⎟⎜ .. ⎟ + r. ⎟⎜ . ⎟ ⎟⎜ ⎟ ⎜ fn ⎟ ⎟ ⎠⎜ ⎟ ⎜ fn+1 ⎟ ⎜ ⎟ .. ⎜ ⎟ . ⎜ ⎟ ⎝ ⎠ fn+m−1 fn+m
(2.3)
Eq. (2.3) can be written as g = Tl fl + Tf + Tr fr + r,
(2.4)
where ⎛
... .. .
hm
Tl = ⎝ 0 ⎛
h0 ⎜ .. ⎜ . ⎜ T =⎜ ⎜ hm ⎜ ⎝
hm ... .. . .. .
h−m .. . .. .
..
.
..
.
..
..
..
.
0 ⎛
h−m .. ⎝ Tr = . h−1
. hm
. ... 0
. ...
⎞ ⎠,
..
h−m
⎞ f−m+1 ⎜ .. ⎟ . ⎟, fl = ⎜ ⎠ ⎝ f−1 f0 ⎞ 0 ⎛ ⎞ f1 ⎟ ⎜ f2 ⎟ ⎟ ⎜ . ⎟ ⎟ ⎟ ⎟ f =⎜ h−m ⎟ , ⎜ .. ⎟ , ⎟ ⎝ ⎠ .. ⎠ fn−1 . fn h0 ⎛ ⎞ fn+1 ⎜ fn+2 ⎟ ⎜ ⎟ .. ⎟. fr = ⎜ . ⎜ ⎟ ⎝ ⎠ fn+m−1 fn+m ⎛
⎞ h1 .. ⎠ , .
(2.5)
The zero (Dirichlet) BCs [1,13] assumes that the data outside the domain of consideration are zero, i.e., fl = fr = 0. The matrix system in (2.4) becomes Kf + r = g, and the coefficient matrix K is a Toeplitz matrix. For the periodic BCs, we set f (j ) = f (n + j ) for all j in (2.2). The matrix system in (2.4) becomes
Kf + r = (0|Tl ) + T + (Tr |0) f + r = g,
(2.6)
(2.7)
and the coefficient matrix K is a circulant matrix. In [13], the authors considered the reflecting BCs, which means that the data outside the domain of consideration are taken as a reflection of the data inside. More precisely, we set f (1 − j ) = f (j ) and f (n + j ) = f (n + 1 − j ) for all j = 1, . . . , m in (2.2). The system in (2.4) becomes
(2.8) Kf + r = (0|Tl )J + T + (Tr |0)J f + r = g, where Jn×n is reversal matrix. We know that the coefficient matrix K = T (f ) + H (σf, J σf )) is a Toeplitz+Hankel matrix.
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
Let us define the shift operator σ of any matrix as ⎞ ⎛0 b ⎛ ⎞ 11 . . . b1,n−1 b11 . . . b1n ⎜ 0 b21 . . . b2,n−1 ⎟ . .. .. ⎠ Bσ = ⎝ .. σ =⎜ .. .. .. ⎟ . . ⎠, ⎝ .. . . . . bn1 . . . bnn 0 bn1 . . . bn,n−1 ⎞ ⎛ b12 b13 . . . b1n 0 ⎛ ⎞ b11 . . . b1n b22 b23 . . . b2n 0 ⎟ . .. .. ⎠ ⎜ σ B = σ ⎝ .. , =⎜ .. .. .. .. ⎟ . . ⎝ ... . . . .⎠ bn1 . . . bnn bn2 bn3 . . . bnn 0
605
(2.9)
(2.10)
and the shift operator σ of any vector as σf = σ (f1 , f2 , . . . , fn )T = (f2 , f3 , . . . , fn , 0)T .
(2.11)
In [17,8], the authors described the antireflective BCs which ensures a C 1 continuity. We set f (1 − j ) = 2f (1) − f (j + 1) and f (n + j ) = 2f (n) − f (n − j ) for all j = 1, . . . , m in (2.2). The system in (2.4) becomes
Kf + r = ze1T − (0|Tl )J σ + T − σ (Tr |0)J + ωenT f + r = g, (2.12) m m where zj = 2 k=j hk for j m and 0 otherwise; wn+1−j = 2 k=j h−k for j m and zero otherwise; ek is the kth vector of the canonical basis; Jn×n is reversal matrix and the definition of σ is referred as (2.10). Under the assumption of symmetry of h, i.e., hj = h−j for every j , for the coefficient matrix ⎛ ⎞ z1 + h0 0 ... 0 0 0 ⎜ z2 + h1 ⎟ ⎜ ⎟ .. ⎜ ⎟ . h−m ⎜ ⎟ ⎜ ⎟ K¯ wn−m+1 + h−m+1 ⎟ , (2.13) K = ⎜ zm + hm−1 ⎜ ⎟ .. ⎜ ⎟ hm . ⎜ ⎟ ⎝ 0 wn−1 + h−1 ⎠ 0 0 ... 0 wn + h0 it is not Toeplitz+Hankel matrix. But the partial matrix K¯ = T (f ) + H (σ 2 f, J σ 2 f )) without the first row, the first line, the last row and the last line of K is Toeplitz+Hankel matrix. For our mean BCs, we assume that the data outside of f are the mean of its adjacent two points. Consequently, we set f (1 − j ) = 2f (2 − j ) − f (3 − j ) and f (n + j ) = 2f (n − 1 + j ) − f (n − 2 + j ) for all j = 1, . . . , m in (2.2). The system in (2.4) becomes
T f + r = g, (2.14) ¯ n−1 Kf + r = ze1T − z¯ e2T + T + wenT − we m m where zj = k=j (2 + m − j )hk for j m and 0 otherwise; z¯ j = k=j (1 + m − j )hk for j m and 0 otherwise; wn+1−j = m ¯ n+1−j = m k=j (2 + m − j )h−k for j m and zero otherwise; w k=j (1 + m − j )h−k for j m and zero otherwise and ek is the kth vector of the canonical basis. Under the assumption of symmetry of h, i.e., hj = h−j for every j , for the coefficient matrix ⎞ ⎛ z +h z¯ + h h ... 0 0 0 1
0
⎜ z2 + h1 ⎜ .. ⎜ . ⎜ ⎜ .. ⎜ . ⎜ ⎜ K = ⎜ zm + hm−1 ⎜ ⎜ hm ⎜ ⎜ ⎜ 0 ⎜ ⎝ 0 0
−1
1
z¯ 2 + h0 .. . .. . z¯ m + hm−2
−2
h−1
...
0
h−m K¯
hm−1 hm 0 0
0
0 0
... ...
h1 h2
h−m+1 w¯ n+1−m + h−m+2 .. . .. . w¯ n−1 + h0 w¯ n + h1
⎟ ⎟ ⎟ 0 ⎟ ⎟ ⎟ h−m ⎟ ⎟ wn+1−m + h−m+1 ⎟ , ⎟ .. ⎟ . ⎟ ⎟ .. ⎟ . ⎟ ⎠ wn−1 + h−1 wn + h0 0
606
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
it is not Toeplitz+Hankel matrix. But the partial matrix K¯ = T (f ) without the first two rows, the first two lines, the last two rows and the last two lines of K¯ is Toeplitz matrix. Specially, we can notice that if m = 2, the partial matrix K¯ = T (f ) + H (σ 2 f, J σ 2 f )) without the first row, the first line, the last row and the last line of K is Toeplitz+Hankel matrix. We have already mentioned that the Dirichlet BCs and the periodic BCs introduce a discontinuity in the image in the generic case. The reflecting BCs preserves the continuity of the image but introduces a discontinuity in the normal derivative. To see that the antireflective BCs and our mean BCs ensure a C 1 continuity, we assume the vector f as a sampling of a C 3 function at a regular mesh, i.e. fj = f (xj ), xj = a + (j − 1)H , a (left boundary point), and H (step in our sampling). For j 1, we compare the Taylor expansion of the exact value f1−j (the point x1−j is outside the domain) with the quantity 2f1 − fj +1 coming from the antireflective BCs and f (1 − j ) = 2f (2 − j ) − f (3 − j ) coming from our mean BCs for all j in (2.2). For the antireflective BCs, we have (j H )2 (j H )3 f (a) − f (αj ), 2 6 (j H )2 (j H )3 f (a) − f (βj ). 2f1 − fj +1 = f (a) − (j H )f (a) − 2 6
f1−j = f (a) − (j H )f (a) +
(2.15) (2.16)
Comparing (2.15) with (2.16), so we have a C 1 continuity. The approximate error ej1 = f1−j − (2f1 − f1+j ) is given by ej1 = f1−j − (2f1 − f1+j ) (j H )3 f (αj ) − f (βj ) . 6 For our mean BCs, we have = (j H )2 f (a) −
2f2−j − f3−j = f (a) − (j H )f (a) −
j H 2 j H 3 f (a) − f (βj ). 2 3
(2.17)
(2.18)
Comparing (2.15) with (2.18), so we have a C 1 continuity. The approximate error ej2 = f1−j − (2f (2 − j ) − f (3 − j )) is given by ej2 = f1−j − 2f (2 − j ) − f (3 − j ) = j H 2 f (a) −
j H 3 f (αj ) − f (βj ) . 6
(2.19)
Comparing (2.17) with (2.19), we can see that ej2 is less than ej1 . So the error of our mean BCs is smaller than that of the antireflective BCs as a kind of BCs. Numerical experiments demonstrate this point in next section. Concerning the 2D case, for an image represented by a (n × n) matrix and a blurring operator represented by an (2m + 1) × (2m + 1) matrix, we should notice that when both indices lie outside the range {1, . . . , n} (this happens close to the 4 corners of the given image), we have two possible natural choices. We describe them around the corner (1, 1), with the others being similar [17]. For the antireflective BCs: Choice a. For 1 j , l m, we set f1−j,1−l = 2f1,1 − fj +1,l+1 (antireflection around the corner). Choice b. For 1 j , l m, we set f1−j,1−l = 4f1,1 − 2f1,l+1 − 2fj +1,1 + fj +1,l+1 (antireflection around the x axis and then around the y axis). For the reflecting BCs, Choices a and b coincide so that there is no ambiguity. Numerical experiments in [17] demonstrated that Choice b leads to a much simpler linear algebra problem than Choice a and therefore Choice b should be preferred. For our mean BCs, we also select Choice b. That is, for 1 j , l m, we set f1−j,1−l = 4f2−j,2−l − 2f3−j,2−l − 2f2−j,3−l + f3−j,3−l (median around the x axis and then around the y axis).
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
607
3. Difference schemes and fixed point method The TV norm is proposed as a regularization functional [12,18,2,3,10,19] for the image restoration problem. Different regularization functionals can lead to different restoration models. Here, we use
(3.1) TV(f ) = |∇f | dx, Ω
where Ω is a bounded and open domain of R 2 , f is the estimated image. Thus the unconstrained problem can be written as 1 2 2 (3.2) |∇f | + β dx dy + h ∗ f − gL2 , min α f 2 Ω
where g, h have the same definition as (5.1), and α > 0 is related to the Lagrange multiplier which controls the trade-off between the smoothness of f and the goodness of fit-to-the-data. The parameter β > 0 is a regularization parameter and is usually small. In this paper, we assume a priori estimate of the Lagrange multiplier. To fix our ideas we will only consider R 2 henceforth. The function h is assumed to be a symmetric kernel and the corresponding Euler–Lagrange equation for (3.2) is ∇f −α∇ · + h ∗ (h ∗ f − g) = 0 in Ω = (0, 1)2 , (3.3) |∇f |2 + β where α, β have the same definition as above. In [15], the authors gave the time dependent model: ∇f − h ∗ (h ∗ f − g) ft = α∇ · |∇f |
(3.4)
with f (x, y, 0) given as initial data (the original blurred and noisy image g used as initial guess) and homogeneous Neumann (reflecting) BCs. Eq. (3.4) is usually called ROF model. We will consider the model ∇f − h ∗ (h ∗ f − g) (3.5) ft = α∇ · |∇f |2 + β with f (x, y, 0) given as initial data (the original blurred and noisy image g used as initial guess) and different BCs (Dirichlet BCs, reflecting BCs, antireflective BCs, mean BCs) respectively. Because in many cases, the periodic BCs causes large oscillation, we will not consider it in our experiments. We divide the domain (0, 1) × (0, 1) into M × M uniform cells. The cell centers are (xi , yj ) = ((i − 1/2)h, (j − 1/2)h), i, j = 1, . . . , M and x = y = 1/M. We use fij approximate f (xi , yj ). We discretize (3.5) by a standard five-point finite difference scheme as in [20]: 1
(Di+1/2,j + Di−1/2,j + Di,j +1/2 + Di,j −1/2 )fij |x|2 − Di+1/2,j fi+1,j − Di−1/2,j fi−1,j − Di,j −1/2 fi,j −1 − Di,j +1/2 fi,j +1 + K ∗ (Kf − g) ij = 0,
(ft )ij +
i, j = 1, . . . , M,
(3.6)
where Di+1/2,j =
α f −fi,j 2 | i+1,j | x
f −f +fi+1,j +1 −fi+1,j −1 2 + | i,j +1 i,j −1 4y |
, +β
f = (f1,1 , f2,1 , . . . , fM,1 , f1,2 , . . . , fM,2 , . . . , fM,M ), g = (g1,1 , g2,1 , . . . , gM,1 , g1,2 , . . . , gM,2 , . . . , gM,M ),
(3.7)
and K has the different definitions as in (2.6)–(2.8), (2.12) and (2.14) according to the different BCs respectively. We abbreviate (3.6) by ft + B(f )f + K ∗ (Kf − g) = 0.
(3.8)
608
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614 f n+1 −f n
Let (ft )ij = ij t ij (t is the time stepsize) and use the fixed point method to solve the above finite difference equation (3.6): I + tB f n f n+1 = −tK ∗ Kf n − g + f n . (3.9) We abbreviate (3.9) by I + A f n f n+1 = −tK ∗ Kf n − g + f n .
(3.10)
4. AMG algorithm and convergence Now we briefly describe the AMG algorithm [6,16]. We consider the following n × n system of linear equation: AU = F.
(4.1)
The AMG method breaks this equation into a sequence of equations smaller and smaller: = (m = m , . . . , um )T and F m = (f m , f m , . . . , f m )T , with n = n > n > , u 1, . . . , P ), where Am = (aijm )nm ×nm , U m = (um 1 2 nm nm 1 2 1 2 · · · > nP , A1 = A, U 1 = U , F 1 = F . These equations formally play the same role as the coarse grid equations in the GMG method. m (maps data on Ω m+1 to data on Ω m ), the restriction operator We should define the interpolation operator Im+1 m+1 m m+1 Im (maps data on Ω to data on Ω ) and the coarse grid operator Am+1 . A Galerkin-type algorithm has Imm+1 = m m T m+1 (Im+1 ) and Am+1 = Im Am Im+1 . Thus we only need to define the coarse grids and interpolation operators. We follow the approach in [6,16] to define the grid Ω m and its coarse grid C m ⊂ Ω m . The grid Ω m is regarded as the indices {1, . . . , nm } of the unknowns ejm , 1 j nm . The fine grid F m = Ω m − C m . Criteria to define C m can be found in [6,16]. We first classify the neighbors of the point i into two classes. A point j ∈ Nim = {j ∈ Ω m | aijm = 0, j = i}, is said to be strongly connected to i if m a θ · maxa m (4.2) ij ik Am U m
Fm
k=i
for some fixed 0 < θ 1, and weakly connected if otherwise. We denote the collection of these neighboring points by Sim (strong) and Wim (weak), respectively. We also denote C m ∩ Sim by Cim . Our goal is to derive an interpolation formula: eim = ωij ejm for i ∈ F m . (4.3) j ∈Cim
In [6], the authors gave an interpolation formula: ejm =
gjmk ekm ,
gjmk =
|ajmk |
l∈Cim ∩Njm
k∈Cim ∩Njm
|ajml |
.
(4.4)
Another interpolation formula basing on some “geometric” assumptions was given in [16]. These “geometric” assumptions are as below: (G1) Elements in Nim are the neighbors of a point i in Ω m . Further, the larger the quantity |aijm | is, the closer the point j is to the point i. (G2) If aijm < 0 or |aijm | is small, we say that the error between i and j is geometrically smooth. Otherwise, we call it geometrically oscillating. Here, we have normalized aii > 0. Let ζijm
− k∈C m ajmk i = m , m k∈C |aj k | i
m ηij =
|aijm | m k∈Cim |aj k | m |Ci |
.
In [16], the authors gave the “geometric” interpolation formula:
(4.5)
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
(1) For j ∈ Sim ∩ F m , we have ⎧ 2 k∈C m g m em − eim ⎪ ⎪ ⎨ i jk k ejm = 12 ( k∈Cim gjmk ekm + eim ) ⎪ ⎪ ⎩ m g m em k∈Ci
m < 3/4, ζ m 1/2, and a m < 0, if ηij ij ij m > 2, ζ m 1/2, and a m < 0, if ηij ij ij
i
(4.6)
otherwise.
jk k
(2) For j ∈ Wim , we have ⎧ m ei ⎪ ⎪ ⎪ m ⎪ ⎨ −ei ejm = 2 k∈C m gjmk ekm − eim ⎪ ⎪ i ⎪ ⎪ ⎩ m g m em k∈C jk k
609
if C m ∩ Sjm = φ, aijm < 0, if C m ∩ Sjm = φ, aijm > 0, if C m ∩ Sjm = φ, ζijm 1/2, and aijm < 0,
(4.7)
otherwise.
Numerical examples support the improvement of this “geometric” interpolation formula. There are other interpolation formulae; please see the references of [6,16]. We will use the “geometric” interpolation formula in our experiments. The proof of the convergence theorem for this improved AMG method was given in [16] when Am is symmetric positive definite. So we only need to prove that the coefficient matrix 1 + A(f n ) is symmetric positive definite to get the convergence theorem of Eq. (3.10). Theorem 4.1. The coefficient matrix 1 + A(f n ) is symmetric positive definite matrix with strong diagonal dominance. Proof. We can easily see that all of the elements Aij > 0 and |Aij | = Aij . 1 + Aii j =i
(4.8)
j =i
According to Gerschgorin Theorem, we get |Aij |. |λ − Aii |
(4.9)
j =i
So we obtain 1 1 + Aii −
|Aij | λ.
(4.10)
j =i
Thus the coefficient matrix 1 + A(f n ) is symmetric positive definite matrix with strong diagonal dominance.
2
Now we will briefly introduce the Krylov subspace method. We choose two parameters s and t, with t s. The Krylov subspace acceleration is performed after every s steps of fixed point iterations as follows. For integer n > 0, let U new = U ns +
t
αi U ns+1−i − U ns−i ,
(4.11)
i=1
where the coefficients αi are chosen such that the residual R new for U new is minimum in the L2 norm, i.e., min R new , R new . α1 ,...,αt
(4.12)
We then reset U ns to be U new . Noticing R new = R ns +
t i=1
αi R ns+1−i − R ns−i ,
(4.13)
610
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
the coefficients (α1 , . . . , αt ) can be found easily. For instance, for t = 1, α1 is α1 =
−(R new , R ns − R ns−1 ) . (R ns − R ns−1 , R ns − R ns−1 )
(4.14)
5. Numerical experiments We consider two images f (see Fig. 1) and the blurring kernel given by the mask 1 (1, 1, 4, 1, 1)T (1, 1, 4, 1, 1), 64
m=2
1 (2 + cos(x) + cos(2x))(2 + cos(y) + cos(2y)). This blurring kernel was used in [17]. related to the symbol h1 (x) = 16 We will use the signal to noise ratio (SNR) of the image u to measure the level of noise, 2 i,j f (i, j ) . (5.1) SNR = 10 · log10 2 i,j r(i, j )
Blurred signal to noise ratio (BSNR) is used to measure the ratio of the level of blur kernel and the level of noise ¯ 2 i,j [k ∗ f (i, j ) − f ] BSNR = 10 · log10 , (5.2) 2 i,j r(i, j ) where f¯ = i,j f (i, j )/n2 , 1 i n, 1 j n is the mean of the image f . Improvement in the signal quality (ISNR) is used to measure the goodness of restored image 2 i,j [f (i, j ) − g(i, j )] , (5.3) ISNR = 10 · log10 2 i,j [f (i, j ) − fnew (i, j )] where fnew is the restored image. That is, the value of ISNR is larger, the restored image is better. Fig. 1 image I (256 × 256) represents a kitten in a basket. Fig. 1 image II (256 × 256) represents an old painting coming from a known artist. The fixed point method with small β converges slowly [7]. In [5], Q. Chang introduced a good initial guess, thus small β (β can be taken as 10−32 ) can be chosen and in the meantime the number of iterations can be reduced. Here, we let β = 0.0001 in (3.5). The Lagrange multiplier α impacts the restoration effect. Small α corresponds to very little noise removal, and large α yields a blurry, oversmoothed f . α = 1.18 was used in [4,5]. Here we also use this estimated value. Fig. 2 (left) represents the blurred and noisy image I with SNR = 22.0176, BSNR = 13.9919. (Right) represents the blurred and noisy image II with SNR = 19.9386, BSNR = 13.5652. In our real life, we cannot get the whole blurred and noisy images but only can get part of blurred and noisy images. According to the part of blurred and noisy image, we want to reconstruct an approximate true image. When we deconvolve the part of blurred and noisy image, we must make some assumptions on the outside values of the part of blurred and noisy image. To demonstrate that using our mean BCs in the process of deconvolution is better than using the other existing BCs, we select a part (130 × 130) (see Fig. 3) from Fig. 2 respectively. We need to reconstruct these parts of blurred and noisy images in Fig. 3, then compare the restored partial images and the corresponding partial true images, respectively. In the AMG procedure, we use the simple V-cycle and the Gauss–Seidel iteration as the smoother. In [5], the authors demonstrated that (4.6)–(4.7) is better than (4.4). Many numerical examples support the improvement of this “geometric” interpolation formula [6] . We will use this “geometric” interpolation formula as our interpolation formula. The convergence of the fixed point iteration above can further be improved by the Krylov acceleration method. The results in [5] demonstrated that the Krylov acceleration method is very efficient for acceleration the convergence of the fixed point method. We apply the Krylov acceleration every four fixed point iterations. Fig. 4 shows the restored part of image I using the different BCs, It can be seen that the restored part of images using the antireflective BCs and the mean BCs are clearer than the restored part of images using the Dirichlet BCs and the reflecting BCs at the boundaries. Especially in the top left corner, the restored part of image I using the mean
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
611
Fig. 1. Original images of image I (left) and image II (right).
Fig. 2. (Left) represents the blurred and noisy image I with SNR = 22.0176, BSNR = 13.9919; (right) represents the blurred and noisy image I with SNR = 19.9386, BSNR = 13.5652.
Fig. 3. From left: part of true image I; part of true image II; part of blurred and noisy image I; part of blurred and noisy image II.
BCs is closer to the true part of image I than the other three BCs. Fig. 6 shows the restored part of image II using the different BCs. Because the image II is a part of one’s face, the outside part is almost the same with the inside part that is controlled, the restored part of images using the different BCs are almost the same. But the hair on the temples can be restored using the mean BCs better than the other three BCs. We let the restored error er = f − fr , where f is the true image and fr is the restored image. Here the blurring 1 kernel is 64 (1, 1, 4, 1, 1)T (1, 1, 4, 1, 1), m = 2. We have known the controlled image (130 × 130), so we need to consider an image (134 × 134) in the process of deconvolution. Thus only two values along the boundary are impacted
612
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
Fig. 4. From left: restored part of image I using Dirichlet BCs; restored part of image I using reflecting BCs; restored part of image I using antireflective BCs; restored part of image I using mean BCs.
Fig. 5. Modified restored error of image I with Dirichlet BCs, reflecting BCs, antireflective BCs, mean BCs.
by the different BCs. In order to see the differences of the restored part that relates to the different BCs more clearly, the values of part of er (126 × 126) that are foreign to the BCs are set to be zero. The modified restored error is entitled as emr . Fig. 5 and Fig. 7 show the emr of image I and image II using the different BCs. For image I, we can clearly see that the emr of the mean BCs is less than the emr of the other three BCs. For image II, the emr of the antireflective BCs, the mean BCs and the reflecting BCs are clearly less than the emr of the Dirichlet BCs. The emr of the antireflective BCs and the mean BCs are lower than the emr of the reflecting BCs except for the left corner. The emr of the mean BCs is less than the emr of the antireflective BCs on some points, the other parts are almost the same. Therefore, we can say that if the image is smooth at the boundary to a certain extent, the restored effects using the antireflective BCs and the mean BCs are almost the same. If the image is discontinuous at the boundary to a certain extent, the restored effect using the mean BCs is better than the antireflective BCs.
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
613
Fig. 6. From left: restored part of image II using Dirichlet BCs; restored part of image II using reflecting BCs; restored part of image II using antireflective BCs; restored part of image II using mean BCs.
Fig. 7. Modified restored error of image I with Dirichlet BCs, reflecting BCs, antireflective BCs, mean BCs.
To show the differences of the restored images using the different BCs ulteriorly, we choose a quantity (ISNR) to measure the quality of improvement. Now we give the computational values of ISNR (Table 1) coming from the part of true images, the part of blurred and noisy images and the restored images by solving Eq. (3.10). From the values of Table 1, we can get that the values of ISNR using the mean BCs is larger than using the other BCs respectively, i.e., using our mean BCs can get the proximal restored images. Comparing with the large amounts of data of the whole image, the part of boundaries is very small. The CPU time is almost the same using the different BCs. In the experiments, for image I, when the number of iterations N is 12, the CPU time is almost 2.7 seconds. For image II, when the number of iterations N is 8, the CPU time is almost 1.8 seconds.
614
Y. Shi, Q. Chang / Applied Numerical Mathematics 58 (2008) 602–614
Table 1 ISNR for image I and image II BCs
Dirichlet
Reflecting
Antireflective
Mean
image I image II
−0.1652 2.9992
0.1531 4.5226
0.1703 4.5359
0.2497 4.5433
6. Concluding remarks In this paper, we propose a new boundary conditions (mean BCs) and demonstrate our mean BCs is better than the other BCs such as Dirichlet BCs, reflecting BCs and antireflective BCs from both a theoretical point of view and practical numerical experiments. Both the antireflective BCs and our mean BCs can keep C 1 continuity in onedimensional case, but the error of our mean BCs is less than the error of the antireflective BCs. So our mean BCs is better than the antireflective BCs from a theoretical point. On the other hand, an improved AMG method combines the fixed point method and the Krylov acceleration in solving Eq. (3.10). Experimental results demonstrate that the restored image using our mean BCs is better than the restored image using the other three BCs. Acknowledgements We thank Professors Serra Capizzano Stefano and James Nagy for fruitful discussions, the referees for very useful remarks and suggestions. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
H. Andrew, B. Hunt, Digital Image Restoration, Prentice-Hall, Englewood Cliffs, NJ, 1977. G. Aubert, L. Vese, A variational method in image recovery, SIAM J. Numer. Anal. 34 (1997) 1948–1979. A. Chambolle, P.L. Lions, Image recovery via total variation minimization and related problems, Numer. Math. 76 (1997) 167–188. T. Chan, G. Golub, P. Mulet, A nonlinear primal–dual method for total variation-based image restoration, SIAM J. Sci. Comput. 20 (1999) 1964–1977. Q. Chang, I. Chern, Acceleration methods for total variation-based image denoising, SIAM J. Sci. Comput. 25 (2003) 982–994. Q. Chang, Y.S. Wong, H. Fu, On the algebraic multigrid method, J. Comput. Phys. 125 (1996) 279–292. D.C. Dobson, C.R. Vogel, Convergence of an iterative method of total variation denoising, SIAM J. Numer. Anal. 34 (1997) 1779–1791. M. Donatelli, S. Serra-Capizzano, Anti-reflective boundary conditions and re-blurring, Inverse Problems 21 (2005) 169–182. M. Donatelli, S. Serra-Capizzano, On the regularizing power of multigrid-type algorithms, SIAM J. Sci. Comput. 26 (2006) 2053–2076. D. Geman, G. Reynolds, Constrained restoration and the recovery of discontinuities, IEEE Trans. Pattern Anal. Machine Intelligence 14 (1992) 367–383. R. Gonzalez, R. Woods, Digital Image Processing, Addison-Wesley, Reading, MA, 1992. C.W. Groetsch, The theory of Tikhonov Regularization for Fredholm Integral Equations of the First Kind, Pitman, Boston, 1984. M.K. Ng, R.H. Chan, W.C. Tang, A fast algorithm for deblurring models with Neumann boundary conditions, SIAM J. Sci. Comput. 21 (1999) 851–866. L. Rudin, S. Osher, E. Fatemi, Nonlinear total variation based noise removal algorithms, Phys. D 60 (1992) 259–268. L. Rudin, S. Osher, Total variation based image restoration with free local constraints, in: Proceedings IEEE Internat. Conf. Imag. Proc., Austin, TX, IEEE Press, Piscataway, NJ, 1994, pp. 31–35. J.W. Ruge, K. Stüben, Algebraic multigrid, in: S.F. McCormick (Ed.), Multigrid Methods, vol. 4, SIAM, Philadelphia, PA, 1987. S. Serra-Capizzano, A note on antireflective boundary conditions and fast deblurring models, SIAM J. Sci. Comput. 25 (2003) 1307–1325. A.N. Tikhonov, V.Y. Aresenin, Solutions of Ill-posed Problems, John Wiley, New York, 1977. L. Vese, Variational Problems and PDE’s for image analysis and curve evolution, PhD thesis, University of Nice, 1996. C.R. Vogel, M.E. Oman, Iterative methods for total variation denoising, SIAM J. Sci. Comput. 17 (1996) 227–238.