I am now training the svm for binary classifier problems. positive label is +1, and negative label is -1. The trainingData is just histogramm of hue with 180 bins. Totally there are 70 samples.
The problem appears as following:
SVM.train(trainingData, labels, Mat(), Mat(), params);
where trainingData is a 70180 one channel matrix and labels is a 701 one channel matrix. The matrices are constructed as following:
Mat trainingData(70,180,CV_32FC1); Mat labels(70,1,CV_32FC1);
The error is: OpenCV Error: Bad argument (response #0 is not integral) in cvPreprocessCategoricalResponses, file /home/adminics/Downloads/opencv-2.4.13/modules/ml/src/inner_functions.cpp, line 715 terminate called after throwing an instance of 'cv::Exception' what(): /home/adminics/Downloads/opencv-2.4.13/modules/ml/src/inner_functions.cpp:715: error: (-5) response #0 is not integral in function cvPreprocessCategoricalResponses
Aborted (core dumped)
I saw some people had same problems as me. But no solutions yet.
Thank you. Best, waschbear