dynamic by treating x as a function of time t and length of the curve s, i.e. x(s, t). Then, the partial derivative of x with respect
to t is set equal to the left hand side of Eq. (5) as follows:
x
t
ðs; tÞ¼
a
x
00
ðs; tÞbx
0000
ðs; tÞ
r
E
ext
ð7Þ
When the solution x(s, t) becomes stable, the term x
t
(s, t) vanishes and we will get a solution to Eq. (5). A solution to Eq.
(7) can be found by discretizing the equation and solving the discrete system iteratively.
2.2. Gradient vector flow
As the traditional snake model is difficult to determine the contours of the initial position and to deal with convergence
problem [23,24]. Xu proposed a new snake model [25]. The snake is developed based on new type of external field, called
Gradient Vector Flow, or GVF. Assuming f(x, y) is the contour image of a grayscale image I(x, y), then
rf is the vector field.
If
rf is diffused iteratively to the edge of image, it will form a gradient vector flow field i.e. GVF. The external force term
rE
ext
(x(s)) in Eq. (5) is replaced with a GVF field
v
(x, y)=(u(x, y),
v
(x, y)), which minimizes the following energy function,
E ¼
ZZ
l
u
2
x
þ u
2
y
þ
v
2
x
þ
v
2
y
þj
r
f j
2
j
v
r
f jdxdy ð8Þ
The parameter
l
is the regularization parameter, which is set according to the image noise. The parameter
l
governs the
tradeoff between the first term and the second term of the energy function. r represents a gradient operator, and f(x, y)is
the edge map derived from the image I(x, y). When
rf is large, the energy is mainly depends on the second term of the integrand.
When
rf is small, the curve is away from the object, the partial derivatives dominate the energy function. Energy minimization is
achieved by iterative approximation to the object edge, and the GVF can be found by solving the following Euler equations:
l
r
2
u ðu f
x
Þ f
2
x
þ f
2
y
¼ 0
l
r
2
v
ð
v
f
y
Þ f
2
x
þ f
2
y
¼ 0
8
>
<
>
:
ð9Þ
where r
2
u and r
2
v
are the diffusion terms of Laplacian, and are isotropic operators with heavy smoothness. Moreover,
l
controls the degree of smoothness and should be set according to the noise level in the image (larger
l
for more noises).
(u f
x
) and (
v
f
y
) are fidelity terms, and f
2
x
þ f
2
y
is the coefficient of them, which gets the maximum value in edge regions
and becomes zero in homogeneous regions. Eq. (9) can be solved by treating u and
v
as the function of time t.
u
t
ðx; y; tÞ¼
l
r
2
uðx; y; tÞðuðx; y; tÞf
x
ðx; yÞÞ ðf
x
ðx; yÞ
2
þ f
y
ðx; yÞ
2
Þ
v
t
ðx; y; tÞ¼
l
r
2
v
ðx; y; tÞð
v
ðx; y; tÞf
x
ðx; yÞÞ ðf
x
ðx; yÞ
2
þ f
y
ðx; yÞ
2
Þ
(
ð10Þ
After the computation of
v
(x, y), we replace the potential force rE
ext
in the dynamic snake equation of Eq. (7) by
v
(x, y),
which yielding
x
t
ðs; tÞ¼
a
x
00
ðs; tÞbx
0000
ðs; tÞ
v
ð11Þ
Solving the above dynamic equation, a GVF snake can be obtained. Although the diffusion operation extends the capture
range and creates forces pull active contours into concave regions. GVF snake cannot solve the weak boundary leaking prob-
lem and blurs the boundary of the object.
GVF outperforms the external forces by providing a large capture range and the ability to capture boundary concavities.
Because the GVF forces are derived from a diffusion operation, they tend to extend very far away from the object. This
extends the capture range so that the snakes can find objects that are quite far away from the snake’s initial position. This
same diffusion creates forces which can pull active contours into concave regions in quite a few occasions.
However, GVF snake cannot solve the weak boundary leaking problem and blurs the boundary of the object. In more
detail, the main drawbacks exist as:
(1) The traditional diffusion operation causes the loss of the details around the image edge, especially when the boundary
is weak, over-smoothing will make the GVF around weak boundary creates wrong direction then the snake will leak
around this part.
(2) When the coefficient ðf
2
x
þ f
2
y
Þ of the fidelity term arrives at its maximum at the edge, the over recovery of the
smoothed image gradient will cause the edge enhancement and edge shifting, which weaken GVF snake’s ability to
converge into concave region.
3. Proposed GVF snake model
The solutions to the above two intrinsic problems are highly desirable for GVF snakes. In this section, we describe our
improved GVF snake model thoroughly. Based on the analysis above, the GVF snake has the weak boundary leaking and
blurry boundary problems. To solve these problems, the suppression of the diffusion around the edge and the enhancement
176 S. Zhu et al. / Computers and Electrical Engineering 40 (2014) 174–185