Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

'CvRTParams' : undeclared identifier (RandomForest, OpenCV, C++)

I am trying to implement Random Forest Classifier using OpenCV C++. But "CvRTParams", "CvRTrees", "CV_ROW_SAMPLE", "CV_VAR_CATEGORICAL", these keywords are not being recognized by my program and showing as "identifier undeclared". I have included the header "ml.h" and other related headers. Also, the library path is correct.

'CvRTParams' : undeclared identifier (RandomForest, OpenCV, C++)

I am trying to implement Random Forest Classifier using OpenCV C++. But "CvRTParams", "CvRTrees", "CV_ROW_SAMPLE", "CV_VAR_CATEGORICAL", these keywords are not being recognized by my program and showing as "identifier undeclared". I have included the header "ml.h" and other related headers. Also, the library path is correct.

Relevant Lines, CvRTrees *rtree = new CvRTrees; CvRTParams params = CvRTParams("all the parameters");

And I am using OpenCV 3 and Visual Studio 2012.