hi every one i have a little problem training my SVM algorithm in android.here is my code
Imgproc.calcHist(list, channels, new Mat(), hist, histSize, ranges);
Imgproc.calcHist(lis, channels, new Mat(), his, histSize, ranges);
// tl.setText(his.toString());
Mat train_data = new Mat(2, 0, CvType.CV_32FC1);
train_data.push_back(hist);
train_data.push_back(his);
Mat train_dat = new Mat(2, 0, CvType.CV_32FC1);
train_dat.put(2, 0, labelArray);
CvSVM svm = new CvSVM();
CvSVMParams params = new CvSVMParams();
params.set_svm_type(CvSVM.C_SVC);
params.set_kernel_type(CvSVM.LINEAR);
params.set_term_crit(new TermCriteria(TermCriteria.EPS, 100, 1e-6));
svm.train_auto(train_data, train_dat, new Mat(), new Mat(), params);
when i run it i get errors of this sort
03-15 13:08:30.065: E/cv::error()(381): OpenCV Error: Bad argument (Invalid response array) in cvPreprocessCategoricalResponses, file /home/reports/ci/slave/50-SDK/opencv/modules/ml/src/inner_functions.cpp, line 664
03-15 13:08:30.120: E/AndroidRuntime(381): CvException [org.opencv.core.CvException: /home/reports/ci/slave/50-SDK/opencv/modules/ml/src/inner_functions.cpp:664: error: (-5) Invalid response array in function cvPreprocessCategoricalResponses
03-15 13:08:30.120: E/AndroidRuntime(381): at org.opencv.ml.CvSVM.train_auto_1(Native Method)
03-15 13:08:30.120: E/AndroidRuntime(381): at org.opencv.ml.CvSVM.train_auto(CvSVM.java:395)
i need your help pliz.thnx