Fast Mean Shift Segmentation Based on Correlation Comparison

Abstract —Mean-shift is an effective statistical iterative algorithm. In the iterative process, size of bandwidth has great impact on the accuracy and efficiency of the algorithm. It not only decides the number of sampling points in the iteration, but also affects the convergence speed and accuracy of the algorithm. So, the choice of bandwidth is very important. In this paper, bandwidth is calculated by using correlation comparison algorithm, and then mean shift algorithm is used for image segmentation. Experimental results show that better image segmentation result can be obtained by using this new algorithm.

I. I NTRODUCTION

EAN shift (MS) is a nonparametric, iterative mode-seeking algorithm widely used in pattern recognition and computer vision. It was originally derived by Fukunaga and Hostetler[1] for nonparametric density gradient estimation, and was later generalized by Cheng[2]. Recent years have witnessed many successful applications of mean shift in areas such as classification[3][4], image segmentation[5]-[7], objection tracking[8]-[10] and video processing[11].

At present, most of clustering algorithms depend on the priori knowledge: cluster number. Moreover, artificial assumptions are joined into most of clustering algorithms when analysing the feature space. Yet mean shift algorithm does not require prior knowledge of the number of clusters, and does not constrain the shape of the clusters. The kernel function selection is not too sensitive to the image processing results[6] in mean shift algorithm. So the only need to be sure is the bandwidth of kernel function. Principle of mean shift is simple, and iterative efficiency of mean shift is high, but size of bandwidth directly influences the accuracy and efficiency of mean shift[5]. It not only determines the number of sampling points in iterative process, but also influences convergence speed and accuracy of mean shift. The modes found by the mean shift do not adequately present the dense area of the data set if a poor bandwidth estimate is used. So

Manuscript received November 13, 2011. This research is supported by the National Natural Science Foundation of China (61134012), Key Project

of Science and Technology of Henan Province (102102210038), the Young

Backbone Teachers Assistance Scheme of colleges and universities in Henan

Province (2010GGJS-105) and the Science and Technology Innovation Talent Support Plan of colleges and universities in Henan Province (2011HASTIT026).

Yanling Li is with College of Computer and Information Technology, Xinyang Normal University, Xinyang, 464000, China (corresponding author

phone: 153********; fax: 0376-*******; e-mail: lyl75@https://www.360docs.net/doc/971473621.html,). Gang Li is with College of Computer and Information Technology, Xinyang Normal University, Xinyang, 464000, China (e-mail:

ligang0376@https://www.360docs.net/doc/971473621.html,).

the choice of bandwidth is more important than that of kernel function. For this, researchers put forward various methods to select bandwidth. At present there are two major kinds of bandwidth calculating method[3]: automatic calculation method and self-adaptive calculation method. Automatic bandwidth calculating method is also called fixed bandwidth method, in which the bandwidth always remain unchanged in the iterative process. So the key of this method is to calculate the global optimal bandwidth according to the whole situation of sampling points. The optimal bandwidth associated with the kernel density estimator is defined as the bandwidth that achieves the best compromise between the bias and variance of the estimator, i.e., minimizes AMISE. There is no consensus view of the error measure formula by which the bandwidth selection is optimal. When sampling points included a variety of mode, it is difficult to calculate the global optimal bandwidth. Therefore, self-adaptive bandwidth calculating method must be used according to the local structure of sample points. That is, small bandwidth is used in large density area, and large bandwidth is used in small density area. From literature[5] we can know that: the normal kernel function is used for mean shift when sampling points meet normal distribution; the mode of the mean drift vector is took the maximum when bandwidth ∑=H

.

From literature[5] we can know that: multi-scale bandwidth calculating method is used for many mode sampling points and multivariable sampling points in mean shift algorithm, but the value scope of scale must be known by use of this method. In this paper, bandwidth is calculated self-adaptively by using correlation comparison algorithm(CCA), and then mean shift algorithm is used for image segmentation. Experimental results show the effectiveness of fast mean shift segmentation based on correlation comparison algorithm.

II. STANDARD MEAN SHIFT ALGORITHM

Let {}n x x x X ,,,21 =

be a data set in a s-dimensional Euclidean space s R . Camastra and Verri [12] and Girolami

[13] had recently considered kernel-based clustering for X in the feature space where the data space is transformed to a high-dimensional feature space F and the inner products in F are represented by a kernel function. On the other hand, the kernel density estimation with the modes of the density estimate over X

is another kernel-based clustering method based on the data space [14]. The modes of a density estimate are equivalent to the location of the densest area of the data set where these locations could be satisfactory cluster center estimates. In the kernel density estimation, the mean shift is a simple gradient technique used to find the modes of the kernel Fast Mean Shift Segmentation Based on Correlation Comparison

Algorithm

Yanling Li and Gang Li

M

2012 IEEE International Conference on Information Science and Technology Wuhan, Hubei, China; March 23-25, 2012

density estimate.

Mean shift produces are techniques for finding the modes of a kernel density estimate. Let R X K →: be a kernel with ()(

)2

i x x k x K ?=. The kernel density estimate is given

by

()(

)()∑=∧

?=

n i i

i

K x w x x k x f 1

2

(1)

Where ()i x w is a weight function. Based on a uniform weight, Fukunaga and Hostetler [1] first gave the statistical properties including the asymptotic unbiasedness, consistency and uniform consistency of the gradient of the density estimate given by

()()()

()∑

=∧??=?n i i i i K x w x x k x x x f 1

2

'2 (2) Suppose that there exists a kernel R X G →: with ()(

)2

i

x x g x G ?= such that ()()x k x g '

?=. The kernel K

is termed a shadow of kernel G . Then

()()()()

(

)

()()

()(

)

()()()[]

x x m x f x x w x x g x x w x x g x w x x g x w x x

x x g x f G G n i i i n

i i

i i i n i i

n

i i i

i

K ?=????

?????

????×

?????

??=??=

?∧

====∧

∑∑∑∑121

2

12

1

2 (3) The term ()()()x f x f x x m G K G ∧

?=?/ is called the generalized mean shift which is proportional to the density gradient estimate. Taking the gradient estimator ()x f K

∧? to

be zero, we derive a mode estimate as

()()()()∑∑==??=

=n

i i

i

n

i i

i

i

G

x w x x g x

x w x x g x m x 1

2

12

(4)

Equation(4) is also called the weighted sample mean with kernel G . Mean shift vector always points toward the increasing direction of density, This makes the mean shift clustering a hill climbing procedure. It clusters the data convergent to the same peak point into a local mode. The traditional mean shift segmentation includes following three step: bandwidth selection, mode detection and mode merging. In mode detection, the traditional approach should search the positions recursively along the convergent trajectory, and a threshold to ()x m G should be set to stop the searching. This leads to blur the regions with high density, and the number of the detected local modes is too large. Too many local modes make it difficult to merge them and eliminate the texture patches. Thus, over-segmentation often exists in the traditional approach. In addition, mode merging is based on local information decision [6], which makes the segmentation result unstable under various backgrounds.

III. FAST MEAN SHIFT SEGMENTATION BASED ON

CORRELATION COMPARISON ALGORITHM A. Correlation Comparison Algorithm

In literature[15], robust clustering algorithm based on similarity is used for image segmentation. Formula (5) is used to measure the similarity between j x and the ith cluster

center i v .

?

????

???????=β2exp ),(i j i j v x v x S (5) Clustering method of this paper is set up by maximizing the total similarity measure with formula (6).

∑∑∑∑====???

?

?????

???==c i n j i

j c i n j i j s v x v x S J 11211

exp

)),((γ

γ

β (6) Where power parameter γ is important because it can

take over the effect of the normalized parameter β so that the estimate of β can be assigned as the sample variance. That is, β could be defined by

n

x

x

n

j j

∑=?=

1

2

β where n

x

x n

j j

∑==

1

(7)

To analyze the effect of γ, let ~

s J be the total similarity of the data point k x to all data points with formula (8)

n k x x J n j k j s ,,1,exp

12~…=???

?

??

??

?

???=∑=γ

(8) ~

s J can be seen closely related to the density shape of the data points in the neighborhood of k x . A large value for ~

s J means that the data points k x is close to some cluster centers

and has many data points around it. Where the parameter γ is highly related to its neighborhood radius. Thus, to increase γ is equivalent to decreasing the neighborhood radius of the data point k x . Yet to decrease γ is equivalent to increasing the neighborhood radius of the data point k x . A too large γ gives a very small neighborhood radius for the data points and each data point will become an individual cluster. In another direction, the objective function will have only one peak when γ is small even though the data set actually has many clusters. Approximating the density shape with too small a γ will underestimate the true density shape. So it is important to

select the suitable γ. Moreover, γ has the same effect as that of bandwidth of mean shift, which controls the size of search range in iterative process of algorithm. In this paper,

we confirm γ

by using correlation comparison algorithm. When the values of correlation comparison in (8) are larger than a given threshold, it means that the approximate density shapes are not altered when we decrease the neighborhood radius of the data points.Therefore, the approximate density shapes are stable with such a γ value and it will be a good estimate for the exact density shape. The step of CCA algorithm is presented below:

1) Initialize γ, set the size of step length s , determine threshold of the correlation.

2) Calculate the correlation of the values of γ)(k s x J ~

and

s k s x J +γ)(~

.

3) IF the correlation is greater than or equal to the threshold of the correlation, then choose the current γ to be the estimate of γ; else s +=γγ and go to step 2.

