Ask Your Question
0

OpenCV 3.1 Random Forest - rtrees

asked 2016-03-01 16:22:39 -0600

mask2007 gravatar image

I'm trying to have access to number of classes and number of votes for each class in an RTrees object in OpenCV 3.1.

Apparently the structure of ver. 3.1 is very different from the previous versions. I'm not sure how to access variables like nclasses, and trees in ver. 3.1.

Does anyone has any insight?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-22 10:37:26 -0600

They have an example in the source code which shows how to set things up. Fom opencv git repo:

opencv/samples/cpp/letter_recog.cpp

I used this as a basis for my random forest implementation. You need to encapsulate your training data in the TrainData class and use method calls to set each paramter. I didn't use the 2.x versions, but that seems to be the big change?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-01 16:22:39 -0600

Seen: 388 times

Last updated: Mar 01 '16