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
388
388
results = output.getMat ();
389
389
for ( i = 0 ; i < nsamples; i++ )
390
390
{
391
+ const Mat sampleRow = samples.row (i);
391
392
for ( j = 0 ; j < ntrees; j++ )
392
393
{
393
- float val = predictTrees ( Range (j, j+1 ), samples. row (i) , flags);
394
+ float val = predictTrees ( Range (j, j+1 ), sampleRow , flags);
394
395
results.at <float > (i, j) = val;
395
396
}
396
397
}
@@ -408,9 +409,10 @@ class DTreesImplForRTrees CV_FINAL : public DTreesImpl
408
409
for ( i = 0 ; i < nsamples; i++ )
409
410
{
410
411
votes.clear ();
412
+ const Mat sampleRow = samples.row (i);
411
413
for ( j = 0 ; j < ntrees; j++ )
412
414
{
413
- int val = (int )predictTrees ( Range (j, j+1 ), samples. row (i) , flags);
415
+ int val = (int )predictTrees ( Range (j, j+1 ), sampleRow , flags);
414
416
votes.push_back (val);
415
417
}
416
418
You can’t perform that action at this time.
0 commit comments