Wrapping k-means for unsupervised color clustering.
I don't know why the opencv's k-means implementation returns properly classified segments, but the cluster centroids look odd. In this example I had to ignored the opencv centroids and recalculating them in a different way.
Two clustering samples of color and grayscale clustering created with this commit on a RGB image and its depth-map, respectively.
Wrapping k-means for unsupervised color clustering.
I don't know why the opencv's k-means implementation returns properly classified segments, but the cluster centroids look odd. In this example I had to ignored the opencv centroids and recalculating them in a different way.
Two clustering samples of color and grayscale clustering created with this commit on a RGB image and its depth-map, respectively.