Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Answer: I was loading the SVM incorrectly, as per this other question:

http://answers.opencv.org/question/93682/svm-model-fails-to-load/

in opencv3, Algorithm::load() creates a new instance, so you have to load your SVM like:

Ptr<ml::svm> classifier = Algorithm::load<ml::svm>(filename); (in your original code, the newly loaded model was discarded, never transferred to your classifier instance)