mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
fixed CvRTrees::read in case nactive_vars==var_count (thanks to Malcolm Reynolds)
This commit is contained in:
parent
61515f78c3
commit
a3ce652eb4
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user