1 | initial version |
tflag is one of CV_ROW_SAMPLE or CV_COL_SAMPLE
if you put one sample per row of your trainmat, use CV_ROW_SAMPLE and a Mat(num_samples,1,CV32S) for resonses.
// TrainingMat responses
s a m p l e 1
s a m p l e 2
s a m p l e 1
s a m p l e 2
s a m p l e 1
s s s s s // trainingmat
a a a a a
m m m m m
p p p p p
l l l l l
e e e e e
1 2 1 2 1 // responses