Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Algorithm::load returns a new object , you should load your SVM like this:

Ptr<ml::SVM> svm = Algorithm::load<ml::SVM>("svm_filename");

your example above discards the data read from file, and does not initialize your svm properly.