How to inherit from cv::ml::Algorithm class and overload its methods in OpenCV 3.x

asked 2016-01-23 09:47:22 -0600

Creator gravatar image

Dear all,

I would like to overload method predict() from the cv::ml::RTrees class in order to achieve array of beliefs for all classes instead of a simple class prediction. For this purpose I need also access to the class variables, like roots and ntrees.

For the OpenCV v.2.4.11 it worked fine, please see the Link:source code

Please advise how to overload a class method from cv::ml::RTrees.

Thank you in advance

edit retag flag offensive close merge delete


simply inheriting from Algorithm, StatModel or RTrees won't work, since the implementation is deeply hidden in mp/src/rtrees.cpp

berak gravatar imageberak ( 2016-01-23 09:59:05 -0600 )edit