Você está na página 1de 4

An Improved Image Segmentation Algorithm Base on Normalized Cut

Qiu-Bo Xi
School of Automation Engineering
University of Electronic Science and Technology of China
Chengdu, 611731, P.R.China
e-mail:xiqiubo@gmail.com

Abstract— A novel approach for segmentation of images has motion picture [5], medical imaging [6], vector field [7] of
been proposed by incorporating the advantages of the mean the segmentation. However, this approach is NP-hard
shift segmentation and the normalized cut partitioning problem, the more pixels in the image, the larger the
methods. The proposed method preprocesses an image by generated graph of nodes is, which bring difficulties to solve
using the mean shift algorithm to form segmented regions, the algorithm.
region nodes are applied to form the weight matrix W instead Considering the above issues come from the two
of these regions, the Ncut method is then introduced for region algorithms, this paper designed a combination of both
nodes clustering. Since the number of the segmented region methods, the specific algorithm can be find in the following
nodes is much smaller than that of the image pixels. The
part.
proposed algorithm allows a low-dimensional image clustering
with significant reduction of the computational complexity II. THE MEAN SHIFT ALGORITHM AND THE NCUT
comparing to conventional Ncut method based on direct image
pixels. The experimental results also verify that the proposed A. The Mean Shift Algorithm
algorithm behaves an improved performance comparing to the
mean shift and the Ncut algorithm. Considering radially symmetric kernels satisfying
K ( x) = cd k (|| x ||2 ) , where cd > 0 ,which is chosen such
Keywords-Mean shift; Normalized cut (Ncut); Image
∞ ∞
segmentation that

0
K ( x)dx = ∫ cd k (|| x ||2 )dx = 1 [note that k ( x)
0

I. INTRODUCTION is defined only for x ≥ 0 ]. k ( x ) is a monotonically


Mean shift [1] concept was first proposed in a estimates decreasing function , which is referred to the profile of the
of probability density gradient function by Fukunaga et al in kernel. Given the function g ( x ) = − k ′( x ) as profile, the
1975. Until 1995, another important document with respect
to the Mean-shift was published by Cheng Yizong [2], he has kernel G ( x ) is defined as G ( x) = cg , d g (|| x ||2 ) . For
made a lot of promotion work for the basic Mean-shift n data points xi , i =1,…, n in the d -dimensional space Rd,
algorithm, and pointed out the possible areas application of
the mean shift vector is defined as
the Mean-shift. In recent years, Mean-shift algorithm has
n
x − xi 2
∑ x g (||
been widely used in computer vision areas, such as tracking,
image segmentation, image smoothing, filtering, image edge i || )
h
extraction, information fusion, motion estimation, feature mh ,G ( x) = n
i =1
−x (1)
x − xi 2
space analysis, video data analysis and so on. It’s apt to over-
segmentation phenomenon, which is the common failing of ∑i =1
g (||
h
|| )
this algorithm.
The image segmentation technique based on graph theory where x is the center of the kernel, and h is a bandwidth
is a new research highlight in the international image parameter. Based on the above analysis, we present a brief
segmentation area, the technique considered pixel as nodes review of the image segmentation method based on the mean
and essentially transformed image segmentation issue to shift procedure. Form the reference [4], we know that the
optimization problem, undirected weighted graph is always mean shift algorithm includes mean shift filtering and mean
used in image segmentation based on graph theory, A graph shift segmentation. The segmentation is actually a merging
is always partitioned into multiple components , which can process performed on a region that is produced by the mean
minimize some cost function of the vertices in the shift filtering. The use of the mean shift segmentation
components and the boundaries between those components. algorithm requires the selection of the bandwidth parameter
Up to now, a lot of graph cut-based methods have been put h=(hr,hs). By controlling the size of the kernel, the bandwidth
forward for image segmentations. For instance, a general parameter can determines the resolution of the mode
image segmentation approach based on normalized cut detection.
(Ncut) by solving an eigensystem, which was proposed by
Shi and Malik [3] .In recent years, Ncut algorithm is widely
used for image processing and related fields, such as the

c
978-1-4244-6349-7/10/$26.00 2010 IEEE V7-293
B. The Ncut Algorithm method, it is a good solution for solving the drawback of the
The set of points in an arbitrary feature space can be Nuct. This shows that the combination of the two methods is
described as a weighted undirected graph G= (V, E), where also feasible. The proposed method consists of the following
the nodes of the graph are the points in the feature space, and steps:
an edge is formed between every pair of nodes. The weight 1) An image is preprocessed into multiple separated
on each edge,W(i,j), is a function of the similarity between regions using the mean shift algorithm.
nodes i and j. A graph G= (V, E) can be partitioned into two 2) These regions are much smaller than the image pixels,
so we extracted each region, and use one region node instead
disjoint sets, A , B , A U B = V , A I B = ∅ ,we expected
of one region. The information of the region nodes includes
that the intragroup similarity is high and the intergroup
features vector information and spatial location.
similarity is low. In graph theoretic language, a mathematical
3) According to the step 2, these region nodes are
formulation of a cut is [3]
represented as a weighted undirected graph, the graph as the
cut ( A, B ) = ∑ w(u , v ) Ncut algorithm input, and use these region nodes to construct
the weight matrix W, and then use the Ncut method for
u∈ A , v∈B
(2) region nodes clustering.

