You are on page 1of 5

Image Segmentation using Active Contour

with Level Set


Mandeep Kaur
Electronics & Electrical Engineering Department
Lovely Professional University, Punjab, India. 144402
kaurmandeep1190@gmail.com

Abstract – In this paper a novel algorithm for image model-based methods, edge-based technique,
segmentation has been proposed based on active region-based methods, watershed technique and
contour model and level set. In this we use the signed active contour methods.
pressure force function using local information of the
image to be segmented. First the level set function is II.ACTIVE CONTOUR MODEL
selectively penalised to be binary n then a Gaussian
kernel is applied for smoothing. Thus, this model can We have used the active contour model in oyr paper
work with heterogeneous images. In addition, by for the segmentation process. In this technique the
taking the advantages of Geodesic active contour user suggest an initial contour. This framework
(GAC) and Chan-Vese (C-V) model, the method could attempts to minimize an energy associated to the
deal with objects even with discrete blur boundaries current contour as a sum of an internal and external
and gives exact results in detecting object boundaries. energy:
One of its other advantages over C-V method is that
the cost of re initialisation is also reduced in this
method as we do not need re-initialisation of the level ∫ ¿+ E ext (2)
set function. Experimental results demonstrate that E Snake= E¿
the proposed model is effective in segmenting
biomedical images and the images with blur and weak
The external energy is supposed to be minimal
edges.
when the snake is at the object boundary position.
Keywords: Image Segmentation, Active Contours, The internal energy is supposed to be minimal
Snakes, Level Sets, GAC, C-V method. when the snake has a shape which is supposed to be
relevant considering the shape of the sought object
I.INTRODUCTION [1][2].
The basic purpose of segmentation is to identify
and isolate the region of interest from the given Different ACM approaches
image. Image segmentation is used to locate
boundaries and objects in image [1] [3][13]. In  Snakes
other words we can say that it is the process of  Geometric active contours
assigning a label to every pixel in an image such
that pixels with the same label share certain visual  Geodesic active contours
characteristics. The problem of image segmentation
A Snakes
can be formulated as follows.
Given image I = {pi}, a complete segmentation Snakes model was introduced by Michael Kass,
problem is to determine connected subset Ri = (Ri Andrew Witkin and Demetri Terzopoulos in 1988
∈ I), such that [1], for interactive interpretation of images, in
which user-imposed constraint forces guide the
i ≠ j(1) snake near features of the interesting image. They
stated that a snake is an energy-minimizing spline
¿ i Ri =I , Ri ∩ R j=φ ¿ guided by external constraint forces and influenced
Segmentation is based on homogeneity of the by image forces that pull it toward features such as
image characteristics such as intensity, colour, lines and edges. Snakes are greatly used in
texture, or the combination of all these information applications like object tracking, shape recognition,
[14]. segmentation, edge detection, stereo matching. A
There are number of different approaches in image simple elastic snake is thus defined by
segmentation such as: histogram-based method,
 a set of n points
 an internal elastic energy term
g(l) constitutes an (inverse) edge indicator. For
 an external edge based energy term example,
The snakes model try to segment the image based 1
g ( l )= (8)
on the following energy:
√|∇ l| +∈
2

∫ ¿+ E ext (3) The functional state that curves segmenting the


