You are on page 1of 6

SAMI 2010 8th IEEE International Symposium on Applied Machine Intelligence and Informatics January 28-30, 2010 Herl'any,

ny, Slovakia

An Experimental Comparison of Modern


Methods of Segmentation
P. Karch, I. Zolotov
Technical University/Department of Cybernetics and Artificial Intelligence, Koice, Slovakia

AbstractThis paper deals with experimental comparison by approached to the contour of object in individual
of classical method of Graph cut segmentation with iterations.
segmentation using Active contours. From methods of The details of Graph cut segmentation method are
Active contours are chosen to comparison two methods. shown in Section II A. In Section II B are details about
First method is based on classic Active contour method and basic Active contour segmentation method. Section III we
second method is based on Active contours independent on provided an experimental comparison of these modern
gradient of the edges. Application of Graph cut segmentation methods implemented by Matlab for
segmentation allows finding the optimal global segmentation segmentation of image sets.
with the best balance between regional and boundary
conditions among all possible segmentations at met
II. MODERN METHODS OF SEGMENTATION
condition limitations. Active contour segments the image by
iterative deformation contour till this contour divided the
image on the regions. Active contours are often A. Graph cut segmentation
implemented with level set methods for their universality Segmentation using this method belong between
and performance, but disadvantage is their computational interactive methods which partitioning an image into two
complexity. The second method of the active contour allows segments objects and background. This method is
to detect objects whose boundaries are not necessarily initialized by interactive or automated identification one
defined by gradient. The end rule in this case does not or more points representing the object and one or more
depend on gradient of the image, as in classical model of points representing background. These points are called
active contour, but instead refer to a particular seeds and they are represented hard constraints of
segmentation of the image. segmentation. Other soft constraints are attributable to the
border or regional information.
I. INTRODUCTION This method is one of the graph algorithms, where the
main idea is to create valued, undirected graph
Segmentation is generally defined as the problem of G = (V , E ) from image I . The graph is defined as a set
partitioning an image into two or more segments: objects
and background. of nodes or vertices V , which represents itself pixels in
image, and a set of edges E represents any neighborhood
There are mainly three approaches to segmentation. relationship between the pixels and valued by nonnegative
Manual segmentation is very laborious and extremely time cost we . Then they are two special nodes named terminals
consuming. Purely automatic segmentation is very
challenging, due to ambiguities in the presence of multiple S (source) and T (sink) that represents object and
objects, weak edges, image noise, etc. Interactive background labels.
segmentation is becoming more popular to alleviate the Normally, there are two types of edges in the graph: n-
problems inherent to fully automatic segmentation links and t-links. N-links connect pairs of neighboring
technique that divides the image into two segments: object pixels or voxels. Thus they are represented a
and background. neighborhood system in the image. Cost of n-links
Among modern segmentation techniques belonged corresponds to a penalty for discontinuity between the
method of Graph cut segmentation and Active contour pixels. T-links connect pixels with terminals (labels). The
method. These techniques belong among the most cost of a t-links connecting a pixel and a terminal
developing methods in computer vision. These techniques corresponds to the penalty for assigning the corresponding
are mainly initiated interactively by the user. In Graph cut label to the pixel. This is normally derived from the data
segmentation user interactively determined hard term (6) in energy (5).
constraints in the form of terminals, called S (source) and To determine the maximum flow in this graph are used
T (sink) by specified certain pixels that are called seeds algorithms to determine the maximum flow as Ford-
that absolutely have to be part of the object and certain Fulkerson algorithm, or algorithm described in [1].
pixels that absolutely have to be part of the background. A cut C is a subsets of edges C E which when
These terminals provide information on that user intends removed from G disjoint V into two subsets S and
to segment. The cost function is defined by terms of T = V S such that s S and t T . Than cost of cut is
boundary and region properties of the segments. These defined as the sum of cost of these edges:
properties can be perceived as soft constraints for
segmentation. In the segmentation using active contours
user interactive generally determined initialization
contour. Contour then using internal and external energy
C = w
eC
e (1)

978-1-4244-6424-1/10/$26.00 2010 IEEE 247


P. Karch, I. Zolotov An Experimental Comparison of Modern Methods of Segmentation

The minimum cut is the cut with smallest cost.


B{ p ,q}
Ip Ip
exp
( ) 2 1
, (8)
The problem of segmenting an object from its
background is interpreted as a binary labeling problem. 2 2 dist ( p, q)

An image is divided into set of P , which represented all
pixels in the image and set of N , which represented where dist(p,q) is the Euclidean pixel distance and is
standard 4-connected neighborhood system of pixel pairs user defined parameter.
{ p, q} , p, q P , where q is neighborhood of pixel p on
left, right, top or bottom from him. Each pixel in image B. Active contour segmentation
has assigned to the binary label Lk = {O, B} , where O The basic idea of active contour model is an evolution
represent object in the image and B represent background of the curve by limitations in the image to detect objects in
in the image. These two levels are identified by terminal the picture. They are dependent on user interaction, which
nodes S (source) and T (sink). The labeling vector consists of determining the curve around the detected
L = {L1 ,...L p ,...L I } defines segmentation. The soft object. Curve of this method deforms by the influence of
external and internal forces. The final contour after
constraints that are impose on boundary and region deformation can be used for segmentation of the image.
properties of L are described by the cost function The energy functional is minimized in this case as a
weighted combination of internal energy depending on the
E ( L) = R ( L) + B ( L) (2) shape of contour and the external energy depends on the
image or information from a higher level image
processing. Contour is defined as
where
v( s ) = [ x( s ), y ( s )], (9)
R( L) = R
pP
p (L p ) (regional term) (3)
where x(s ) , y (s ) are x, y coordinates along contour and
s [0,1] . Contour is deformed by influence of internal
and external forces to minimize energy functional
B( L) = B
{ p ,q}N
{ p ,q} ( L p , Lq ) (boundary term) (4)
1

(E (v( s)) + Eimage (v( s)) + Econ (v(s )))ds,


*
E = (10)
and int
0

1 if L p Lq where Eint is internal energy during bending, Eimage is


( L p , Lq ) = . (5)
0 if L p = Lq
energy depend on image forces and Econ is energy giving
the size of external constraint forces. Internal energy is
The coefficient in (1) defines the importance of the defined as
regional properties term R(L) versus the boundary
properties term B(L). The regional term assumes the
2
individual penalties for assigning pixel p to object and dv
2
d 2v
background, correspondingly R p (O) and R p (B) , are Eint = ( s ) + (s) , (11)
ds ds 2
given. This R p (O / B) reflect how the intensity of pixel p
fits into given intensity model (histogram) of the object where (s ) , (s ) determined elasticity and stiffness of
and background contour. The second term of (10) is derived from the
image data where contour lies. Contour can attract lines,
R p (O ) = ln P( I p | O), (6) edges and constraints by weighted combination of three
different functional

R p ( B) = ln P( I p | B). (7) Eimage = wline Eline + wedge Eedge + wterm Eterm . (12)

The boundary term B(L) comprises boundary properties where line based functional has form intensity of image by
of segmentation and determined smoothness on boundary. this shape
Coefficient B{ p ,q} 0 can be interpreted as penalty for
Eline = I ( x, y ) (13)
discontinuities between p and q. Normally, B{ p ,q} is
small when pixels p and q are very different and B{ p ,q} is and I ( x, y ) represent gray level on position ( x, y ) in
large when they are similar. The cost B{ p ,q} can be image. The value wline determined whether the contour is
determined attracted to dark or light lines. Edge based functional has
form

248
SAMI 2010 8th IEEE International Symposium on Applied Machine Intelligence and Informatics January 28-30, 2010 Herl'any, Slovakia

2
Eedge = I ( x, y ) (14)

and causes that contour is attracted to large image


gradients. The weighted energy functional Eterm can be
entered as


Eterm = , (15)
n R

where on this functional has affect line terminations and


corners. The gradient direction along curve is denoted by
( x, y ) . The unit vector perpendicular to the direction of
the gradient ( x, y ) is defined as

n R ( x, y ) = ( sin ( x, y ), cos ( x, y ) ) . (16)

Contour can be controlled by changing weights


wline wedge and wterm . The third term in (10) represents
the external constraints and can be determined be user
interaction or on a higher level process. That ensures that
in the event that the contour settle in a local energy
minimum that a higher level mark as incorrect, the energy
peak force contour leave this position.

