Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV c++ K-Means Color Clustering


I found some interesting article about colour clustering with OpenCV and Python:

I am trying to convert that into c++. Until now without success. Did someone do that already?

Currently I have a problem with following lines:

// reshape the image to be a list of pixels image = image.reshape((image.shape[0] * image.shape[1], 3))

// cluster the pixel intensities clt = KMeans(n_clusters = args["clusters"])