views:

997

answers:

1

Hi, I'm using Opencv's K-means implementation to cluster a large set of 8-dimensional vectors. They cluster fine, but I can't find any way to see the prototypes created by the clustering process. Is this even possible? OpenCV only seems to give access to the cluster indexes (or labels).

If not I guess it'll be time to make my own implementation!

Thanks, Ian

+5  A: 

I can't say I used OpenCV's implementation of Kmeans, but if you have access to the labels given to each instance, you can simply get the centroids by calculating the average vector of instances belong to each of the clusters.

Amro
Of course! Thanks!
ianhales