I am not familiar with the kmeans method.
Core.kmeans(samples32f, k, labels, criteria, 1, Core.KMEANS_PP_CENTERS, centers);
int r = (int)centers.get(label, 2)[0];
int g = (int)centers.get(label, 1)[0];
int b = (int)centers.get(label, 0)[0];
These can provide the information of RGB values of each center. How can I get the coordinates of centers of k-mean clustering?
↧