Commit a3ce652e authored by Maria Dimashova's avatar Maria Dimashova

fixed CvRTrees::read in case nactive_vars==var_count (thanks to Malcolm Reynolds)

parent 61515f78
......@@ -813,11 +813,16 @@ void CvRTrees::read( CvFileStorage* fs, CvFileNode* fnode )
active_var_mask = cvCreateMat( 1, var_count, CV_8UC1 );
{
// initialize active variables mask
CvMat submask1, submask2;
cvGetCols( active_var_mask, &submask1, 0, nactive_vars );
cvGetCols( active_var_mask, &submask2, nactive_vars, var_count );
CvMat submask1;
cvGetCols( active_var_mask, &submask1, 0, nactive_vars );
cvSet( &submask1, cvScalar(1) );
cvZero( &submask2 );
if( nactive_vars < var_count )
{
CvMat submask2;
cvGetCols( active_var_mask, &submask2, nactive_vars, var_count );
cvZero( &submask2 );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment