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.