III. EXPERIMENTS
This experimental comparison of modern method of
segmentation used these methods:
Graph cut segmentation used implementation [4].
Active contour segmentation based [8] and [5].
Segmentation was performed on set of three images
[10], [11] and is showed final result of each segmentation.
Graph cut segmentation used algorithm implementation
[1], [2] in [4].

Figure 1. Initialization of graph cut segmentation

249
P. Karch, I. Zolotov An Experimental Comparison of Modern Methods of Segmentation

Figure 2. Result of graph cut segmentation

This segmentation method gives satisfactory results but


its biggest advantage is the low time exactingness. On this
set of images is time execution below 1 sec. The time
exactingness is increased depending on the size of image.
Figure 3. Initialization of active contour segmentation
Active contour segmentation used algorithms
implementation from section II B and [5].

250
SAMI 2010 8th IEEE International Symposium on Applied Machine Intelligence and Informatics January 28-30, 2010 Herl'any, Slovakia

Figure 5. Initialization of active contour segmentation based on [5]

Figure 4. Result of active contour segmentation

Active contour segmentation gives satisfactory result


but their biggest disadvantage is bigger time exactingness
for the use of iteration in this method. The speed of
segmentation by methods of active contour strongly
depends on the shape of initialization.

251
P. Karch, I. Zolotov An Experimental Comparison of Modern Methods of Segmentation

Matlab Wrapper for Graph cut [4] is compiled and


implemented in Matlab R2007a. Active contours are both
implemented in Matlab R2007a. All experiments results
are given with CPU Core2Duo 2.13GHz, 3GB RAM and
256MB VGA on Windows XP Pro.

IV. CONCLUSION
The experimental implementation of algorithms shows
how the various algorithms prove a deal with a given set
of images.
The next step in others experiments will be to create
graphical user interface and implementation Graph cut
segmentation and all Active contours segmentation
algorithms to one application that simultaneously doing all
segmentations with the fact that the user can choose the
best segmentation. The final segmentation depends on
user's choice. The other step in others experiments is
hierarchical implementation of these algorithms.

ACKNOWLEDGMENT
This work is supported by grant APVV-0682-07.

REFERENCES
[1] Y. Boykov, V. Kolmogorov, An Experimental Comparison of
Min-Cut/Max-Flow Algorithms for Energy Minimization In
Vision, IEEE transactions on Pattern Analysis and Machine
Intelligence, vol. 26, no.9, pp 1124-1137, September 2004.
[2] Y. Boykov, O. Veksler, R. Zabith, Efficient Approximate Energy
Minimization via Graph Cuts, IEEE transactions on Pattern
Analysis and Machine Intelligence, vol. 20, no.12, pp 1222-1239,
November 2001.
[3] V. Kolmogorov, R. Zabih, What Energy Functions can by
Minimized via Graph Cuts?, IEEE transactions on Pattern
Analysis and Machine Intelligence, vol. 26, no.2, pp 147-159,
February 2004.
[4] S. Bagon, Matlab Wrapper for Graph Cut, December 2006.
Online: http://www.wisdom.weizmann.ac.il/~bagon/matlab.html
[5] T. F. Chan, L. A. Vese, Active Contours Without Edges, IEEE
Transactions on Image Processing, Vol. 10, No. 2, pp 266-277,
February 2001.
[6] Y. Boykov, G. Funka-Lea, Graph Cut and Efficient N-D Image
segmentation, International Journal of Computer Vision, Vol.
70, No. 2, pp 109-131, 2006.
[7] M. Sonka, V. Hlavac, R. Boyle, Image Processing, Analysis, and
Machine Vision, 2007.
[8] M. Kass, A. Witkin, D.Terzopoulos, Snakes: Active contour
models, International Journal of Computer Vision, Vol.1, No.4,
Figure 6. Result of active contour segmentation based on [5]
pp 321-331, 1988.
[9] [Online]. Available: http://www.eecs.berkeley.edu/Research/
An active contour model in Fig. 5 is implementation of Projects/CS/vision/grouping/segbench/
[5] which is based on Mumford-Shah segmentation [10] [Online]. Available: http://kspace.cdvp.dcu.ie/public/interactive-
techniques and the level set method. This model is not segmentation/ground-truth.html
depended on edge function to stop evolving curve on
desired boundary. It can segment images whose
foreground and background are different and
homogenous. As can be seen on the second picture in
Figure 6 it cannot reached the desired outcome of the
segmentation.

252

You might also like