0% found this document useful (0 votes)
10 views8 pages

Initialisation and Termination of Active Contour Level-Set Evolutions

Uploaded by

aqsahussain272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

Initialisation and Termination of Active Contour Level-Set Evolutions

Uploaded by

aqsahussain272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Initialisation and Termination of Active Contour Level-Set Evolutions

Martin Weber Andrew Blake Roberto Cipolla

Department of Engineering Microsoft Research Department of Engineering


University of Cambridge 7 J J Thomson Ave University of Cambridge
Cambridge CB2 1PZ Cambridge CB3 0FB, UK Cambridge CB2 1PZ
[email protected] [email protected]

Abstract interface and to use gradient descent in order to minimise the


cost.
This paper deals with the evolution control of level-sets in Level set-methods [11] introduce a level-set function1 
the context of contour detection. There is a considerable to represent the interface implicitly as zero level-set:
amount of existing work on PDEs for geodesic contour de-
tection and the investigation of level-set implementations has :=  1 (0) (1.1)
recently resulted in efficient and stable numerical realisa-
The implicit representation links  (as the introduced an-
tions of the differential evolution. This paper is based on
alytic entity) with the geometric entity and allows for
a finite element implementation for signed distance level-set
changes in the topology during the evolution. Furthermore,
evolutions and focuses the attention to the initialisation and
this relationship can be made one to one by imposing the
termination of level-set evolutions. An initialisation consists
signed distance constraint [7, 12].
of an initial signed distance function which corresponds to
By the implicit description, is determined by  and the
some implicit curve. We discuss two types of initialisation.
cost can be viewed as functional C (). Introducing an evo-
We generalise the commonly used a priori type, which can
lution parameter t, we write u(x; t) = (x) for the level-
be a rectangle the size of the image, to include more general
set function at ’time’ t. In this way, the gradient descent
initial shapes. We show that the initial shape does not have
equation for u(x; t) becomes a partial differential equation
to be closed and can for instance be a single line. The sec-
(PDE) that controls the velocity of the current interface with
ond type of initialisations is not specified by the user but a
the objective to minimise C :
result of previous level-set evolutions. This type of initiali-
dt =
sation is useful when different evolution equations are to be du ÆC
Æu (1.2)
alternated and can be used for instance to detect nested con-
tours or in multi-resolution techniques. For the termination The numerical realisation of the evolution has been dis-
of a geodesic evolution, we introduce an automatic stopping cussed intensively [11, 7, 9, 12] and we adopt here a novel
condition by looking at the Riemannian length of the implicit representation in [12] which uses a sparse dynamic finite ele-
curve as the quantity that is subject to the minimisation. It ment complex [15] to represent and evolve the level-set func-
turns out that the length can be computed efficiently from the tion. Using the signed distance constraint, one has the fol-
employed finite element representation and used to terminate lowing simple expressions for the key geometric quantities
the gradient descent. (normal N 2 S 1 and curvature ):

N = ru (1.3)
1 Introduction  = r2 u (1.4)

Level-set methods have become powerful tools for many ge- In this paper we focus on the somewhat less discussed issues
ometric problems in the analysis of image data in 2D and 3D of initialising the evolution and terminating the evolution
[11, 10, 14, 5]. Level-set methods are generally useful when automatically. The non-parametric nature of level-set rep-
one has to solve an optimisation problem with respect to an resentations removes the need for manual initialisation that
interface. To that extent, one assigns a cost C ( ) to a given is required by parametric methods (e.g. B-spline snakes [3]).
interface . In this paper, we will focus on the problem of Using the geodesic contour detection as an example, we dis-
minimising a certain geodesic length in two dimensions and cuss various options for initialisation and evolution-control
write G for the cost in the geodesic case. The idea is then which are of practical use.
to compute the variation of the cost for deformations of the Section 2 is a brief review of the geodesic problem us-
ing the Riemannian length as cost function which we use
 Supported by the EPSRC, the Cambridge European Trust and the