In this paper, we will use this normalized cut (Ncut) as the IV. EXPERIMENTAL RESULTS AND ANALYSIS
partition criterion. The Ncut is In this paper, we demonstrate the superiority of the
proposed method by comparing the performance of the
cut ( A, B ) cut ( A, B ) proposed approach to existing methods using two images.
Ncut ( A, B ) = +
assoc ( A, V ) assoc( B, V ) The weight W(i, j) between regions i and j is defined as
(3)
⎧ −|| X − X
2 2
−|| F( i ) − F( j ) ||2 (i ) ( j ) ||2 if i and j are adjacent
where assoc ( A, V ) = ∑ w(u , v ) is the total connection σ I2 ⎪ σ 2

u∈ A , v∈V
Wij = e * ⎨e X
(4)
from nodes in A to all nodes in the graph and ⎪⎩ 0 otherwise
assoc ( B, V ) = ∑ w(u , v ) is similarly define. When we
where F(i)={ R(i) ,G(i) ,B(i)} is the color vector of region i, if
u∈B , v∈V
obtain the least value of Ncut, that is the best image the image is the gray-level image, then F(i) is the gray value.
segmentation. and X(i) is the spatial location of region node i. in this paper,
we defined the F(i) is the average gray of the region i, and
III. THE IMPROVED IMAGE SEGMENTATION ALGORITHM the X(i) is the center of the region i. in this case, the select of
Normalized cut is proved to be NP-hard problem, when F(i) and X(i) are more representative.
the nodes of graph increases, the solution of the problem In order to compare other method to the proposed
becomes extremely complex, and the calculation of the algorithm, we use the example of two image, as depicted in
problem becomes large. Therefore, by incorporating the Fig. 1 and Fig. 2. Fig. 1 image size is 277×384. Fig. 1(a)
advantages of the mean shift segmentation and the shows the original image, and Fig. 1(b) depicts the resultant
normalized cut (Ncut) partitioning methods, the proposed image after applying the mean shift algorithm, with the white
method preprocesses an image by using the mean shift contours depicting the boundaries between the regions. We
algorithm to form segmented regions, we use region nodes set h=(hr,hs)=(8,8) and M=2000. As a result, the mean shift
instead of these regions, then use the Ncut method for region algorithm produces 8 regions. This eight regions of R(i) in F(i)
nodes clustering. In many literatures, the Ncut method is is 34,51,54,75,78,82,84,and 193 respectively (from small to
applied directly to image pixels. So for some large images, large). The G(i) and B(i) are not list. Therefore, the
the weight matrix W is large, which brings huge constructing the weight matrix W of the graph based on
computational complexity. However, the proposed method region nodes using the Ncut algorithm is easier and smaller
offers a considerable reduction of computational complexity, than that based on pixels. Fig. 1(c) shows the partitioning
because the number of image region nodes is much smaller results by directly applying the Ncut algorithm to the image
than that of the pixels, the size of the weight matrix W is pixels. With the partitioning parameter K=2 and table I
significantly reduced. Moreover, the mean shift algorithm depicts the weight matrix W of the region nodes. Fig. 1(d) is
not only removes noise, which limits the accuracy of graph the grayscale display results of the proposed algorithm
partitioning in the Ncut method, but also achieves improved
partitioning. With the partitioning parameter K=2. Fig. 1(e)
segmentation performance. Nonetheless, it will produce the
shows the results of the proposed algorithm partitioning.
phenomenon of over-segmentation. The Ncut algorithm is a
The Fig. 1 image includes the bird in the foreground and
global clustering method, it can compensate for the
the bulrush in the background. Therefore, an effection
phenomenon of over-segmentation, but it is very dependent
on the selection of classification parameter K. however, segmentation algorithm should distinguish the bird from the
mean shift is a non-supervised clustering segmentation bulrush background. In Fig. 1(b), many separated regions are
segmented by mean shift algorithm, it is not a good segment

V7-294 2010 2nd International Conference on Computer Engineering and Technology [Volume 7]
result. In Fig. 1(c), the Ncut algorithm is directly applied to When use the Ncut method, an image has to be decimated
the image pixels, the image is partitioned into two parts. into a size of 120×120, the required time is only 8-10 s.
from Fig. 1(d) and Fig. 1(e). the segment result distinguish Table II compares the computational cost between the
the bird from the bulrush background. So the proposed proposed algorithm and the Ncut method for the images
method provides an improved performance compared to the depicted in Fig. 1 and Fig. 2.
mean shift and the Ncut algorithm.

