File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,10 @@ class DTreesImplForRTrees CV_FINAL : public DTreesImpl
388388 results = output.getMat ();
389389 for ( i = 0 ; i < nsamples; i++ )
390390 {
391+ const Mat sampleRow = samples.row (i);
391392 for ( j = 0 ; j < ntrees; j++ )
392393 {
393- float val = predictTrees ( Range (j, j+1 ), samples. row (i) , flags);
394+ float val = predictTrees ( Range (j, j+1 ), sampleRow , flags);
394395 results.at <float > (i, j) = val;
395396 }
396397 }
@@ -408,9 +409,10 @@ class DTreesImplForRTrees CV_FINAL : public DTreesImpl
408409 for ( i = 0 ; i < nsamples; i++ )
409410 {
410411 votes.clear ();
412+ const Mat sampleRow = samples.row (i);
411413 for ( j = 0 ; j < ntrees; j++ )
412414 {
413- int val = (int )predictTrees ( Range (j, j+1 ), samples. row (i) , flags);
415+ int val = (int )predictTrees ( Range (j, j+1 ), sampleRow , flags);
414416 votes.push_back (val);
415417 }
416418
You can’t perform that action at this time.
0 commit comments