A Multigrid Approach For Fast Geodesic Active Contours
A Multigrid Approach For Fast Geodesic Active Contours
November 4, 2004
Abstract
The geodesic active contour is a recent geometric approach for im-
age segmentation, which is motivated by previous snake and geometric
models. Segmentation in this model is performed by a dynamic curve
which minimizes several internal and external forces. These forces
smooth the curve and attract it to the boundaries of objects. The
conventional framework for computing geodesic active contours is the
level-set method, where the evolving contour is represented as a level-
set of a surface. This gives a stable solution, which naturally handles
segmentation of several objects in one image. To overcome the rela-
tively high computational requirements of this approach, an implicit
formulation is proposed, which reduces the required number of time-
steps drastically. An efficient adaptive multigrid algorithm is developed
and implemented for the solution of the resulting nonlinear system.
1 Introduction
Image segmentation is a basic and important task in computer vision. High
quality segmentation plays a key role in higher level algorithms such as
medical image analysis, pattern recognition, and tracking of objects in a
sequence of images. In this paper, an innovative approach is introduced for
solving the geodesic active contour flow by an adaptive multigrid method.
1
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
edge integration technique. The snake model, also known as the active con-
tour, first introduced by Kass, Witkin, and Terzopoulos (1987) [2], is an
energy minimizing curve guided by external constraint forces, which draw
it towards features such as lines and edges. An important addition is the
balloon force, introduced by Cohen (1991) [3], which accelerates the evolu-
tion of the snake far from the object’s boundaries. It also allows the curve
to skip over weak edges. A geometric version of the active contour model
was introduced by Caselles et al. (1993) [4] and Malladi et al. (1993, 1995)
[5, 6]. It is independent of the curve’s parameterization, and thus intrinsic
and stable. The present work is based on the geodesic active contour, in-
troduced by Caselles, Kimmel and Sapiro (1995, 1997) [7, 1]. The geodesic
approach to object segmentation links between the snake model and the
geometric active contours. Minimal distance curves are computed using the
Osher and Sethian level-set approach (1988) [8]. This method treats evolv-
ing curves implicitly, by embedding the propagating interface as a level-set
of a higher-dimensional function. In our case, the curve is embedded as an
equal height contour of a surface. The curve’s flow is computed by a numer-
ical algorithm on a fixed grid. This approach easily handles segmentation
of several objects, since, even if the curve splits, its level-set implicit surface
representation remains continuous.
Recently, the geodesic active contour flow was solved by Goldenberg et
al. [9]. They use an unconditionally stable Additive Operator Splitting
(AOS) numerical scheme [10] to implement a fast version of the geodesic
active contour model. It is applied in small regions, motivated by the
Adalsteinsson-Sethian level-set narrow band approach [11], and uses a fast
marching method for re-initialization.
2
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
3
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Φn+1 = Φn + ∆tΦn+1
t . (2)
For many problems the implicit scheme is unconditionally stable (see also
Appendix A), and the solution for a given time can be obtained in just a
few time-steps. However, the solution at each time-step requires solving the
system
Φn+1 − ∆tΦn+1t = Φn . (3)
A common approach for solving this PDE is by discretizing on a grid, obtain-
ing a large algebraic system of equations. These can be solved iteratively,
for example, by classical relaxation methods such as Gauss-Seidel or Ja-
cobi. The solution is advanced by using update-steps, in which we change
each unknown in turn to satisfy its equation. A cycle in which we correct
every unknown once is called an iteration or relaxation sweep. A major
problem of the traditional relaxation methods is the slow elimination rate
of global error, that is, large-scale errors which cannot be detected locally.
The multigrid approach overcomes this problem.
2.2 Multigrid
The multigrid approach [16, 17] enables us to efficiently eliminate both local
and global errors, by employing a hierarchy of grids. This significantly
reduces the computational cost of solving grid-based problems.
We solve each time-step as a separate problem. The system (3) can be
written more generally as
A(Φ) = F, (4)
where A(Φ) is the left-side discretized operator, and F contains the right-
side given values, that is, Φ from the previous time-step. We start with
Φ from the previous time-step on the finest grid and perform the following
recursive multigrid routine.
4
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Multigrid Routine
• Relax on the current grid ν1 times.
• Correct the current grid values using the coarser grid solution.
b
E = Φ − Φ. (5)
We thus have
b + E) = R + A(Φ),
A(Φ b (7)
which we use to obtain an approximation to Φb + E. This process is carried
out on a coarser grid, after E has been smoothed by relaxation.
5
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
where
b l )↓ .
El+1 = Φl+1 − (Φ (11)
We follow this by ν2 fine-grid relaxation sweeps.
6
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
the typical behavior of the residual norm. The multigrid cycles reduce the
residuals, but there is some increase with every new time-step, because the
right-hand side changes. Overall, the residuals are reduced in time as the
solution tends to a steady state.
7
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
(a) (b)
Figure 2: Level-set illustration: (a) the curve (b) the curve embedded as a
level set of a function.
From the function Φ, we can extract the curve C using the appropriate
level-set, that is, the set of points (x, y) which satisfy Φ(x, y) = const.
8
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
B = αg|∇Φ|, (18)
is called the balloon force. It accelerates the motion of the active contour
when it is far from object boundaries. One problem that arises when using
the balloon force is that the contour may overshoot significant boundaries.
Therefore, we turn off the balloon force near boundaries. Accordingly, we
change (18) to
B = g̃|∇Φ|, (19)
where g̃ uses a location-dependent indicator that detects boundaries of ob-
jects. A simple possible implementation of g̃ is a threshold of g,
½
αg if g(x,y) > T
g̃ = , (20)
0 otherwise
.
The flow Φt , is given by the sum of the semi-internal force, the semi-
external force and the weighted balloon force,
Φt = (I + E + B). (21)
E = Φ x gx + Φ y gy , (23)
q
B = g̃ Φ2x + Φ2y . (24)
9
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Φn+1 − ∆t (I + E + B) = F, (25)
4 Adaptive Multigrid
In many cases it makes sense to use a fine grid only in specific locations
where high precision is required. There are several different treatments for
such local refinement in the multigrid framework. Two notable approaches
10
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
are the Multi-Level Adaptive Technique (MLAT) [15] and the Fast Adap-
tive Composite grid (FAC) [27]. Each allows the options of static refinement
and dynamic refinement. In static refinement the locally-refined grids are
defined prior to the solution of the problem, whereas in dynamic refinement
we determine the refinement locations during the solution process according
to some solution-dependent criteria. Here, we choose to use MLAT with
static refinement. We choose MLAT because it is naturally compatible with
FAS, which we need to employ due to the nonlinearity. And we use static
refinement since we require high accuracy in the vicinity of object bound-
aries, which we know beforehand from the edge indicator function, g. See
Figure 4 for an illustration.
11
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
12
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
13
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
N = 10NT S NM C . (26)
14
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
6 Results
In this section and the next we report results obtained with the multigrid
algorithm for several test cases. The total number of multigrid cycles re-
quired for reaching the approximate steady state never exceeded a dozen.
On a standard 1GHz PC the CPU time required was about one second per
time-step, hence typically two to four seconds per application. In contrast,
traditional explicit schemes require several minutes to converge to the same
solutions.
(a) (b)
15
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Figure 10: Simple case: (a) input image, (b) g function, (c) initial solution.
16
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Figure 11: The first four time-steps, with different numbers of grid-levels.
(a1)-(a4) one level, (b1)-(b4) two levels, (c1)-(c4) three levels, (d1)-(d4) four
levels.
17
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Figure 12: Results for Galaxy u6614 (top) and Galaxy f5611 (bottom)
(a) input image, (b) adaptive grid: the sub-domain of the finest grid, (c)
solution: white contour - initial solution, gray contours - first and second
time-steps, black contour - final solution.
18
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
19
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
final result
8 Conclusions
An efficient numerical scheme for solving time-dependent problems in image
analysis has been presented. It consists of an implicit formulation of a
time-dependent problem and a multigrid solver. We have also used this
scheme effectively in other time-dependent problems, in particular, the single
channel Beltrami flow, [32], which is an anisotropic diffusion filter that we
use to enhance the input images.
The solution depends on the quality of the edge indicator function, and
on its ability to represent the edges of the objects in the image. Noisy or false
edges can attract the active contour to a spurious solution; alternatively,
the active contour may skip over significant edges. In this work we focus on
solving the active contour subject to a given simple edge indicator. Further
work should concentrate on how to obtain a good edge indicator function.
The edge indicator function strongly affects the coefficient matrix of the
problem. The matrix consequently often contains rapidly changing values.
20
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
This makes it difficult to approximate on coarse grids and may lead to in-
accurate coarse-grid solutions, which impair convergence. We overcome this
problem by damping the prolongation in regions where the edge indicator
function is not approximated well on the coarse grid.
9 Appendix A
Here we show the unconditional stability of the implicit approach, for time-
dependent problems which are derived from the minimization of a functional.
Consider a generic minimization problem of finding a vector Φ which min-
imizes some convex functional, J(Φ). Given an approximate solution after
time-step n—Φn —the n + 1st implicit time-step can itself be written as the
minimization problem:
· ¸
n+1 1 n 2
Φ = argminφ J(φ) + (φ − Φ ) . (29)
2∆t
[To see the equivalence, note that the solution satisfies ∆tJ 0 (Φn+1 )+Φn+1 =
Φn ; compare to (2), with Φn+1t ≡ −J 0 (Φn+1 )]. Since Φn+1 is the minimizer,
if we substitute Φ n+1 for φ in the functional on the right side of (29), the
result cannot be larger than what we would get by substituting anything
else, in particular, Φn , hence,
1
J(Φn+1 ) + (Φn+1 − Φn )2 ≤ J(Φn ) . (30)
2∆t
Evidently, therefore, J(Φn+1 ) is strictly smaller than J(Φn ), so the func-
tional is decreased at each time step unless a steady state has been reached.
This proves that the implicit procedure is unconditionally stable.
Of course this holds strictly only if the discrete problem is itself a min-
imization of a functional, for example, if the functional itself is discretized,
and a minimum is then sought. In the present application we chose instead
to discretize the Euler-Lagrange equations in order to reduce the cost of the
discrete problem. Thus, strict monotonicity of convergence is not assured
in our case, but the process nevertheless remained stable.
10 Appendix B
Here we describe the discretization and relaxation of (25). We perform
Gauss-Seidel relaxation sweeps, whereby the variables are scanned and each
variable, Φi,j is updated according to its neighbors. Although the equations
are nonlinear, it turns out that, given our discretization (see below), the
relation between Φi,j and its neighbors allows us to extract it explicitly
without requiring the solution of a local nonlinear problem. That is, at each
grid-point, (i, j), each term in the discretized (25) can be split in the form
21
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Af ree +Φi,j Abound , where Af ree and Abound are independent of Φi,j . We next
describe the discretizations of each of the terms in this form.
22
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
Acknowledgement
This research was partly supported by Technion V.P.R. Fund - D. Barsky
Fund for Optics Research Fund
References
[1] V. Caselles, R. Kimmel, and G. Sapiro. Geodesic active contours. IJCV,
22(1):61–79, 1997.
23
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
[11] D. Adalsteinsson and J. Sethian. A fast level set method for propagating
interfaces. J. Comput. Phys, 118:269–277, 1995.
24
Technion - Computer Science Department - Technical Report CIS-2004-06 - 2004
25