Ask Your Question

Revision history [back]

click to hide/show revision 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.

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