Professional Documents
Culture Documents
Segmentation
Prabhanjan Ananth, Saikrishna Badrinarayanan, Aashith Kamath
Department of Computer Science,
University of California, Los Angeles, USA
prabhanjan@cs.ucla.edu,bsaikrishna7393@gmail.com,aashith_kamath@hotmail.com
ABSTRACT
Image segmentation deals with the problem of partitioning
the images into segments. Image segmentation is said to
be interactive if the segmentation process is performed with
feedback from the user. In this report, we study one particular approach proposed by Boykov, and Jolly [BJ01] to
solve the interactive image segmentation problem. BoykovJolly introduced the technique of graph cuts to achieve the
goal of partitioning images into two segments, that they call
object and background. In particular, the problem of
interactive segmentation is reduced to the problem of finding graph min-cuts, which is then solved using the max flow
algorithm of Boykov, and Kolmogorov [BK01]. We implement the Boykov-Jolly method and analyze its performance
against various test cases. An optimization that improves
the efficiency of the algorithm is proposed and incorporated
in our implementation.
1.
INTRODUCTION
The problem of image segmentation is one of the important problems in computer vision. Image segmentation has
various applications, for example, recognizing body parts in
medical images, detecting weapons in luggages in the airport
and so on. In this report, we study how to achieve image
segmentation when there is interaction from the user. This
is termed as interactive image segmentation. In particular,
we study the approach by Boykov-Jolly [BJ01] who propose
a solution, using the concepts from graph min-cuts, to the
problem of interactive image segmentation. They show how
to reduce the problem of interactive image segmentation to
the problem of finding graph min-cuts. We briefly recall
their approach below. More details are provided in Section 2.
The segmentation process begins by the user first marking
some pixels to be either object pixels or background pixels.
These are called the hard constraints. Then, the image is
modeled as a weighted graph. The weights in the graph are
determined based on the initial markings specified by the
user and a cost function (also referred to as soft constraints)
that is determined based on some a priori knowledge about
the images. We later describe the specific cost function used
Organization. We first recall the Boykov-Jolly [BJ01] algorithm at a high level in Section 2. In the same section, we also describe the max flow algorithm of BoykovKolomogorv [BK01]. In Section 3, we show how to extend
the Boykov-Jolly method to obtain segmentation of images
into multiple objects. Finally, in Section 4, we give details
about the implementation of the Boykov-Jolly algorithm and
test it on different images. An implementation of an alternate multi-object segmentation method is also provided in
the same section.
2.
edge
{p, q}
{p, S}
{p, T }
weight
Bp,q
Rp (bck)
K
0
Rp (obj)
0
K
for
{p, q} N
p P, p
/ OB
pO
pB
p P, p
/ OB
pO
pB
pP
B(A) =
Bp,q (Ap , Aq ),
(2)
{p,q}N
2.1
Modeling the image as a weighted graph. In the next
step, we model the image as a weighted graph. Given the
image, we associate every pixel in the image to a vertex in
the graph. We draw an edge between two vertices if their
corresponding pixels in the image are neighboring. We further augment the graph by adding two terminal vertices,
denoted by S and T . Edges from S (resp., T ) is added
to every vertex in the graph. We now add weights to the
graph. The weights are determined by Table 1. We denote
the resulting graph to be G.
Graph min-cut i.e., finding optimal image segmentation. In the final step, we find the min-cut2 of the graph G.
1
3.
We show how to extend the method presented in the previous section to multi-object image segmentation. That is, we
are interested in segmenting the image into, say k, segments
(call it obj1 , . . . , objk ) as against 2. To solve this problem
we essentially follow the same steps as before. The main
change comes in the step when we have to reduce our problem to the min-cut problem. In this case, we construct a
weighted graph with k terminals from the given image. We
weight
Bp,q
k
P
i=1
Rp (obji )
k1
{p, S1 }
..
.
k
P
i=1
Rp (obji )
k1
{p, Sk }
Rp (obj1 )
K
..
.
0
..
.
Rp (objk )
0
..
.
K
for
{p, q} N
p P, p
/ ki=1 Oi
p O1
..
.
p Ok
..
.
p P, p
/ ki=1 Oi
p O1
..
.
p Ok
4.
4.1
Figure 2
4.2
Figure 3
Test Cases
background is one which also has other objects in the background. This is done to see if the choice of the background
has effects the accuracy of our implementation. Further, in
each of these categories we consider different kinds of images.
We obtain nearly accurate segmented images for images of
both these categories. We now describe briefly the images
we consider and the results we obtain.
1. We consider an image of fish Figure 4, with water in the
background. We get an accurate segmentation of fish
as reported in Figure 5. We then consider the image,
in Figure 6, of a lion with sky in the background. We
get nearly accurate results here with some noise near
the boundary region of the lion. Some background pixels which were supposed to be marked blacked are not.
We report the final image in Figure 7. Another image
of a plane with blue sky in the background is considered. The original image and the segmented image are
presented in Figure 8 and Figure 9 respectively.
Figure 4
Figure 6
Figure 8
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 5
Figure 7
Figure 9
Figure 18
Figure 19
Figure 21
Dimension
186x267
300x240
180x119
183x46
300x174
275x183
255x198
300x225
Accuracy
97.8
97.5
97.4
92.1
93.4
98.3
97.6
98.1
5.
CONCLUSION
6.
REFERENCES
[BJ01]