ESnake =E¿ object should try and surround it with a minimal
weighted arc length. This can be given a physical
2 2 interpretation: We are looking for the trajectory of a
where, ∫ α |c '| + β|c ' '| ds particle on a map, where the potential energy at
(4) each point is g(I ), and we assume the particle's
trajectory should form a closed simple curve. The
Snakes are autonomous and self-adapting in their potential energy of the particle is given by
search for a minimal energy state. They can be
easily manipulated using external image forces.
They can be made sensitive to image scale by
incorporating Gaussian smoothing in the image u (c) = - λ g (l)2 (9)
energy function. They can be used to track dynamic
objects in temporal as well as the spatial Snakes is the classical model in active contour
dimensions. But some of the drawbacks are that method [1], [3]. It gives an efficient framework for
they can often get stuck in local minima states; this image segmentation, but it cannot change the
may be overcome by using simulated annealing topology in the process of segmentation process.
techniques at the expense of longer computation To overcome this drawback, the level set method
times. They often overlook minute features in the was proposed in order to isolate shapes from their
process of minimizing the energy over the entire background. Since then, the active contour with
path of their contours. level set methods has been widely applied to image
segmentation in the fields of computer vision and
B. Geometric active contours image processing. GAC is an edge based active
contour model that works well when the objects
Geometric active contours attempt to segment an and background in segmented image are
object based on its edges, in a level-set framework heterogeneous, but we cannot get satisfied results
[4]. The initial contour is chosen to include the when dealing with object with discrete/ blur
object. The contour evolves according to boundaries or noise. Whereas Chen-Vese (C-V)
model is a region-based active contour models,
Ct =g ( l )k N (5) which instead of using the image gradient, use the
statistical information inside and outside the initial
curve to evolve the contour towards the boundary
Where g ( … … .. ) is a function which of desired object. It give better performance while
should drop to zero at edges. The contour evolution compared with the edge-based model such as the
tends to smooth the contour, if no other information ability to work well with the object having
is available. The contour according to this blur/weak boundary, and less sensitive to the initial
evolution will shrink to a point. Hence, a balloon position of the contour. In order to get the
force may be added advantages of both GAC and C-V model, some
hybrid model are proposed. Recently, Zhang [12]
g(l) proposed the sign pressure force in an active
contour model. This model takes the advantages of
(¿ ¿ k −β ) N (6) GAC and C-V models and could optionally select
C t =¿ local or global segmentation.

C. Geodesic active contours III. REFERENCE MODELS

The choice of a balloon force is arbitrary. It is not A.GAC Model


clear if we actually minimize some functional, and
the global minimizer is not clear either [5]. The Geodesic Active Contour model is an enhanced
geodesic active contour tries to remedy this by version of the classical snakes in [1]. This model
minimizing the following weighted length depends on the image gradient to stop the evolution
functional: of the curve. Thus it surpasses the regions
∫ g(l )ds(7) having blur or weak boundaries. Let Ω be a
bounded open subset of R2 and I: [0,a] x [0,b]

→ R+ be a given image. Let C(q):[0,1] →
2
R be a parameterized planar curve in Ω. The GAC ∫ I ( x ) . ( 1−H ( φ ) ) dx

model is formulated by minimising the energy term c 2 ( φ )= ❑ ,(14)
given below:
∫ ( 1−H ( φ ) ) dx

¿
EGAC (C )=∫ g (|∇ I ( C ( q ) )|)|C ' ( q )|dq ¿ 10) The corresponding variational level set formulation
for this is:
where g is the ESF. The corresponding level set
formulation for GAC is given as: ∂φ
=∂ ( φ ) [ μ ∇ к−v−λ 1 ( I −c1 )2 + λ 2 ( I −c2 )2 ] ,(15)
∂t
∂φ
=g ( к+ α )|∇ φ|+ ∇ g . ∇ φ(11)
∂t where μ ≥0, v ≥ 0, λ1 >0, λ2 >0 are fixed
parameters, μ controls the smoothness of zero
where α is a real constant called balloon force level set, v increases the propagation velocity
to control the expanding and velocity, к is the and λ1 and λ2 controls the image data drive force
euclidean curvature of curve C, and g is the edge
inside and outside the contour respectively. ∇ is
based function.
the gradient operator. H( φ ) is the heaviside
B. C-V Model function and ∂( φ) is the dirac function. The
regularised version is selected as follows:
Chan and Vese proposed an active contour without
edges that can be seen as a special case of

