I am using openCV 2.4.10. I have an application that trains a NormalBayesClassifier based on the BOW descriptors. It works nice, but I want to test the SVM too. When I have changed the classifier to SVM, in the training process (bothe train and train_auto) I am getting errors like
OpenCV Error: Incorrect size of input array (Input sample must be 1-dimensional vector) in cvPreparePredictData, file /home/me/opencv/modules/ml/src/inner_functions.cpp, line 1107
terminate called after throwing an instance of 'cv::Exception'
what(): /home/me/opencv/modules/ml/src/inner_functions.cpp:1107: error: (-201) Input sample must be 1-dimensional vector in function cvPreparePredictData
The training data Mat is 90x150 and the labels is 90x1. It is true that there are 9 classes (so 10 images per class; just for testing for now). Could it be because the SVM cannot have more than 2 classes? Norally it could.
Please help...