B. Fast Mean Shift Segmentation Based on Correlation Comparison Algorithm The main idea of fast mean shift segmentation based on

correlation comparison algorithm is: γ which is in formula

(8) is calculated by use of CCA firstly. Then the reciprocal of γ is regarded as the bandwidth of mean shift algorithm.

Finally, gray histogram is used in image segmentation algorithm in order to accelerate the running speed of algorithm. Let {}n x x x X ,,,21 = be a data set in a s-dimensional Euclidean space s

R , size of image is T S ×, the grayscale value of pixel which is in ),(t s is ),(t s f ,

{}1,,2,1,0),(max ?∈L t s f …. 1-d gray histogram of

image is defined as follow:

{}∑∑?=?=?∈?=101

0max 1,,2,1,0),),(()(S s T t L y y t s f y His …δ (9)

Where 1

)0(=δ,

)0)),(((=≠?y t s f δ, the

number of pixels with gray level y is )(y His . Data

items

i x of standard mean shift algorithm is replaced by statistic histogram )(y His , then new mean iteration

formula is get by

()()()()()()()

∑∑==+??=

=n

i i

i

n

i i

i i

G

i y His y w y y g y y His y w y y g y m y 1

2

12

1 (10)

The number of data which are processed drops greatly because histogram statistical properties is introduced into. Main steps of fast mean shift segmentation based on correlation comparison algorithm is presented below: 1) initialization 2) repeat

3) calculate γ by using of CCA

4) set reciprocal of γ as the bandwidth of mean shift algorithm

5) calculate mean drift vector using formula (10) 6) until convergence condition is get

IV. EXPERIMENTAL RESULTS AND ANALYSIS

To show our proposed fast mean shift segmentation based on correlation comparison algorithm outperforms the traditional mean shift, we use three test patterns to demonstrate the performance. These test patterns are widely used in image segmentation literatures which are standard gray image named cameraman, rice and mri. The proposed new algorithm is compared with the traditional mean shift algorithm and mean shift segmentation based on correlation comparison algorithm. Fig.1, Fig.2 and Fig.3 show the experimental results with these three algorithms. Fig.1(a),

Fig.2(a) and Fig.3(a) are original images; Fig.1(b), Fig.2(b),

and Fig.3(b) are the experimental results of mean shift algorithm; Fig.1(c), Fig.2(c),and Fig.3(c) are the results of CCA based mean shift algorithm; the results of proposed fast

mean shift segmentation based on correlation comparison algorithm are showed in Fig.1(d), Fig.2(d)and Fig.3(d). Table

1 tabulates the running time of these three algorithms on the test images.

T ABLE E XPERIMENTAL RESULTS OF THE THREE ALGORITHMS ON TEST

IMAGES image

algorithm running time (second) cameraman Mean

shift algorithm 1.32129 CCA based mean shift algorithm 127.5634

proposed new algorithm

8.875870

rice Mean

shift algorithm 2.253899 CCA based mean shift algorithm 241.20281 proposed new algorithm

22.856489

mri Mean shift algorithm

1.54256 CCA based mean shift algorithm 183.25647 proposed new algorithm 16.2548

From the point of view of the visual analysis, the image segmented with our new algorithm has an aspect a little more natural with regard to the original image. Moreover, most of details are preserved when using our new algorithm and the segmentation ability of our new algorithm is excellent which has a powerful capability distinguishing objects in the image. As seen from Fig.1, distant scenery details are retained when using the proposed new algorithm, but it dose not when using standard mean shift algorithm. In Fig.2, image segmentation results using new algorithm are more close to the original image. From Fig.3 we can see that image segmentation results using new algorithm are more natural and more details of the skull are kept.

