int main(int argc, char* argv[]){
Mat aObj, bObj;
string fList("horse.jpg");
for(int i = 0; i < 10; i++){
aObj = imread(fList, CV_32FC1);
}
string fRes("horse-2.jpg");
bObj = imread(fList, CV_32FC1);
CvKNearest C(aObj, bObj); //error after here
return 0;
}
AFAIK CV_32FC1 is supposed to do the trick and since I am using opencv 2.2 and other stuff runs well I don't get the problem. Mat is a valid argument type (Intellisense shows the options in the box), using visual studio 2010. Debugging taced the problem to inner_functions.cpp in ../../Opencv2.2.0/modules/ml/src/ The function raising the error is cvCheckTrainData. Please help.