Fixed bugs in FernDescriptorMatch and FernClassifier

This commit is contained in:
Ilya Lysenkov
2010-06-08 06:54:17 +00:00
parent 165f2520c9
commit 15413c8d40
2 changed files with 2 additions and 2 deletions

View File

@@ -853,7 +853,7 @@ void FernClassifier::train(const vector<Point2f>& points,
for( i = 0; i < nsamples; i++ )
{
Point2f pt = points[i];
const Mat& src = *refimgs[i];
const Mat& src = labels.empty() ? *refimgs[i] : *refimgs[labels[i]];
int classId = labels.empty() ? i : labels[i];
if( verbose && (i+1)*progressBarSize/nsamples != i*progressBarSize/nsamples )
putchar('.');