(a) (b)
(a) (b)

(c) (d)

(c) (d)

(e)
Fig. 1. (a) Original image. (b) The resultant image after applying the mean
shift algorithm. (c)The partitioning results by directly applying the Ncut
algorithm to the image pixels. (d)The results of the proposed algorithm (e)
partitioning grayscale display. (e) The results of the proposed algorithm Fig. 2. (a) Original image. (b) The resultant image after applying the mean
partitioning. shift algorithm. (c) The partitioning results by directly applying the Ncut
algorithm to the image pixels. (d) The results of the proposed algorithm
The Fig. 2(a) size is 240×160. Set h=(hr,hs)=(6,4) and partitioning grayscale display. (e) The results of the proposed algorithm
partitioning.
M=10. With the partitioning parameter K=4. the analysis of
the segment result is the same as the Fig. 1. V. CONCLUSION
Finally, we consider the computational cost of the
proposed algorithm and compare it with that of the Ncut In this paper, a novel image segmentation algorithm has
method. A PC with a 2.8-GHz Pentium CPU and 1G been proposed and designed based on the conventional mean
memory is applied to carry out the computation of the shift algorithm and Ncut algorithm. The effectiveness and
proposed method which consists of two sections. The first robustness of the proposed algorithm have verified by some
section is to segment the original image using the mean shift experimental results to express an improved performance
method. The second section is to partition the region nodes compared to the Ncut algorithm. Also, the significant
by the mean shift method using the Ncut. The Ncut method reduction to the computational cost of the proposed algorithm
[3] requires 40-50 s to process the image of 277×384 pixels. in the experiments is favorable for practical applications.

[Volume 7] 2010 2nd International Conference on Computer Engineering and Technology V7-295
REFERENCES [4] D. Comariciu and P. Meer, “Mean shift: a robust approach toward
feature space analysis,” IEEE Trans. on PAMI, vol. 24, no. 5, pp.
[1] K. Fukunaga and L. D. Hostetler, “The estimation of the gradient of a 603-619, 2002.
density funtion, with application in pattern recognition,” IEEE Trans.
on Information Theory, vol. 21, no. 1, pp. 32-40, 1975. [5] J. Shi and J. Malik, “Motion segmentation and tracking using
normalized cuts,” Proceedings of the Sixth International Conference
[2] Y. Cheng, “Mean shift, mode seeking, and clustering,” IEEE Trans. on Computer Vision (ICCV), Bombay, India, pp. 1154-1160, 1998.
on Pattern Analysis and Machine Intelligence, vol. 17, no. 8, pp. 790-
799, 1995. [6] J. Carballido-Gamio, S. J. Belongie, and S. Majumdar, “Normalized
cuts in 3-D for spinal MRI segmentation,” IEEE Trans. on Medical
[3] J. Shi and J. Malik, “Normalized cuts and image segmentation,” IEEE Imaging, vol. 23, no. 1, pp. 36-44, 2004.
Trans. on PAMI, vol. 22, no. 8, pp. 888-905, 2000.
[7] H. Y. Li, W. B. Chen, and I. F. Shen, “Segmentation of discrete
vector fields,” IEEE Trans. on Visualization and Computer Graphics,
vol. 12, no. 3, pp. 289-301, 2006.

TABLE I. WEIGHT MATRIX W OF ALL REGION NODES


1 2 3 4 5 6 7 8
1 1 0.2257 0.4804 0 0 0 0 0
2 0.2257 1 0.2210 0.6888 0.2738 0 0 0
3 0.4804 0.2210 1 0 0.6706 0.0135 0.4260 0
4 0 0.6888 0 1 0.3291 0.1376 0 3.6470e-04
5 0 0.2738 0.6706 0.3291 1 0 0.7491 5.7401e-04
6 0 0 0.0135 0.1376 0 1 0.1418 0.0014
7 0 0 0.4260 0 0.7491 0.1418 1 5.4429e-04
8 0 0 0 3.6470e-04 5.7401e-04 0.0014 5.4429e-04 1

TABLE II. COMPARED COMPUTATIONAL COST BETWEEN THE PROPOSED METHOD AND THE NCUT METHOD
Time of the
Region num. of The value of Time of mean Time of Ncut Time of Ncut
proposed
mean shift the K shift (s) Merging (s) algorithm (s) [3]
method (s)
Fig.1 8 2 3.51 0.83 4.34 9.47
Fig.2 24 4 0.54 0.36 0.9 3.76

V7-296 2010 2nd International Conference on Computer Engineering and Technology [Volume 7]

Você também pode gostar