Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to generate xml file of svm classifier using opencv3.0-beta

In opencv3.0, we can code like following to train svm classifier. Ptr<svm> svm = StatModel::train<svm>(trainingDataMat, ROW_SAMPLE, labelsMat,params); However,there is no way to save the result as xml file. In the early version, we can use svm.save("svm.xml") to save the result. It's so convenient. So I want to know how to generate xml file of svm classifier using opencv3.0-beta. Thank you for your suggestions!

How to generate xml file of svm classifier using opencv3.0-beta

In opencv3.0, we can code like following to train svm classifier. Ptr<svm> classifier.

Ptr<SVM> svm = StatModel::train<svm>(trainingDataMat, StatModel::train<SVM>(trainingDataMat, ROW_SAMPLE, labelsMat,params);

However,there is no way to save the result as xml file. In the early version, we can use svm.save("svm.xml") to save the result. It's so convenient. So I want to know how to generate xml file of svm classifier using opencv3.0-beta. Thank you for your suggestions!