In electrical engineering and computer science, image processing refers to any form of signal processing in which the input is an image and the output can be either an image or a set of parameters related to the image. Generally, image processing includes image enhancement, restoration and reconstruction, edge and boundary detection, classification and segmentation, object recognition and identification, compression and communication, etc. Among them, image restoration is a classical problem and is generally a preprocessing stage of higher level processing. In many applications, the measured images are degraded by blurs; e.g. the optical system in a camera lens may be out of focus, so that the incoming light is smeared out, and in astronomical imaging the incoming light in the telescope has been slightly bent by turbulence in the atmosphere. In addition, images that occur in practical applications inevitably suffer from noise, which arise from numerous sources such as radiation scatter from the surface before the image is sensed, electrical noise in the sensor or camera, transmission errors, and bit errors as the image is digitized, etc. In such situations, the image formation process is usually modeled by the following equation
where u(x) is an unknown clean image over a region Ω⊂R2, “*" denotes the convolution operation, k(x),n(x) and f(x) are real-valued functions from R2 to R representing, respectively, convolution kernel, additive noise, and the blurry and noisy observation. Usually, the convolution process neither absorbs nor generates optical energy, i.e., ∫Ωk(x)normaldx=1, and the additive noise has zero mean.
Deblurring or decovolution aims to recover the unknown image
u(x) from
f(x) and
k(x) based on (
Equation 1). When
k(x) is unknown or only an estimate of it is available, recovering
u(x) from
f(x) is called blind deconvolution. Throughout this module, we assume that
k(x) is known and
ω(x) is either Gaussian or impulsive noise. When
k(x) is equal to the Dirac delta, the recovery of
u(x) becomes a pure denoising problem. In the rest of this section, we review the TV-based variational models for image restoration and introduce necessary notation for analysis.
The TV regularization was first proposed by Rudin, Osher and Fatemi in
[12] for image denoising, and then extended to image deblurring in
[11]. The TV of
u is defined as
When
∇u(x) does not exist, the TV is defined using a dual formulation
[18], which is equivalent to (
Equation 2) when
u is differentiable. We point out that, in practical computation, discrete forms of regularization are always used where differential operators are replaced by ceratin finite difference operators. We refer TV regularization and its variants as TV-like regularization. In comparison to Tikhonov-like regularization, the homogeneous penalty on image smoothness in TV-like regularization can better preserve sharp edges and object boundaries that are usually the most important features to recover. Variational models with TV regularization and
ℓ2 fidelity has been widely studied in image restoration; see e.g.
[4],
[3]and references therein. For
ℓ1 fidelity with TV regularization, its geometric properties are analyzed in
[2],
[16],
[17]. The superiority of TV over Tikhonov-like regularization was analyzed in
[1],
[5] for recovering images containing piecewise smooth objects.
Besides Tikhonov and TV-like regularization, there are other well studied regularizers in the literature, e.g. the Mumford-Shah regularization
[9]. In this module, we concentrate on TV-like regularization. We derive fast algorithms, study their convergence, and examine their performance.
As used before, we let ∥·∥ be the 2-norm. In practice, we always discretize an image defined on Ω, and vectorize the two-dimensional digitalized image into a long one-dimensional vector. We assume that Ω is a square region in R2. Specifically, we first discretize u(x) into a digital image represented by a matrix U∈Rn×n. Then we vectorize U column by column into a vector u∈Rn2, i.e.
where
ui denotes the
ith component of
u,
Upq is the component of
U at
pth row and
qth column, and
p and
q are determined by
i=(q−1)n+p and
1≤q≤n. Other quantities such as the convolution kernel
k(x), additive noise
ω(x), and the observation
f(x) are all discretized correspondingly. Now we present the discrete forms of the previously presented equations. The discrete form of (
Equation 1) is
where in this case, u,ω,f∈Rn2 are all vectors representing, respectively, the discrete forms of the original image, additive noise and the blurry and noisy observation, and K∈Rn2×n2 is a convolution matrix representing the kernel k(x). The gradient ∇u(x) is replaced by certain first-order finite difference at pixel i. Let Di∈R2×n2 be a first-order local finite difference matrix at pixel i in horizontal and vertical directions. E.g. when the forward finite difference is used, we have
for
i=1,...,n2 (with certain boundary conditions assumed for
i>n2−n). Then the discrete form of TV defined in (
Equation 2) is given by
We will refer to
with discretized TV regularization (
Equation 6) as TV/L
2. For impulsive noise, we replace the
ℓ2 fidelity by
ℓ1 fidelity and refer to the resulted problem as TV/L
1.
Now we introduce several more notation. For simplicity, we let ∑i be the summation taken over all pixels. The two first-order global finite difference operators in horizontal and vertical directions are, respectively, denoted by D(1) and D(2) which are n2-by-n2 matrices (boundary conditions are the same as those assumed on Di). As such, it is worth noting that the two-row matrix Di is formed by stacking the ith row of D(1) on that of D(2). For vectors v1 and v2, we let v=(v1;v2)≜(v1⊤,v2⊤)⊤, i.e. v is the vector formed by stacking v1 on the top of v2. Similarly, we let D=(D(1);D(2))=((D(1))⊤,,,(D(2))⊤)⊤. Given a matrix T, we let diag(T) be the vector containing the elements on the diagonal of T, and F(T)=FTF−1, where F∈n2×n2 is the 2D discrete Fourier transform matrix.
Since TV is nonsmooth, quite a few algorithms are based on smoothing the TV term and solving an approximation problem. The TV of u is usually replaced by
where
ϵ>0 is a small constant. Then the resulted approximate TV/L
2 problem is smooth and many optimization methods are available. Among others, the simplest method is the gradient descent method as was used in
[12]. However, this method suffers slow convergence especially when the iterate point is close to the solution. Another important method is the linearized gradient method proposed in
[14] for denoising and in
[15] for deblurring. Both the gradient descent and the linearized gradient methods are globally and at best linearly convergent. To obtain super linear convergence, a primal-dual based Newton method was proposed in
[13]. Both the linearized gradient method and this primal-dual method need to solve a large system of linear equations at each iteration. When
ϵ is small and/or
K becomes more ill-conditioned, the linear system becomes more and more difficult to solve. Another class of well-known methods for TV/L
2 are the iterative shrinkage/thresholding (IST) based methods
[8]. For IST-based methods, a TV denoising problem needs to be solved at each iteration. Also, in
[7] the authors transformed the TV/L
2 problem into a second order cone program and solved it by interior point method.
In this section, we derive a new algorithm for the TV/L2 problem
In (
Equation 9), the fidelity term is quadratic with respect to
u. Moreover,
K is a convolution matrix and thus can be easily diagonalized by fast transforms (with proper boundary conditions assumed on
u). Therefore, the main difficulty in solving (
Equation 9) is caused by the nondifferentiability and the universal coupling of variables of the TV term. Our algorithm is derived from the well-known variable-splitting and penalty techniques in optimization. First, we introduce an auxiliary variable
wi∈R2 at pixel
i to transfer
Diu out of the nondifferentiable term
∥·∥. Then we penalize the difference between
wi and
Diu quadratically. As such, the auxiliary variables
wi's are separable with respect to one another. For convenience, in the following we let
w≜[w1,...,wn2]. The approximation model to (
Equation 9) is given by
min∑∥wi∥+ ∑∥wi−Diu∥2+ ∥Ku−f∥2, |
(10)where
β≫0 is a penalty parameter. It is well known that the solution of (
Equation 10) converges to that of (
Equation 9) as
β→∞. In the following, we concentrate on problem (
Equation 10).
The benefit of (
Equation 10) is that while either one of the two variables
u and
w is fixed, minimizing the objective function with respect to the other has a closed-form formula that we will specify below. First, for a fixed
u, the first two terms in (
Equation 10) are separable with respect to
wi, and thus the minimization for
w is equivalent to solving
min∥wi∥+ ∥wi−Diu∥2,i=1,2,...,n2. |
(11)It is easy to verify that the unique solutions of (
Equation 11) are
wi=max{∥,Di,u∥−, ,,,0} ,i=1,...,n2, |
(12)where the convention
0·(0/0)=0 is followed. On the other hand, for a fixed
w, (
Equation 10) is quadratic in
u and the minimizer
u is given by the normal equations
(∑,Di⊤,Di,+, ,K⊤,K)u=∑Di⊤wi+ K⊤f. |
(13)By noting the relation between
D and
Di and a reordering of variables, (
Equation 13) can be rewritten as
(D⊤,D,+, ,K⊤,K)u=D⊤w+ K⊤f, |
(14)where
The normal equation (
Equation 14) can also be solved easily provided that proper boundary conditions are assumed on
u. Since both the finite difference operations and the convolution are not well-defined on the boundary of
u, certain boundary assumptions are needed when solving (
Equation 14). Under the periodic boundary conditions for
u, i.e. the 2D image
u is treated as a periodic function in both horizontal and vertical directions,
D(1),
D(2) and
K are all block circulant matrices with circulant blocks; see e.g.
[10],
[6]. Therefore, the Hessian matrix on the left-hand side of (
Equation 14) has a block circulant structure and thus can be diagonalized by the 2D discrete Fourier transform
F, see e.g.
[6]. Using the convolution theorem of Fourier transforms, the solution of (
Equation 14) is given by
u=F−1(
F(D⊤,w,+,(μ/β),K⊤,f) |
diag(F,(,D⊤,D,+,(μ/β),K⊤,K,)) |
), |
(16)where the division is implemented by componentwise. Since all quantities but
w are constant for given
β, computing
u from (
Equation 16) involves merely the finite difference operation on
w and two FFTs (including one inverse FFT), once the constant quantities are computed.
Since minimizing the objective function in (
Equation 10) with respect to either
w or
u is computationally inexpensive, we solve (
Equation 10) for a fixed
β by an alternating minimization scheme given below.
Algorithm :
To present the convergence results of Algorithm
"Basic Algorithm" for a fixed
β, we make the following weak assumption.
Assumption 1 N(K)∩N(D)={0{, where N(·) represents the null space of a matrix.
Define
Furthermore, we will make use of the following two index sets:
L={i:∥,Di,u*,∥<, }andE={1,...,n2{∖L. |
(18)Under Assumption 1, the proposed algorithm has the following convergence properties.
Theorem 1 For any fixed
β>0, the sequence
{(wk,uk){ generated by Algorithm
"Basic Algorithm" from any starting point
(w0,u0) converges to a solution
(w*,u*) of (
Equation 10). Furthermore, the sequence satisfies
∥wEk+1−wE*∥≤\ρ((T2)EE)∥wEk−wE*∥;
(19)
∥uk+1−u*∥M≤\ρ(TEE)∥uk−u*∥M;
(20)
for all k sufficiently large, where TEE=[Ti,j]i,j∈E∪(n2+E) is a minor of T, ∥v∥M2=v⊤Mv and ρ(·) is the spectral radius of its argument.
Let
u=[u(1);...;u(m)]∈Rmn2 be an
m-channel image, where, for each
j,
u(j)∈Rn2 represents the
jth channel. An observation of
u is modeled by (
Equation 4), in which case
f=[f(1);...;f(m)] and
ω=[ω(1);...;ω(m)] have the same size and the number of channels as
u, and
K is a multichannel blurring operator of the form
K=[
K11 | K12 | ⋯ | K1m |
K21 | K22 | ⋯ | K2m |
⋮ | ⋮ | ⋱ | ⋮ |
Km1 | Km2 | ⋯ | Kmm |
]∈Rmn2×mn2, |
(21)where Kij∈Rn2×n2, each diagonal submatrix Kii defines the blurring operator within the ith channel, and each off-diagonal matrix Kij, i≠j, defines how the jth channel affects the ith channel.
where
Im is the identity matrix of order
m, and “
⊗" is the Kronecker product. By introducing auxiliary variables
wi∈R2m,
i=1,...,n2, (
Equation 22) is approximated by
min∑∥wi∥+ ∑∥wi−(Im⊗Di)u∥2+ ∥Ku−f∥2. |
(23)For fixed
u, the minimizer function for
w is given by (
Equation 12) in which
Diu should be replaced by
(Im⊗Di)u. On the other hand, for fixed
w, the minimization for
u is a least squares problem which is equivalent to the normal equations
(I3,⊗,(D⊤D),+, ,K⊤,K)u=(I3⊗D)⊤w+ K⊤f, |
(24)where
w is a reordering of variables in a similar way as given in (
Equation 15). Under the periodic boundary condition, (
Equation 24) can be block diagonalized by FFTs and then solved by a low complexity Gaussian elimination method.
When the blurred image is corrupted by impulsive noise rather than Gaussian, we recover
u as the minimizer of a TV/L
1 problem. For simplicity, we again assume
u∈Rn2 is a single channel image and the extension to multichannel case can be similarly done as in
"Multichannel image deconvolution". The TV/L
1 problem is
Since the data-fidelity term is also not differentiable, in addition to
w, we introduce
z∈Rn2 and add a quadratic penalty term. The approximation problem to (
Equation 25) is
min∑(∥,wi,∥+, ,∥wi−Diu∥2)+μ(∥z∥1,+, ,∥z−(Ku−f)∥2), |
(26)where β,γ≫0 are penalty parameters. For fixed u, the minimization for w is the same as before, while the minimizer function for z is given by the famous one-dimensional shrinkage:
z=max{|Ku−f|−, ,,,0}·sgn(Ku−f). |
(27)On the other hand, for fixed w and z, the minimization for u is a least squares problem which is equivalent to the normal equations
(D⊤,D,+, ,K⊤,K)u=D⊤w+ K⊤(f+z). |
(28)Similar to previous arguments, (
Equation 28) can be easily solved by FFTs.
In this section, we present the practical implementation and numerical results of the proposed algorithms. We used two images, Man (grayscale) and Lena (color) in our experiments, see
Figure 1. The two images are widely used in the field of image processing because they contain nice mixture of detail, flat regions, shading area and texture.
We tested several kinds of blurring kernels including Gaussian, average and motion. The additive noise is Gaussian for TV/L2 problems and impulsive for TV/L1 problem. The quality of image is measured by the signal-to-noise ratio (SNR) defined by
where u is the original image and E(u) is the mean intensity value of u. All blurring effects were generated using the MATLAB function “imfilter " with periodic boundary conditions, and noise was added using “imnoise ". All the experiments were finished under Windows Vista Premium and MATLAB v7.6 (R2008a) running on a Lenovo laptop with an Intel Core 2 Duo CPU at 2 GHz and 2 GB of memory.
Generally, the quality of the restored image is expected to increase as
β increases because the approximation problems become closer to the original ones. However, the alternating algorithms converge slowly when
β is large, which is well-known for the class of penalty methods. An effective remedy is to gradually increase
β from a small value to a pre-specified one.
Figure 2 compares the different convergence behaviors of the proposed algorithm when with and without continuation, where we used Gaussian blur of size 11 and standard deviation 5 and added white Gaussian noise with mean zero and standard deviation
10−3.
In this continuation framework, we compute a solution of an approximation problem which used a smaller beta, and use the solution to warm-start the next approximation problem corresponding to a bigger
β. As can be seen from
Figure 2, with continuation on
β the convergence is greatly sped up. In our experiments, we implemented the alternating minimization algorithms with continuation on
β, which we call the resulting algorithm “Fast Total Variation de-convolution” or FTVd, which, for TV/L
2, the framework is given below.
[FTVd]:
- Input f, K and μ>0. Given βmax>β0>0.
- Initialize u=f, up=0, β=β0 and ϵ>0.
While β≤βmax, Do
- End Do
Generally, it is difficult to determine how large
β is sufficient to generate a solution that is close to be a solution of the original problems. In practice, we observed that the SNR values of recovered images from the approximation problems are stabilized once
β reached a reasonably large value. To see this, we plot the SNR values of restored images corresponding to
β=20,21,⋯,218 in
Figure 3. In this experiment, we used the same blur and noise as we used in the testing of continuation. As can be seen from
Figure 3, the SNR values on both images essentially remain constant for
β≥27. This suggests that
β need not to be excessively large from a practical point of view. In our experiments, we set
β0=1 and
βmax=27 in Algorithm
"Practical Implementation". For each
β, the inner iteration was stopped once an optimality condition is satisfied. For TV/L
1 problems, we also implement continuation on
γ, and used similar settings as used in TV/L
2.
In this subsection, we present results recovered from TV/L
2 and TV/L
1 problems including (
Equation 9), (
Equation 25) and their multichannel extensions. We tested various of blurs with different levels of Gaussian noise and impulsive noise. Here we merely present serval test results.
Figure 4 gives two examples of blurry and noisy images and the recovered ones, where the blurred images are corrupted by Gaussian noise, while
Figure 5 gives the recovered results where the blurred images are corrupted by random-valued noise. For TV/L
1problems, we set
γ=215 and
β=210 in the approximation model and implemented continuation on both
β and
γ.
0 comments:
Post a Comment