1 | initial version |
don't preallocate with the wrong datatype here (push_back() won't change this):
Mat trainingData(0, dictSize, CV_32S);
train data for the SVM needs to be float, not int !
just use:
Mat trainingData; // all you need.
2 | No.2 Revision |
don't preallocate with the wrong datatype here (push_back() won't change this):
Mat trainingData(0, dictSize, CV_32S);
train data for the SVM needs to be float, not int !
just use:
Mat trainingData; // all you need.
need. 1st push_back() will determine the type