An Active Contour Model with Improved Shape Priors
using Fourier Descriptors
Fareed Ahmed
1
, Huu Dien Khue Le
1,2
, Julien Olivier
2,1
and Romuald Boné
2,1
1
Laboratoire d’Informatique, Université François–Rabelais, Tours, France
2
École Nationale d’Ingénieurs du Val de Loire, Blois, France
Keywords:
Active Contours, Deformable Models, Shape Prior, Fourier Descriptors, Invariants.
Abstract:
Snakes or active contours are widely used for image segmentation. There are many different implementations
of snakes. No matter which implementation is being employed, the segmentation results suffer greatly in
presence of occlusions, noise, concavities or abnormal modification of shape. If some prior knowledge about
the shape of the object is available, then its addition to an existing model can greatly improve the segmentation
results. In this work inclusion of such shape constraints for explicit active contours is presented. These
shape priors are introduced through the use of Fourier based descriptors which makes them invariant to the
translation, scaling and rotation factors and enables the deformable model to converge towards the prior shape
even in the presence of occlusion and context noise. These shape constraints have been computed in descriptor
space so no reconstruction is required. Experimental results clearly indicate that the inclusion of these shape
priors greatly improved the segmentation results in comparison with the original snake model.
1 INTRODUCTION
Active contours method was first introduced by (Kass
et al., 1988). These methods can generally be bi-
furcated into explicit (or parametric) active contours
(Kass et al., 1988) and implicit (or level set) meth-
ods (Caselles et al., 1995). In explicit methods a de-
formable model is represented by a set of connected
points that evolve dynamically to finally settle on con-
tours in the image. However, such models are unable
to automatically adapt to sudden topological changes.
On the other hand, implicit active contours intrinsi-
cally adapts to any topology changes.
So far, many improvements have been proposed
for parametric active contours: (Cohen and Co-
hen, 1991), (Williams and Shah, 1992) and (Xu and
Prince, 1998).
Even with these improvements the segmentation
results become highly inaccurate in the presence of
occlusions, noise, object overlapping and extrusions.
To address these issues and improve the segmentation
results, the need for inclusion of some shape prior in-
formation in the segmentation process becomes indis-
pensable. Some efforts have already been made in this
regard with diffusion snakes(Cremers et al., 2002) and
Affine invariant eigen snakes (Xue et al., 2002). Such
template matching schemes however, are sensitive to
the initialization of deformable template.
Fourier based shape descriptors provide quite an
efficient and powerful way of contour representation.
Although such a representation can be particularly
useful in the context of explicit active contours with
shape priors, not much work has been done in this
context. One such study proposes the representation
of shape priors by elliptical Fourier descriptors (Staib
and Duncan, 1992). However, this method is too sen-
sitive to parameters and initialization must be done
very close to the goal shape to achieve the desired
result. Most recently Fourier based geometric shape
priors were used with the variational setup for snakes
(Charmi et al., 2008). The limit of this method is that
it is not invariant to the starting point and needs the
reconstruction of template and deformable contours.
In this paper, an improved version of snakes with
Fourier based shape priors is presented. A more stable
greedy implementation of snakes as well as a robust
set of invariant Fourier descriptors are used for repre-
sentation of active contours. More importantly, unlike
the previous work, the shape matching is performed
directly in the Fourier descriptor space rather than in
the spatial domain, so there is no need for reconstruc-
tion of contours. Moreover, a solution for automatic
starting point invariance is presented to make the pro-
posed method more robust and efficient.
472
Ahmed F., Le H., Olivier J. and Boné R..
An Active Contour Model with Improved Shape Priors using Fourier Descriptors.
DOI: 10.5220/0004299504720476
In Proceedings of the International Conference on Computer Vision Theory and Applications (VISAPP-2013), pages 472-476
ISBN: 978-989-8565-47-1
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
This paper is organized as follows: section 2 pro-
vides an overview of the greedy approach. In sec-
tion 3, the invariant Fourier descriptors are intro-
duced. Section 4 presents our main contribution re-
garding the integration of Fourier based shape priors
in active contour model. In section 5, experimental re-
sults are presented. Finally, in section 6, conclusions
and perspectives are presented.
2 REVIEW OF GREEDY SNAKES
The greedy algorithm (Williams and Shah, 1992) was
chosen because, inclusion of additional energy term
is quite intuitive in such a setup. Similarly, curve rep-
resentation is well suited for embedding shape based
constraints. This method is also stable and being an it-
erative approach, the solution is guaranteed. In greedy
approach an initial contour is defined as a discrete
closed curve with n vertices. A discrete energy func-
tional is then defined as the sum of energies associ-
ated with each vertex in a given window of fixed size
w. The goal is to minimize this functional to achieve
the target segmentation. The equation for this discrete
energy functional at each pixel ˜p
i
w is given by
E( ˜p
i
) = E
int
( ˜p
i
) + E
ext
( ˜p
i
) (1)
where E
int
( ˜p
i
) and E
ext
( ˜p
i
) are the discrete energy
functional for internal and external energies.In order
to improve the convergence of active contour towards
the desired boundary, a distance transform (Fabbri
et al., 2008) based energy term has been used.Our
Distance Transform based external energy term is
given by E
dt
( ˜p
i
) = DT ( ˜p
i
), where DT(.) is the dis-
tance transform matrix.
In this work,for internal energy continuity and cur-
vature we have used the energy terms as proposed by
(Williams and Shah, 1992), while for balloon energy
a greedy derivation proposed by (Mille et al., 2006)
has been used.
Finally, the equation for a discrete energy func-
tional incorporating all these energy terms, along with
their associated weights(α, β,γ and δ) is respectively
given by
E = αE
cont
+ βE
curv
+ γE
ball
+ δE
dt
(2)
3 FOURIER BASED INVARIANTS
The Discrete Fourier Transform (DFT) of z
i
= x
i
+ j ·
y
i
is given by a set of Fourier coefficients as proposed
by (Charmi et al., 2008) and (Bartolini et al., 2005)
Z
k
=
n1
i=0
z
i
e
j
2πik
n
for k =
n
2
,.. . ,
n
2
1 (3)
The above DFT can also be represented as Z
k
=
R
k
e
jθ
k
, where R
k
is known as amplitude and θ
k
as
phase. The normalized descriptors
ˆ
Z
k
=
ˆ
R
m
e
j
ˆ
θ
m
,k =
n
2
,.. . ,
n
2
1 (4)
having the following properties are translation, scale
and rotation-invariant, as proved by (Bartolini et al.,
2005):
ˆ
Z
0
= 0,
ˆ
R
k
=
R
k
R
1
and
ˆ
θ
k
= θ
k
θ
1
(k 6= 0) (5)
From this set of invariants, we can reconstruct the
(normalized) shape using the Inverse Discrete Fourier
Transform (iDFT):
ˆz
i
=
1
n
n/21
k=n/2
ˆ
Z
k
e
j
2πik
n
for i = 0, 1,... ,n 1 (6)
4 EMBEDDING SHAPE PRIORS
4.1 Shape Prior Energy
To introduce shape prior information, a prior energy
term is added to the energy functional of the snake.
Let C
ref
be a template contour describing a shape.
This contour has n vertices v
ref
i
= (x
ref
i
,y
ref
i
) (i =
0,1,. . .,n 1) (practically, n is chosen depending on
the complexity of the shape). Now for a contour C
having the same size, v
i
= (x
i
,y
i
) (i = 0,1,. ..,n 1),
the prior term has to constrain it to evolve to a shape
similar to the given template.
As described in the previous section, the recon-
structed shapes
ˆ
C
ref
and
ˆ
C can be obtained using the
normalized Fourier descriptors. The prior energy can
then be defined as the distance between
ˆ
C
ref
and
ˆ
C.
Let D(a, b) denote the distance (in general) between
a and b. Then, the shape prior energy of a snake C
regarding a reference shape C
ref
can be defined as
E
prior
(C) = D(
ˆ
C,
ˆ
C
ref
) (7)
For integrating this energy into the discrete energy
functional of the snake, we need its discrete form. For
a neighboring pixel ˜p
i
of a vertex v
i
(i = 0, 1,... ,n
1), a new curve C
i
is considered by replacing the ver-
tex v
i
by ˜p
i
. The shape prior energy of the pixel ˜p
i
is
then defined as
E
prior
( ˜p
i
) = D(
ˆ
C
i
,
ˆ
C
ref
) (8)
Although the greedy algorithm is known for its
rapidity, the integration of such distance calculation
decreases its performance significantly. Indeed, at
each iteration of the algorithm, for every vertex of the
AnActiveContourModelwithImprovedShapePriorsusingFourierDescriptors
473
snake, the DFT and iDFT are performed for all of the
neighboring pixels.
Fortunately, by using the Euclidean distance met-
ric, we can avoid performing the iDFT as proposed
by (Bartolini et al., 2005). if
ˆ
Z
k
and
ˆ
Z
ref
k
denote the
normalized descriptors of the snake and the reference
shape, then, the shape prior energy term can be rewrit-
ten only in terms of DFTs and entirely calculated in
the Fourier descriptor space as follows.
E
prior
(C) =
v
u
u
t
n/21
k=n/2
|
ˆ
Z
k
ˆ
Z
ref
k
|
2
(9)
4.2 Snake’s Evolution with Shape Prior
To evolve the snake under shape prior energy the fol-
lowing strategy is adopted:
In the beginning, the shape prior weight is kept
very small as compared to the other weights, so that
the snake can evolve freely from (or under little effect
of) the shape prior constraint. This will allow it to
capture parts of the object’s contour.
Once the snake has some information about the
object, the prior weight is then allowed to increase
gradually. Thus, the weight parameters are remodeled
as a function of time that may vary dynamically. In
particular, it suffice to define the prior weight (i.e. ζ)
as a strictly increasing function of time (t) : ζ(t) = k·t
(k > 0) and the others as constants. A threshold value
ζ
max
is set as well:
ζ(t) =
(
k · t if k ·t ζ
max
ζ
max
if k · t > ζ
max
(10)
Finally, the energy functional can be rewritten as
E = αE
cont
+βE
curv
+γE
ball
+δE
dt
+ζ(t)E
prior
(11)
There remains a problem with the Euclidean dis-
tance as it introduces a difference in phase between
the constructed shape of the snake and the one of the
reference shape.
To overcome this problem, we propose to mini-
mize this phase difference. As the descriptors used
are not starting point-invariant, it is obvious that any
change in the starting point of the snake, will produce
a change in the phase of the constructed shape. This
leads us to the idea of shifting the starting point to the
point for which the phase difference is minimal. This
step is called the starting point correction. We use
ED(
ˆ
C,
ˆ
C
ref
) for calculating the phase difference.
To sum up, below is the greedy algorithm of our
method.
ˆ
C and
ˆ
C
ref
are the constructed shape of the
snake and the reference shape, respectively.
1. For each vertex v
i
of the snake, search its neigh-
borhood to find the location that minimizes the en-
ergy functional. Move v
i
to that location.
2. Once 1. has finished with all the n vertices (i.e.
1 iteration), shift the starting point of the snake
to the one that minimizes the phase difference be-
tween the constructed shape of the snake and the
one of the reference shape, i.e.
ˆ
C and
ˆ
C
ref
. Update
the value of ζ(t).
3. Repeat steps 1 and 2 until only a very small frac-
tion of snake points move in an iteration.
5 EXPERIMENTAL RESULTS
In all experiments presented below, we fixed parame-
ters: α = 1,β = γ = 0,δ = 1 while, for the weight of
the prior energy ζ(t) as defined as in the equation (10)
the values of k and ζ
max
may vary for different shapes
and/or different images.
Experiments on both synthetic and real images are
performed. The results are compared with the clas-
sic snakes without any prior term and also with an-
other state of the art method using prior shape infor-
mation. Moreover, to evaluate the quality of the seg-
mentation results by our method Pratt Criterion (Pratt
et al., 1978) has been used. This gives us a quantita-
tive measure of segmentation quality with respect to a
ground truth segmentation. The higher values of Pratt
Criterion indicates more accurate segmentation with
respect to ground truth and vice versa.
In the following section the segmentations are car-
ried out on some synthetic and real images with and
without using our proposed prior based energy term.
The quality of these segmentation result, in terms of
Pratt criterion, along with prior energy parameters k
and ζ
max
are presented in Table 1.
Figure 1: Reference shapes.
Figure 2: Initial snake (Red outline) along with ground truth
(Blue outline).
It is clear that the results are more precise with
our proposed shape prior based energy term. Next,
VISAPP2013-InternationalConferenceonComputerVisionTheoryandApplications
474
Figure 3: Results without shape priors.
Figure 4: Results with our Fourier based shape priors.
(a) DBSS (b) our method
Figure 5: Results by (DBSS) method (a) and by our method
(b).
we compare our method with another state-of-the-art
method which uses the distance-based shape statistics
(DBSS) (Charpiat et al., 2007) as shape priors.
Results presented in Table 2,clearly indicates that
our method is more accurate as compared to (DBSS).
6 CONCLUSIONS
In this paper, a new model with translation, scale, ro-
tation and starting point invariant shape priors for ex-
plicit active contour has been presented. Calculation
of shape based energy was entirely performed in the
descriptors space, i.e. there is no need to reconstruct
the prior shape during evolution of active contours,
which is a gain in terms of computation time. Visual
and numerical evaluations on both synthetic and real
images have shown that our method greatly improves
the segmentation results, even in presence of occlu-
sion and incomplete shapes. In the near future, we
Table 1: Segmentation results using Pratt criterion with and
without shape priors (SP).
Image k ζ
max
Without SP With SP
Arrow 0.03 1.5 28.09 82.86
Cross 0.05 2.5 20.64 85.03
Phone 0.03 1.5 16.09 46.85
Boletus1 0.03 1.5 10.08 12.40
Boletus2 0.02 1.2 13.69 15.96
Table 2: Comparison of segmentation results.
Image DBSS Our method
Non-occluded 23.53 29.00
Occluded 12.57 13.62
would also like to test our method on medical images
and video data. The implementation for the level set
method will be considered as well.
REFERENCES
Bartolini, I., Ciaccia, P., and Patella, M. (2005). Warp: Ac-
curate retrieval of shapes using phase of fourier de-
scriptors and time warping distance. IEEE Transac-
tions on Pattern Analysis and Machine Intelligence,
27(1):142–147.
Caselles, V., Kimmel, R., and Sapiro, G. (1995). Geodesic
active contours. International Journal of Computer
Vision, 22(1):61–79.
Charmi, M. A., Derrode, S., and Ghorbel, F. (2008).
Fourier-based geometric shape prior for snakes. Pat-
tern Recognition Letters, 29(7):897–904.
Charpiat, G., Faugeras, O. D., and Keriven, R. (2007).
Shape statistics for image segmentation with prior. In
CVPR.
Cohen, L. D. and Cohen, I. (1991). Finite element methods
for active contour models and balloons for 2d and 3d
images. IEEE Transactions on Pattern Analysis and
Machine Intelligence, 15:1131–1147.
Cremers, D., Tischhäuser, F., Weickert, J., and Schnörr, C.
(2002). Diffusion snakes: Introducing statistical shape
knowledge into the mumford-shah functional. Inter-
national Journal of Computer Vision, 50(3):295–313.
Fabbri, R., Costa, L. D. F., Torelli, J. C., and Bruno, O. M.
(2008). 2d euclidean distance transform algorithms:
A comparative survey. ACM Computing Surveys,
40(1):2:1–2:44.
Kass, M., Witkin, A., and Terzopoulos, D. (1988). Snakes:
Active contour models. International Journal of Com-
puter Vision, 1(4):321–331.
Mille, J., Boné, R., Makris, P., and Cardot, H. (2006).
Greedy algorithm and physics-based method for ac-
tive contours and surfaces: A comparative study. In
ICIP, pages 1645–1648. IEEE.
Pratt, W. K., Faugeras, O. D., , and Gagalowicz, A.
(1978). Visual discrimination of stochastic texture
AnActiveContourModelwithImprovedShapePriorsusingFourierDescriptors
475
fields. IEEE Transactions on Systems, Man, and Cy-
bernetics, 8(11):796–804.
Staib, L. H. and Duncan, J. S. (1992). Boundary finding
with parametrically deformable models. IEEE Trans-
actions on Pattern Analysis and Machine Intelligence,
14(11):1061–1075.
Williams, D. J. and Shah, M. (1992). A fast algorithm for
active contours and curvature estimation. CVGIP: Im-
age Understanding, 55(1):14–26.
Xu, C. and Prince, J. L. (1998). Snakes, shapes, and gradi-
ent vector flow. IEEE Transactions on Image Process-
ing, 7(3):359–369.
Xue, Z., Li, S. Z., and Teoh, E. K. (2002). Ai-
eigensnake: an affine-invariant deformable contour
model for object matching. Image and Vision Com-
puting, 20(2):77–84.
VISAPP2013-InternationalConferenceonComputerVisionTheoryandApplications
476