Fixed FernDescriptorMatch

pull/13383/head
Ilya Lysenkov 15 years ago
parent 3cdfad6097
commit 11f9dafdca
  1. 7
      modules/features2d/src/descriptors.cpp
  2. 6
      tests/cv/src/adetectordescriptor_evaluation.cpp

@ -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 )

@ -1434,9 +1434,9 @@ void DescriptorQualityTest::readAlgorithm( )
else if (! algName.compare ("fern"))
{
FernDescriptorMatch::Params params;
params.nviews = 50;
params.signatureSize = 80;
params.nstructs = 20;
params.nviews = 100;
params.signatureSize = INT_MAX;
params.nstructs = 50;
defaultDescMatch = new FernDescriptorMatch (params);
specificDescMatch = new FernDescriptorMatch ();
}

Loading…
Cancel
Save