Commit 11f9dafd authored by Ilya Lysenkov's avatar Ilya Lysenkov

Fixed FernDescriptorMatch

parent 3cdfad60
......@@ -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 ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment