views:

293

answers:

0

Hi, I'm using cvKMeans2 for clustering, but I'm not sure, how it works in general - the part of choosing clusters. I thought that it set the first positions of clusters from given samples. So it means that in the end of clustering process would every cluster has at least one sample -> in the output array of cluster labels will be full range of numbers (for 100 clusters - numbers 0 to 99). But as I checked output labels, I realised that some labels weren't used at all and only some were used.

So, does anyone know, how it works? Or how should I use the parameters of cvKMeans2 to do what I want (cause I'm not sure if I use them right)?

I'm using cvKMeans2 function also with optional parameters:

cvKMeans2(descriptorMat, N_CLUSTERS, clusterLabels, cvTermCriteria( CV_TERMCRIT_EPS+CV_TERMCRIT_ITER, 10, 1.0), 1, 0, 0, clusterCenters, 0)

Thanks for any advices!