Ask Your Question
0

svm : create a new instance

asked 2015-10-03 02:27:40 -0600

I am a novice to the opecv 3.0- SVM. Facing the following problem. Thanks in advance for the help.

How can I create a new SVM instance? Can I use the 'new' operator in C++?

If I use Ptr<svm> mysvm1 = new SVM; An error is generated. Here I have copied the error message. error: invalid new-expression of abstract class type 'cv::ml::SVM'

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-10-03 02:35:35 -0600

berak gravatar image

updated 2015-10-03 02:36:20 -0600

no you cannot use new , you need SVM::create();

have a look at the letter_recog.cpp sample here

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-03 02:27:40 -0600

Seen: 118 times

Last updated: Oct 03 '15