Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

again, api has changed significantly with opencv3. please use:

#include <opencv2/ml.hpp> // NOT the C-api (!!) ml.h
Ptr<RTrees> rtrees = RTrees::create(); // you HAVE TO use cv::Ptr.
rtrees->setMaxDepth(10);    // no more Params struct, setters/getters instead.
rtrees->setMinSampleCount(2);
...

have a look here for a complete example