AdMor
AdMor

Reputation: 91

Modifying an OpenCV RandomTree classifier

My problem : objective is to implement a computer vision paper which uses a random tree structure to regress pixels from a rgbd image to 3D world coordinates.

I used already OpenCv for AdaBoost and random forest but i never dived into the code. So now as i would like to modify the error function of the split node, i don't know if it's possible. I didn't see clear declarations in the header file.

Just to add some informations about what I want to do in the error function. The input is a pixel (i,j). Then in the error function depending on the parameter, a feature would be created from the rgbd image and a best split over the feature of each pixels of the subset would have to be found. The features clearly depend on the parameter and should be estimated during training.

My question : Is it possible to create a class extending CvRTrees and modifying the error function for each split node ? If yes, what member should be modified ? If no, do you know any librairy that could help me to achieve that.

Upvotes: 2

Views: 275

Answers (1)

AdMor
AdMor

Reputation: 91

As no one answered i will just post what i found out :

The CvRTrees use a fixed feature as input (e.g. a HOG descriptor). If you want to use random features, you have to either put all these features as input (which may be totally suboptimal or impossible).

Or you can create your own implementation of the weak classifier where the type of feature used is a random vraiable as for example the threshold could be.

Upvotes: 1

Related Questions