From the table 1 we can see that the running time of our new algorithm is between the mean shift algorithm and the CCA based mean shift algorithm. Although the running time of our new algorithms is longer than that of mean shift algorithm, the quality of image segmentation of our new algorithm is best. The proposed new algorithm is a trade off between segmentation quality and running time.

I

Fig.1. Comparison of segmentation results on cameraman image. (a) Original image (b) result of mean shift algorithm (c) result of CCA based mean shift algorithm (d) result of proposed new algorithm

Fig.2. Comparison of segmentation results on rice image. (a) Original image (b) result of mean shift algorithm (c) result of CCA based mean shift algorithm (d) result of proposed new algorithm

V.CONCLUSION

Bandwidth is the important parameters of the mean drift algorithm which not only determines the number of sampling points in iterative process, but also influences convergence speed and accuracy of algorithm. So it is important to select bandwidth. In this paper, bandwidth is calculated by CCA, then mean shift algorithm is used for image segmentation which avoid subjectivity of determining bandwidth artificially. In order to accelerate the running speed of algorithm, gray histogram is introduced into standard algorithm. Experimental results on the test patterns are given to demonstrate the robustness and validity of the proposed algorithm used for image segmentation.

Fig.3. Comparison of segmentation results on mri image. (a) Original image (b) result of mean shift algorithm (c) result of CCA based mean shift algorithm (d) result of proposed new algorithm

R EFERENCES

[1] K. Fukunaga and L.D. Hostetler, “The estimation of the gradient of a

density function with applications in pattern recognition,” IEEE Trans.

Inform. Theory, vol. 21, no. 1, pp. 32-40, 1975.

[2] Y. Z. Cheng, “Mean shift, mode seeking, and clustering,” IEEE Trans.

Pattern Anal. Mach. Intell., vol. 17, no. 8, pp. 790-799, 1995.

[3]Comaniciu D, “An algorithm for data-driven bandwith selection,”

IEEE Trans. Pattern Anal. Mach. Intell., vol. 25, no. 2, pp. 281-288, 2003.

[4] B. Georgescu, I. Shimshoni and P. Meer, “Mean shift based clustering

in high dimensions: A texture classification example,” in Proc. 9th IEEE Int.. Conf. Computer Vision, Nice, France, 2003, pp. 456-463. [5]Comaniciu D., Ramesh V, and P. Meer , “The Variable Bandwidth

Mean Shift and Data-Driven Scale Selection,” In Proc. 7th IEEE Int.

Conf . Computer Vision, 2001, pp. 438-445.

[6] D. Comaniciu and P. Meer, “Mean shift: A Robust Approach toward

Feature Analysis,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 24, no.

5, pp. 603-619, 2002.

[7]Z. H. Wang, F. Liu, and L.C. Jiao, “A Remote Sensing Image

Segmentation Algorithm Based on Vision Information,” Chinese Journal of Computers, vol. 28, no. 10, pp. 1687-1691, Oct. 2005. [8]Z. Zivkovic and B. Krose, “An EM-like algorithm for

color-histogram-based object tracking,” In Proc. International Conf.

Computer Vision and Pattern Recognition, Washington, 2004, pp.

798-803.

[9] N.S. Peng, J. Yang, and Z. Liu, “Mean shift blob tracking with kernel

histogram filtering and hypothesis testing,” Pattern Recognit. Lett., vol.

26, no. 5, pp. 605-614, Apr. 2005.

[10]O. Debeir, P.V. Ham, and R. Kiss, “Tracking of migrating cells nuder

phase-contrast video microscopy with combined mean-shift processes,” IEEE Trans. Med. Imaging, vol. 24, no. 6, pp. 697-711, Jun.

2005.

[11] D. DeMenthon and D. Doermann , “Video retrieval using

spatio-temporal descriptors pages,” In Pro. 11th ACM International conference on Multimedia, Hawthorne, 2003, pp. 508-517.

[12] F. Camastra and A. Verri, “A novel kernel method for clustering,”

IEEE Trans. Pattern Anal. Mach. Intell., vol. 27, no. 5, pp. 801-805, May 2005.

[13]M. Girolami, “Mercer kernel based clustering in feature space,” IEEE

Trans. Neural Netw., vol. 13, no. 3, pp. 780-784, May 2002.

[14] B. W. Silverman, Density Estimation for Statistics and Data Analysis.

London: Chapman & Hall, 1986.

[15]M. S. Yang and K. L. Wu, “A Similarity-Based Robust Clustering

Method,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 26, no. 4, pp.

434-448, Apr. 2004.

相关文档
最新文档