DAAD (Germany) 1  is a continuous, real valued function
throughout the paper. Various options for initialising level-  The formulation as Riemannian length minimisation
set functions are then introduced in Section 3. Section 4 problem implies that the contour localisation deviates
on automatic termination completes the theoretical introduc- from the ‘true edge location’ and lies slightly inside
tion. This is followed by sections on results (Section 5) and convex areas and outside concave areas. The balloon
conclusions (Section 6). force can be used to adjust the location of the con-
tour, provided the object’s curvature is known approxi-
mately. In fact this is one of the original motivations for
2 Geodesic Active Contours adding the term [4, 6].
It has been known for some time [2, 8, 10] that the problem
of contour detection can be cast into the problem of min- 3 Initialisation of Level-Set Evolu-
imising a Riemannian length functional that is induced by
the image. tions
In order to define the cost functional, one starts by intro-
ducing a local measure for edges g (with g (x) 2 [0; 1℄). A
The initialisation of level-set evolutions requires an initial
level-set function. By demanding the signed distance con-
simple example2 is given by [8, 10]:
straint, one can equivalently prescribe an initial orientated
1
g := (2.1) closed curve (or collections of simple closed curves) that
1 + a jrI j2 does not self-intersect. This uses the fact that implicit curves
where I is the image smoothed with a Gaussian of scale are in one-to-one correspondence to signed distance func-
parameter  and a is a sensitivity constant to image contrast. tions [7].
Interpreting g as Riemannian metric for the image, we can In this section we discuss two sources of initialisation:
see that we are using the Euclidean length measure in the The first one embarks on a priori knowledge and can be used
absence of edges (g  1) but use a smaller length-measure to initialise evolutions independent of any previous evolu-
in areas of large gradient values. tion. The second initialisation is indirect in that it relies on
The global cost associated with is the Riemannian previous evolutions. The termination criteria of Section 4
length: is of particular relevance to the indirect case (Section 3.2)
Z where the end of one evolution starts a secondary evolution.
G( ) = g (2.2)

where the standard Lebesgue measure is used to integrate the 3.1 Direct Initialisation
function g over .
In the most important example, the initial curve consist of
The velocity function which asymptotically minimises
the outline of an image and reflects the assumption that the
G can be shown to be [8, 10]: objects of interest are fully contained in the image. However,
 
= div g jr1uj ru + g (2.3) we discuss more general options and demonstrate in partic-
ular the case of a single infinite line that allows us to capture
where is the coefficient of the so-called “balloon force” [8, non-closed contours such as sky-lines.
10]. We derive (2.3) in Appendix A for the signed distance A rich set of signed distance function initialisations can
case:  be obtained by transforming and combining two very basic
= hrg; rui + g r2 u + (2.4) distance functions, the ones corresponding to a point and a
and refer to [8] for the connection to parametric snakes that line.
has been discussed in the literature. The numerical imple-
mentation of (2.4) for the finite element representation has 3.1.1 Elementary and Transformed Shapes
been recently introduced in [12].
We define the signed distance functions of a point and a line:
The “balloon force” term does not arise from the cost min-
imisation but is useful in certain situations: point (x) := jxj (3.1)
 It can be used to accelerate the convergence since it line (x) := hN; xi (3.2)
adds a velocity to the interface motion in the ab-
sence of any edges (g  1) and vanishes at ideal edges where N 2 S denotes the ‘outward’ normal of the region
1
(g  0). separated by the line. More interesting examples can be
formed by transforming the space ( R2 ) and the levels:
 There are applications where the cost functional is lo-
cally flat (e.g. sky-line initialisation of Figures 5 and  Spatial Transformations: Signed distance functions
6). Here the “balloon force” is vital to drive the evolu- are symmetric under the Special Euclidean Group
tion towards the desired minimum (and can be turned SE(R2 ) and scaling: If  is a signed distance map,
off subsequently to refine the contour). – (x) := (x T ) is the signed distance map cor-
2 Further examples are known in the context of diffusion filtering [13]. responding to a translation T 2 R2 of the shape.
– (x) := (Rt x) is the signed distance map cor- suggested in [12] for nested contour detection: The gen-
responding to a rotation (with fixed origin) by eral strategy is use the knowledge of a detected local
R 2 SO(2) of the shape. minimum to drive the subsequent evolution into a dif-
– (x) := s ( 1s x) is the signed distance map cor- ferent local minimum. The idea is to use two different
responding to a scaling of the shape by a factor Riemannian metrics as illustrated in Figure 1: The ini-
s 2 R. tial interface
R 0 is first attracted to the local minima 1
of G = g . Subsequently, the evolution with a modi-
 Level Transformations: Signed distance functions are fied cost G  = R g is used to move the interface beyond
symmetric under shift and inversion of levels: If  is a the already detected minima. Where the detected inter-
signed distance map, face 1 is used to define g:

– (x) := (x) d is the signed distance map cor- g(x) =
1 g (x) if 1 (x) < 0 (3.3)
responding to an expansion of the shape’s interior 1 else
by a distance d in normal direction.
– (x) := (x) is the signed distance map corre-  Global distance to contour map: The numerical rep-
resentation is, for computational efficiency, restricted to
sponding to the same shape but with an inversion
the vicinity of the interface . However, once the inter-
of inside and outside (complement).
face is located, one can use a subsequent evolution with
By applying this transformations to the point and line, one constant normal speed ( = 1) to obtain the global con-
obtains general (infinite) lines and general circles. The use tinuation of the signed distance map (see Figure 7).
of a single line as initial shape is illustrated in Figures 5 and
6.
 Multi-resolution techniques: In the finite element rep-
resentation used, it is natural to consider refinements of
elements (Figure 2). Using initially a coarser resolution
3.1.2 Combining Shapes speeds up the convergence which is relevant for time
Implicit shapes can be combined (union and intersection) by critical applications (e.g. tracking). In this paper we re-
corresponding min/max operations on the distance functions. strict ourselves to consider techniques that change the
Applying the transformations of the previous section to com- resolution for the entire domain. More sophisticated
bined shapes, one can generate a manifold of further initiali- adaptive methods are also possible where one can use
sation shapes. the curvature  to drive a sub-division process.
Γ1
If 1 and 2 are signed distance maps,
 Union: (x) := min(1 (x); 2 (x)) corresponds to
g 1−g
the union of the interiors described by 1 and 2 .

1−g
Intersection: (x) := max(1 (x); 2 (x)) corre- g
sponds to the intersection of the interiors described by
1 and 2 . g
1−g

g 1
When combined with the level-inversion, this means that
we can implicitly perform all usual operations that are known
from set-theory on our shapes (complement, subtraction,
union, intersection). Figure 1: Modification of the Riemannian Metric for the
In particular, we can now easily obtain signed distance Detection of General Local Minima: The original metric
functions of arbitrary closed polygons. For instance, we can g (left) leads initially to the detection of contour 1 and is
obtain the outline of an image by intersecting the four lines replaced temporarily by g (right) to move the interface away
of the image-borders (with normals pointing away from the from the already detected minimum.
image region).

3.2 Indirect Initialisation


4 Evolution Control and Termination
Indirect initialisations are useful when an evolution is to be
based on the result of a previous related - but different - evo- of Level-Set Evolutions
lution. Examples of this case are given by:
We analyse the convergence behaviour of level-set evolu-
 Detection of all local minima: A general problem of tions in the case where the evolution is derived from a cost
the minimisation problem lies in the fact that a single functional C . For instance, as was pointed out in Section 2,
evolution will only detect one of the possibly many lo- the Riemannian length G is the cost for the geodesic contour
cal minima. However, we can follow a scheme that was detection.
u2 u2 u2

u0 u1 u0 u1 u0 u1

Figure 3: Element Nodes: Three relevant examples of active


Figure 2: Element Sub-division for Resolution Refine- elements. Each element of the complex is a standard simplex
ment: The original element (left) is sub-divided into four and u0 ; u1 ; u2 denote the node values of the function u. The
triangles to double the resolution (right). The level-set func- zero level-set of u is indicated (red line) for each example.
tion of the sub-divided elements is initialised to agree with For the element on the left, the sign of uk with k = 0 differs
the original function. This is possible because any coarse from the signs of the other node values. Similarly, for the
scale polynomial yields a polynomial of the same degree in elements in the middle k = 1 and on the right k = 2.
the refined elements.

We assume in the following, that one can evaluate the cost p


uk (u1 u0 )2 + (u2 u0 )2
functional and its derivative during the evolution.3 We show L1 (U ) = Q (4.4)
in Section 4.1 how to compute the Riemannian length nu- i6=k (ui uk )
merically and will use this information to terminate the gra- X2
dient descent (1.2). Lg (U ) = L1 (U ) y (k) i gi (4.5)
We first investigate the differential changes in the cost in- i=0
duced by the evolution. From Appendix A, (A.6) we obtain
where L1 denotes the Euclidean and Lg the Riemannian
lengths and where we have used y (k) i defined by
the following result for the geodesic case: for small defor-
mations v of the level-set function u, the changes in cost G
1 uk
y (k) i := for i 6= k
are given by:
Z (4.6)
2 uk ui
G(u + v ) G(u)  v X
y (k)
(4.1)
i = 1
i
where we have written (u) = u 1 (0) for the zero level-set.
In particular, pursuing the steepest descent v = t (with
4.2 Termination Condition
time step t) results in
Z Evaluating the cost functional during the evolution enables
G  t 2 = t jj jj2 2
L( ) (4.2) us to define a function (t) := C (u(t)) which is expected
to become stationary when a local minimum is approached
or
dt = jj jjL2( )
dG 2 (Figure 4). Note that we have shown in Section 4.1 how the
(4.3) cost can be computed for 1st order elements without hav-
ing to introduce any approximation. Theoretically, (t) de-
4.1 Measuring Zero Level-Sets: Length in creases indefinitely and will not become stationary at finite
Euclidean and Riemannian Sense time. However, due to the finite numerical accuracy, c(t)
stays monotonous until the finite numerical accuracy leads
The aim of this section is to compute the length of a zero to a slight fluctuation. We use this limited numerical accu-
level-set (or individual loop-components of it). The novel racy to stop the evolution.
finite element representation [12] proves useful by defining
the level-set unambiguously inside each active element. For
simplicity, we resrict the explicit computations of this sec- 5 Results
tion to the case of first order elements where we can perform
all necessary computations without approximation. Figures 5, 6, 7, 8 and 9 show experimental results obtained
The Riemannian length can be expressed directly in terms with the first order elements of [12].
of the node-values and the result for individual elements can The use of a direct initialisation from a single line (see
be summarised as follows (proof omitted here). Using the Section 3.1) is demonstrated in Figures 5 and 6. Figure 7
notation of [12] (see Figure 3) k 2 f0; 1; 2g denotes the in- demonstrates the use of a user-specified initialisation (here
dex such that the sign of uk is different from the (equal) sign a circle) in order to obtain the desired contour in an image
of the two other coefficients. We then obtain the following with a complex background.
expressions for the length of the zero level-set in the element: Applications of indirect initialisations are shown in Fig-
3 The method can also be applied to evolutions where the cost is not ex- ures 7, 8 and 9: in Figure 7 the global signed map is obtained
R 2
plicitly known by using equation (4.3): The integral can be computed by using the contour as initial curve for a constant speed evo-
similar to the Riemannian length integral for 1st order elements. lution (see Section 3.2). Figure 8 demonstrates the detection
Riemannian Length Evaluation
900
G(t)
800
700
G [element units]

600
500
400
300
200
100
0
0 20 40 60 80 100 120 140 160 180
t

Figure 4: Geodesic Length Evaluation: The diagram


shows the numerically computed values for the Riemannian
length during (the first part of) the evolution from Figure 8.

of nested contours (see Section 3.2) and Figure 9 shows how


an initially coarse contour can be used for a fast contour de-
tection by initialising a refined evolution in the vicinity of
the local minimum.

6 Conclusion and Future Work


We have presented methods to initialise and terminate level-
set evolutions in 2D. Our investigation adds further practical
advantages to the use of level-set methods in delivering tools
towards user-input free methods. Figure 5: Sky-line Example: Initialisaton of a single line
We exploited the correspondence between implicit curves along the top of an image can be used to detect non-closed
and signed-distance constrained level-set functions for the contours such as a ‘sky-line’. The top part shows the initial
initialisation. Two types of sources for initial level-set func- curve and the bottom part the converged curve. A value of
tions were presented: While the direct initialisation is based = 0:5 was used for the ‘balloon force’.
on geometric shapes (e.g. polygons), the indirect initialisa-
tion uses signed-distance level-sets of previous evolutions as
starting point. The use of indirect initialisations was demon-
strated in the examples of global signed distance map com-
putation, nested contour detection and multi-resolution tech-
niques.
We introduced a numerical condition to terminate level-set
evolutions when convergence to local minima is achieved.
The paper demonstrates how the numerical method (adopted
from [12]) allows for a direct computation of the Riemannian
length which is used to determine the point of convergence.
Future work is concerned with
 Investigation of methods to automatically suggest val-
ues of the parameters of the metric ( ; a) from the im-
age.
 Applications to more general metrics (such as the ones
suggested in [6, 9]).
Figure 6: Sky-line Example: Contour detection with a sin-
 3-dimensional implementation and evolution control gle line along the top as initialisation.
for geodesic implicit surface detection.
Figure 7: Cycling Fish Sculpture: The image on the top-left shows the original image with a user-selected circle as initial
level-set. A negative ‘inflating’ balloon-force is used to drive the evolution towards normalised colour edges and the result
of the evolution is displayed on the top-right. Applications based on the obtained contour are displayed in the bottom row
of the figure: the bottom-left shows the implied segmentation (by drawing all pixels for which the level-set function is
negative) and the bottom-right indicates the levels of the global signed distance map (with a spacing of 8 element units and
the zero level-set coloured in red).
Figure 9: Multi-Resolution Example: The spatial resolu-
tion of the level-set evolution is increased by a factor of 2 in
each of the following steps. The trivial initialisation (image
outline) leads with a coarse resolution version of the algo-
rithm to the contour displayed on the left. The approxima-
tive contour is then used to initialise a refined evolution by
sub-dividing elements (see Figure 2) and the converged re-
sult (middle) is used in turn to initialise the final evolution
with the final result shown on the right.

A Derivation of the Geodesic Evolu-


tion Equation
This section gives a direct poof that of (2.4) does indeed
correspond to the gradient descent of the Riemannian length
in the case that = 0. Use of the signed distance constraint
allows us to simplify previous proofs in the literature [8].
Proposition A.1. Geodesic Evolution PDE:
Defining the Riemannian length for the zero level-set of u,
Z
G(u) := g (A.1)
u 1 (0)

we will prove that

:= hrg; rui + g r2 u (A.2)


= div(g ru)
Figure 8: Nested Contour Example: The top-left image
shows the trivial initialisation (image outline 0 ). Detection corresponds to the gradient descent which we use to min-
of the first local minimum leads to the result ( 1 ) displayed imise G.
in the top-right image. Temporary modification of the cost Proof. Before we detail the proof, we would like to point out
(see Figure 1) leads to the departure ( 2 ) from the already an intuitive geometric interpretation: a change in the level-
detected contour in the bottom-left image and finally, min- set function implies a change in the interface and changes
imisation with the original cost functional leads to the detec- the length functional G. The two summands in (A.2) corre-
tion of the nested contours ( 3 ) in the bottom-right image. spond to two independent causes for such a change. The first
term (hrg; rui) accounts for the fact that as u changes, the
evaluation of g has to be translated to the new position of the
interface (i.e. moved in normal direction ru). Note that the
first term vanishes in the case of a constant metric such as the
Euclidean metric. The second term ( g r2 u) corresponds to
the change in length of the interface assuming that g remains
constant under the deformation (the first term accounts for References
the transport of g ). The change in length is proportional to
the curvature  = r2 u and can be understood intuitively by [1] M. Berger and B. Gostiaux. Differential Geometry:
looking at a circular interface of radius r: While the transla- Manifolds, Curves and Surfaces. Springer, 1987.
tion of a line in normal direction does not change its length,
[2] V. Caselles, R. Kimmel, and G. Sapiro. Geodesic active
the (proportional) length of a circle changes under normal
contours. In Proc. IEEE Int. Conf. on Computer Vision,
motion proportional to  = r1 .
pages 694–699, 1995.
For the proof, consider the change in the length functional
G when the zero level-set of u is deformed in normal di- [3] R. Cipolla and A. Blake. The dynamic analysis of ap-
rection (u ! u + v ). If v : R2 ! R; x 7! v (x) denotes the parent contours. In Proc. IEEE Int. Conf. on Computer
change in the level-set function, the deformation transforms Vision, pages 616–623, 1990.
an original level-set location x into y = T (x), where
[4] L.D. Cohen. On active contour models and bal-
T : R2 ! R2 ; x 7! y = x v (x) ru(x) (A.3) loons. Computer Vision, Graphics and Image Process-
ing (CVGIP), 53(2):211–218, March 1991.
and where we have assumed signed distance representation
(hence jruj = 1). [5] O. D. Faugeras and R. Keriven. Complete dense stere-
We will now assume that the zero level-set consists of a ovision using level set methods. In Proc. European
single loop so that we can use a simple parametrisation for Conf. on Computer Vision, LNCS 1406, pages 379–
the proof. The general case follows then by summation over 393. Springer–Verlag, 1998.
individual loops and requires some additional thoughts in the [6] R. Goldenberg, R. Kimmel, E. Rivlin, and M. Rudzsky.
case of topological changes which we omit here. Let := Fast geodesic active contours. IEEE Trans. Image Pro-
u 1 (0) be parametrised by its Euclidean arc-length on the cessing, 10(10):1467–1475, October 2001.
interval I = [0; L1 (u)℄. We then have
Z [7] J. Gomes and O.D. Faugeras. Reconciling distance
G(u) = ds (s)j g (x(s)) ds
j dx (A.4) functions and level sets. Journal of Visual Communi-
I cation and Image Representation, 11(2):209–223, June
2000.
For the change in Riemannian length, we can write4 :
[8] R. Kimmel. Curve Evolution on Surfaces. PhD thesis,
Dept. of Electrical Engineering, Technion, Israel, 1995.
G(u + v ) G(u)
Z h i [9] N. Paragios. Geodesic Active Regions and Level Set
= j dy
ds (s)j g (y (s)) j dx
ds (s)j g (x(s)) ds Methods: Contributions and Applications in Artificial
ZI Vision. PhD thesis, INRIA Sophia Antipolis, France,
 
 v Æ
j
Æv v=0
d
ds (x v ru(x)) g (x v ru(x)) ds January 2000.
I
Z
 
v (x) g (x) r2 u(x) + hrg (x); ru(x)i ds
[10] G. Sapiro. Geometric Partial Differential Equations
= and Image Processing. Cambridge University Press,
ZI 2001.
= v (x) (x) ds (A.5)
I [11] J.A. Sethian. Level Set Methods. Cambridge University
Press, Cambridge, 1999.
here the second last step follows from the product rule to-
gether with j dx
ds j = 1 from [12] M. Weber, A. Blake, and R. Cipolla. An efficient and

(g (x v ru)) = hrg; rui


Æ
stable level-set method for active contours. CUED/F-
Æv INFENG/TR 452, Department of Engineering, Univer-
and sity of Cambridge, March 2003.
 
Æ
j
Æv v=0
d
ds
(x v ru(x)) = r2 u
dx dN
ds ; ds
= =
[13] J. Weickert, B.M. ter Haar Romeny, and M.A.
Viergever. Efficient and reliable schemes for nonlin-
(Gauss map [1]) where we have used the fact that N = ru ear diffusion filtering. IEEE Trans. Image Processing,
is the normal of the interface. (A.5) means that 7(3):398–410, March 1998.

ÆG
Æu = (A.6) [14] A.J. Yezzi and S. Soatto. Stereoscopic segmentation.
In Proc. IEEE Int. Conf. on Computer Vision, volume I,
and hence is the steepest decent in the space of normal pages 56–66, 2001.
deformations (and vanishes at local minima of G).
[15] O.C. Zienkiewicz and K. Morgan. Finite Elements &
4 We have assumed that v is sufficiently small so that no self-intersections Approximation. John Wiley & Sons, NY, 1983.
occur. This is justified since we are looking at the infinitesimal case here.

You might also like