OpenCV's cvKMeans2 - chosing clusters
Posted
by Goffrey
on Stack Overflow
See other posts from Stack Overflow
or by Goffrey
Published on 2010-03-28T16:27:49Z
Indexed on
2010/03/28
16:33 UTC
Read the original article
Hit count: 557
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!
© Stack Overflow or respective owner