Fixed FernDescriptorMatch

This commit is contained in:
Ilya Lysenkov
2010-06-09 10:03:56 +00:00
parent 3cdfad6097
commit 11f9dafdca
2 changed files with 8 additions and 5 deletions

View File

@@ -588,12 +588,15 @@ void FernDescriptorMatch::match( const Mat& image, vector<KeyPoint>& keypoints,
{
trainFernClassifier();
float bestProb = 0;
indices.resize( keypoints.size() );
vector<float> signature( (size_t)classifier->getClassCount() );
for( size_t pi = 0; pi < keypoints.size(); pi++ )
calcBestProbAndMatchIdx( image, keypoints[pi].pt, bestProb, indices[pi], signature );
{
//calcBestProbAndMatchIdx( image, keypoints[pi].pt, bestProb, indices[pi], signature );
//TODO: use octave and image pyramid
indices[pi] = (*classifier)(image, keypoints[pi].pt, signature);
}
}
void FernDescriptorMatch::classify( const Mat& image, vector<KeyPoint>& keypoints )