Ask Your Question

pefue's profile - activity

2019-12-09 10:55:38 -0500 commented question Can i find if a line connected component is strongly connected or not?

You could write your own region growing method which would follow valid ("white") pixels until the method reaches a pixe

2018-02-05 01:40:49 -0500 commented question Mock Camera Intrinsics

What do you mean by oddly stretched? Isn't the "stretch" occuring simply due to the perspective distortion? If you don't

2018-01-26 09:04:23 -0500 received badge  Editor (source)
2018-01-26 09:04:23 -0500 edited question Question on the Random Forest Classifier implementation

Question on the Random Forest Classifier implementation Hi, I am currently comparing OpenCV's RandomTrees Classifier wi

2018-01-26 08:58:54 -0500 asked a question Question on the Random Forest Classifier implementation

Question on the Random Forest Classifier implementation Hi, I am currently comparing OpenCV's RandomTrees Classifier wi

2018-01-26 08:16:25 -0500 answered a question can I use stereoCalibrate with different image sizes?

What about first calibrating the two cameras individually, and then in the second step using stereoCalibrate() only to r

2016-02-11 07:57:02 -0500 received badge  Enthusiast
2016-02-08 15:34:08 -0500 commented question RTrees training fails due to Assertion in calcDir

OpenCV 2.4.11's regression forest seems to work fine with the same data and same settings.

2016-02-02 03:55:25 -0500 asked a question RTrees training fails due to Assertion in calcDir

Hi,

I'm trying to train a random descision forest for regression but it fails due to an assertion in tree.cpp:1190

OpenCV Error: Assertion failed ((int)_sleft.size() < n && (int)_sright.size() < n) in cv::ml::DTreesImpl::calcDir, file C:\builds\master_PackSlave-win64-vc12-shared\opencv\modules\ml\src\tree.cpp, line 1190
exception caught: C:\builds\master_PackSlave-win64-vc12-shared\opencv\modules\ml\src\tree.cpp:1190: error: (-215) (int)_sleft.size() < n && (int)_sright.size() < n in function cv::ml::DTreesImpl::calcDir

With smaller training sets the forest seems to work fine, but as soon as I use > 20000 features it fails during training. My current settings are:

Ptr<RTrees> rtrees = RTrees::create();
rtrees->setMaxDepth(10);
rtrees->setMinSampleCount(10);
rtrees->setRegressionAccuracy(0.1f);
rtrees->setUseSurrogates(false);
rtrees->setMaxCategories(16);
rtrees->setPriors(Mat());
rtrees->setCalculateVarImportance(false);
rtrees->setActiveVarCount(1);
rtrees->setTermCriteria(TermCriteria(TermCriteria::MAX_ITER,100, 0));

Has anyone else experienced this problem or knows the reason for the error?

Thanks!