Hello everybody,
I'm confronted to a problem in my attempt to use Kmean form OpenCV. I'am using C++11 with the IDE qtcreator on ubuntu 14.04.
Concerning my problem, I have a collection of samples caracterized by a constant amount of complex features.
My first Idea was to send a vecor of vector of complex to kmean but as you may no it didn't work. So i decided to use a cv::Mat filled with my samples. So I have a cv::Mat in which: rows = samples cols = features (a complex coefficient is seen as two float so the real number of features in my cv::Mat is twice the original number of features).
With such an input, I have no error when running the code BUT, the outpur of : cv::kmeans(bdd, nbClusters, labels,cv::TermCriteria( CV_TERMCRIT_EPS+CV_TERMCRIT_ITER, 10, 1.0), attempts, cv::KMEANS_RANDOM_CENTERS, centers );
cerr << centers.size() << endl;
cerr << centers<< endl;
cerr << labels.size() << endl;
is:
[0 x 0]
[]
[1 x 800]
So the kmean function did not work.
Does someone has an idea of how to fix that promblem?
Thanks a lot