Ask Your Question

tpacker's profile - activity

2019-05-14 06:17:18 -0600 received badge  Notable Question (source)
2017-09-11 23:19:13 -0600 received badge  Popular Question (source)
2015-08-10 17:44:03 -0600 commented question How to SVM predict more than one sample?

No batch predict function? Then what does the predict function documentation mean when it says "Predicts response(s) for the provided sample(s)" implying that we can get multiple predictions for multiple samples/instances? http://docs.opencv.org/3.0-beta/modul...

2015-08-06 18:11:05 -0600 received badge  Supporter (source)
2015-08-06 18:11:00 -0600 received badge  Scholar (source)
2015-08-06 17:42:52 -0600 commented answer cv::ml not compiling in opencv 3.0

Thanks. That works. g++ now compiles and it runs. NetBeans still says "Unable to resolve identifier SVM." for some reason, but that may be a NetBeans-specific error.

By the way, was I looking at the wrong documentation/tutorial, or should that one be updated as you illustrate above?

2015-08-06 17:03:45 -0600 commented answer cv::ml not compiling in opencv 3.0

Thanks. That is a step in the right direction. When I add your second pair of lines, I get the following error:

sploit_page_classifier.cpp:152:28: error: cannot allocate an object of abstract type ‘cv::ml::SVM’
SVM my_svm = SVM::create();
                        ^
2015-08-06 16:44:11 -0600 received badge  Student (source)
2015-08-06 16:02:26 -0600 asked a question cv::ml not compiling in opencv 3.0

I downloaded, built, and installed OpenCV 3.0.0 on Ubuntu 14.10, 64-bit. I have a C++ project in NetBeans that compiles, links, and runs. I am now trying to follow the tutorial here: http://docs.opencv.org/3.0-beta/doc/t...

I have the "#includes" and the "using namespaces" as specified in the tutorial, and NetBeans and g++ both seem able to find these things. But when I add some ml-specific code such as "SVM::Params params;", I get compiler errors, below.

g++ -std=c++11   -c -g -I/usr/local/include -I/usr/include/libxml2/ -I/usr/local/include/opencv2 -MMD -MP -MF "build/Debug/GNU-Linux-x86/my_file.o.d" -o build/Debug/GNU-Linux-x86/my_file.o my_file.cpp
my_file.cpp: In function ‘void mynamespace::myFunction()’:
my_file.cpp:153:3: error: ‘Params’ is not a member of ‘cv::ml::SVM’
   SVM::Params params;
   ^

What might I be missing?