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

asked Jan 23 '16

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

Preview: (hide)

Comments

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

berak gravatar imageberak (Jan 23 '16)edit