Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can I wrap these OpenCV C++ CvStatModel Methods in C successfully?

Kiril on of the main OpenCV developers is in talks with Arjun Comar to include his Autogenerated C wrappers for the C++ OpenCV functions in the next release of OpenCV 3.0.0. Arjun Comar has a buildable fork of 3.0.0 here https://github.com/arjuncomar/opencv that creates a file in the "build" folder called opencv_generated.cpp when you build his release. in that file are 500 or so C wrappers for C++ functions...but I noticed only two of the CvStatModel Class methods from the Machine Learning part of opencv are included in that file....load and save....I pasted the contents on past bucket here:http://pastebucket.com/22680. for reference but below are the 2 CvStatModel wrappers from opencv_generated.cpp

void cv_CvStatModel_save2(CvStatModel* self, c_string filename, c_string name) {
    self->save(filename, name);
}    

void cv_CvStatModel_load2(CvStatModel* self, c_string filename, c_string name) {
    self->load(filename, name);
}

i was hoping someone could take a look at the above 2 wrappers and compare them with the 10 or so methods (CvStatModel) here in opencv documentation http://docs.opencv.org/modules/ml/doc/statistical_models.html#cvstatmodel

and tell me why the other 8 or so CvStatModel methods werent included in opencv_generated.cpp....was it my build...too hard to wrap i/e

a method from the prev documentation link has trailing periods in its parameter declarations i/e below

float CvStatModel::predict(const Mat& sample, ...) const 
// what do the trailing dots mean....Is that what it predicts?

so that seems hard to wrap.....If some one can give me a clue as to whether or not its possible to wrap all the CvStatModel Methods in c before I get started that could save time in the long run and help me learn this soon to be added important part of OpenCV...thx in advance to any takers=).....and an addendum extra question would learning neural networks and applying them to opencv code be more advantageous than learning the Machine Learning part of OpenCV....like is the Machine Learning part of OpenCV so, excuse my french=), badass, that it would trump any neural network.

click to hide/show revision 2
retagged

updated 2013-11-21 02:59:21 -0600

berak gravatar image

Can I wrap these OpenCV C++ CvStatModel Methods in C successfully?

Kiril on of the main OpenCV developers is in talks with Arjun Comar to include his Autogenerated C wrappers for the C++ OpenCV functions in the next release of OpenCV 3.0.0. Arjun Comar has a buildable fork of 3.0.0 here https://github.com/arjuncomar/opencv that creates a file in the "build" folder called opencv_generated.cpp when you build his release. in that file are 500 or so C wrappers for C++ functions...but I noticed only two of the CvStatModel Class methods from the Machine Learning part of opencv are included in that file....load and save....I pasted the contents on past bucket here:http://pastebucket.com/22680. for reference but below are the 2 CvStatModel wrappers from opencv_generated.cpp

void cv_CvStatModel_save2(CvStatModel* self, c_string filename, c_string name) {
    self->save(filename, name);
}    

void cv_CvStatModel_load2(CvStatModel* self, c_string filename, c_string name) {
    self->load(filename, name);
}

i was hoping someone could take a look at the above 2 wrappers and compare them with the 10 or so methods (CvStatModel) here in opencv documentation http://docs.opencv.org/modules/ml/doc/statistical_models.html#cvstatmodel

and tell me why the other 8 or so CvStatModel methods werent included in opencv_generated.cpp....was it my build...too hard to wrap i/e

a method from the prev documentation link has trailing periods in its parameter declarations i/e below

float CvStatModel::predict(const Mat& sample, ...) const 
// what do the trailing dots mean....Is that what it predicts?

so that seems hard to wrap.....If some one can give me a clue as to whether or not its possible to wrap all the CvStatModel Methods in c before I get started that could save time in the long run and help me learn this soon to be added important part of OpenCV...thx in advance to any takers=).....and an addendum extra question would learning neural networks and applying them to opencv code be more advantageous than learning the Machine Learning part of OpenCV....like is the Machine Learning part of OpenCV so, excuse my french=), badass, that it would trump any neural network.