1-dimensional k-means clustering c++

yep :wink:

it’s also a good idea, to avoid the at() operation, wherever you can, e.g.

cout << centers.type() << " " << centers.size() << " " << centers << endl;

(you can print the Mat as a whole !)