Я пытаюсь обучить SVM с помощью opencv trainauto, когда матрица обучающих данных меньше 4 строк, все в порядке, но когда выше, я получаю эту ошибку
OpenCV Error: Bad argument (While cross-validation one or more of the classes have been fell out of the sample. Try to reduce <Params::k_fold>) in do_train
вот часть кода, которую я использую:
svm = SVM::create();
std::cout<<"creation of svm done\n";
svm->setType(SVM::C_SVC);
svm->setKernel(SVM::RBF);
if(Motionsvm_training_data.type() != CV_32F) Motionsvm_training_data.convertTo(Motionsvm_training_data,CV_32F);
// Train the SVM with given parameters
Ptr<TrainData> td = TrainData::create(Motionsvm_training_data, ROW_SAMPLE,MotionfaceLabels);
svm->trainAuto(td);
пожалуйста, помогите .. спасибо