{ ( ( )) (16)
Munford-Shah problem. This model utilizes the 1 2 z
H ε ( z )= 1+ arctan
homogeneity information of the object as a term in 2 π ε
the energy function unlike the GAC model which
relies on the image gradient. In this method the
image is considered to be including two regions i.e
c1 and c2 inside and outside the curve C
δε (z )= ( 1π . ε +ε z ), z ∈ R
2 2

respectively. For a given model Ω, the C-V model IV. HYBRID MODEL
is formulated by minimizing the following energy
functional: In our hybrid model first of all we calculate the
❑ ❑ SPF (Signed Pressure Force) function. Its value
2 2 always lies in the range [-1,1]. It is used to control
ECV =λ 1 ∫ |I ( x ) −c 1| d + λ 2 ∫ |I ( x ) −c 2| dx the motion of the contour by modulating the sign of
¿(C) out (C)
the pressure force, so that the contour shrinks when
(12) outside and expands when it is inside the region of
interest.
where c1 and c2 are the average intensities inside
and outside the contour, respectively. With the level c 1 +c 2
set method we assume I ( x )−
2
spf ( I ( x )) = , x∈Ω
C={ x ∈ Ω :φ ( x )=0 } ,
|
max ⁡( I ( x )−
c 1+ c 2
2
)|
inside ( C )={ x ∈Ω :φ ( x )> 0 } ,
(17)
outside ( C )= { x ∈Ω :φ ( x ) <0 } , where c1 and c2 are defined in Eq.(13) and (14),
respectively.
By minimizing Eq.(6), we get the values for c 1 and
c2 as: The significance of Eq. (17) can be explained as
❑ follows. Refer to Figure 1, we assume that the
intensities inside and outside the object are
∫ I ( x ) . H ( φ ) dx homogeneous. It is intuitive that
c 1 ( φ )= Ω ❑ ,( 13) Min ( I ( x ) ) ≤ c 1 , c 2 ≤ Max(I ( x)) and the
∫ H ( φ ) dx equal signs cannot be obtained simultaneously
Ω wherever the contour is. Hence, there is
c 1 +c 2 The main procedures of the proposed algorithm are
Min ( I ( x ) ) < < Max ( I ( x ) ) , x ∈ Ω summarized as follows:
2
1.Initialize the level set function / as
(18)

{
−ρ x ∈ Ω0−∂Ω 0
φ ( x ,t =0 )= 0 x ∈∂ Ω0 (21)
ρ x ∈Ω−Ω0

where ρ > 0 is a constant, Ω0 is a subset


in the image domain Ω and ∂ Ω0 is the
boundary ofΩ0 .
2. Compute c 1 ( φ )∧c 2 ( φ) using Eqs. (13) and
Fig 1 (14), respectively.
3. Evolve the level set function according to Eq.
Substituting the SPF function in Eq. (17) for the (20).
ESF in Eq. (11), the level set formulation of the 4. Let φ = 1 if φ > 0; otherwise, φ =
proposed model is as follows: -1.
This step has the local segmentation property. If we
∂φ
∂t
=spf ( I ( x )) ¿
∇φ
(( ) )
|∇ φ|
+ α |∇ φ|
want to selectively segment the desired objects, this
step is necessary; otherwise, it is unnecessary.
5. Regularize the level set function with a Gaussian
filter, i.e φ=φ∗G σ .
+∇ spf ( I ( x ) ) . ∇ φ , x ∈ Ω(19) 6. Check whether the evolution of the level set
function has converged. If not, return to step 2.
In the traditional level set methods, the level set
function is initialized to be an SDF to its interface V. EXPERIMENTS AND RESULTS
in order to prevent it from being too steep or flat We have done experiments with both , the natural
near its interface, and re-initialization is required in as well as biomedical images. Fig 1 shows the
the evolution. Unfortunately, many existing re- results on natural image with both the reference
initialization methods have an undesirable side model and the hybrid model.
effect of moving the zero level set away from its
interface. Furthermore, it is difficult to decide when
and how to apply the re-initialization. In addition,
re-initialization is a very expensive operation. To
solve these problems, we propose a novel level set
method, which utilizes a Gaussian filter to
regularize the selective binary level set function
after each iteration. The procedure of penalizing
level set function to be binary is optional according
to the desired property of evolution. If we want
local segmentation property, the procedure is
necessary; otherwise, it is unnecessary.
(a)
Since we utilize a Gaussian filter to smooth the
level set function to keep the interface regular, the
regular term ¿( ∇ φ /|∇ φ|)∨∇ φ∨¿ is
unnecessary. In addition, the term ∇ spf . ∇ φ
in Eq. (19) can also be removed, because our model
utilizes the statistical information of regions, which
has a larger capture range and capacity of anti-edge
leakage. Finally, the level set formulation of the (b) (c)
proposed model can be written as follows:

∂φ
=spf ( I ( x )) . α |∇ φ| , x ∈Ω(20)
∂t
[7] Chunming Li, Chiu Yen Kao, John C. Gore and Zhaohua
Ding “Minimization of region scalable fitting energy for
image segmentation”, IEEE Transaction on image
processing, VOL.17, NO.10, October 2008.
[8] Thi-Thao Tran, Van-Truong Pham, Yun-Jen Chiu, and
Kuo-Kai Shyu “Active Contour with Selective Local or
Global Segmentation for Intensity Inhomogeneous Image”,
Computer Science and Information Technology (ICCSIT),
(d) (e) 2010 3rd IEEE International Conference.
[9] Kaihua Zhang, Lei Zhang, Huihui Song and Wengang
Zhou, “Active contour with selective local or global
Fig 2.Segmentation results on a natural image, (a)
segmentation: A new formulation and level set method.”,
original image (b) & (c) results by the reference Image and vision computing,2010.
model after 200 and 500 iterations respectively, (d) [10] Muhammad Hameed Siddiqi, Sungyoung Lee, Young-Koo
& (e) results from the hybrid model after 100 and Lee “Object Segmentation by Comparison of Active
Contour Snake and Level Set in Biomedical Applications”,
200 iterations. 2011 IEEE International Conference on Bioinformatics
and Biomedicine.
[11] Arie Nakhmani and Allen Tannenbaum “Self-Crossing
Detection and Location for Parametric Active Contours”,
IEEE Transactions on Image Processing,VOL. 21, NO. 7,
July 2012.
[12]Satoshi Urata, Hiroshi Yasukawa “Improvement of contour
extraction precision of active contour model with
structuring elements”, Acoustics, Speech and Signal
(a) (b) (c) Processing (ICASSP), 2012 IEEE International
Conference.
[13] F.Samopa, A. Asano.,"Hybrid Image Thresholding Method
Figure 3.(a) original biomedical image (b) & using Edge Detection", IJCSNS International Journal of
(c)segmentation results by the reference model and Computer Science and Network Security, Vol.9 No.4,
the hybrid model after 400 iterations. PP.292-299, April 2009.
[14] Gonzalez and Woods, "Digital image processing", 2nd
Edition, prentice hall, 2002.
VI. CONCLUSION [15] Shuqian He, Jiangqun Ni, Lihua Wu, Hongjian Wei ,
In this paper a hybrid region based model is Sixuan Zhao.," Image threshold segmentation method with
proposed with selective local and global image 2-D histogram based on multi-resolution analysis",
segmentation. By taking the advantage of the GAC Computer Science & Education, ICCSE, 25-28 July 2009,
PP.753 – 757, Nanning, China
and C-V model, this method can effectively detect
and segment the regions with weak or blur edges. [16]Gang Liu, Robert M. Haralick, "Assignment Problem in
Edge Detection Performance Evaluation," cvpr, vol. 1,
The model is able to change the topology as the pp.1026, 2000 IEEE Computer Society Conference on
evolution flow of model is derived using level set Computer Vision and PatternRecognition(CVPR'00) –
method. Experiments are performed on both the Volume1, 2000.
natural as well as biomedical images.

VI. REFERENCES
[1] Michael Kass, Andrew Witkin, and Demetri Terzopoulos
“Snakes: Active contour models”, International journal of
computer vision, 1988.
[2] Chenyang Xu and Jerry L. Prince “Snakes, Shapes, and
Gradient Vector Flow”,IEEE Transaction on Image
Processing,VOL. 7, NO. 3, MARCH 1998
[3] Tony F. Chan and Luminita A. Vese, “Active Contour
Without Edges”, IEEE Transaction on image processing,
VOL.10, NO.2, 2001
[4] Johan Lie, Marius Lysaker and Xue Cheng Tai “ A binary
level set model and some applications to mumford shah
image segmentation”, IEEE Transaction on image
processing, VOL. 15, NO.5, May 2004.
[5] Chunming Li, Chenyang Xu, Changfeng Gui, and Martin
D. Fox “Level Set EvolutionWithout Re-initialization: A
New Variational Formulation”, Computer vision and
pattern recognition, IEEE Computer Society Conference,
2005.
[6] Haiyun Li, Xiang Chen “A algorithm of medical image
segmentation based on active contour model”, 2007
IEEE/ICME International Conference on Complex
Medical Engineering, Capital Medical University School
of Biomedical Engineering, Beijing China.