Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error while saving model with svm

i am trying to implement svm but every time i try to save the model after training it says.

OpenCV Error: Parsing error (SVM model data is invalid, check sv_count, var_* and class_count tags) in write, file /home/pixar/Downloads/OpenCV/modules/ml/src/svm.cpp, line 2038 terminate called after throwing an instance of 'cv::Exception' what(): /home/pixar/Downloads/OpenCV/modules/ml/src/svm.cpp:2038: error: (-212) SVM model data is invalid, check sv_count, var_* and class_count tags in function write

here is my code. https://ideone.com/8uXuXV