Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why CvSVM is non-copyable?

CvSVM class copy constructors are private.

private:
CvSVM(const CvSVM&);
CvSVM& operator = (const CvSVM&);

This generates a lot of trouble to manage several classifiers in stl containers. What is the best way to manage, for instance, a vector of CvSVM? I have tried by using C++11's unique_ptr but after training, when using the predict method, I get an error message saying that I have to train before predicting (which I already did).

Thanks,