Fixed FernDescriptorMatch
This commit is contained in:
parent
3cdfad6097
commit
11f9dafdca
@ -588,12 +588,15 @@ void FernDescriptorMatch::match( const Mat& image, vector<KeyPoint>& keypoints,
|
|||||||
{
|
{
|
||||||
trainFernClassifier();
|
trainFernClassifier();
|
||||||
|
|
||||||
float bestProb = 0;
|
|
||||||
indices.resize( keypoints.size() );
|
indices.resize( keypoints.size() );
|
||||||
vector<float> signature( (size_t)classifier->getClassCount() );
|
vector<float> signature( (size_t)classifier->getClassCount() );
|
||||||
|
|
||||||
for( size_t pi = 0; pi < keypoints.size(); pi++ )
|
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 )
|
void FernDescriptorMatch::classify( const Mat& image, vector<KeyPoint>& keypoints )
|
||||||
|
@ -1434,9 +1434,9 @@ void DescriptorQualityTest::readAlgorithm( )
|
|||||||
else if (! algName.compare ("fern"))
|
else if (! algName.compare ("fern"))
|
||||||
{
|
{
|
||||||
FernDescriptorMatch::Params params;
|
FernDescriptorMatch::Params params;
|
||||||
params.nviews = 50;
|
params.nviews = 100;
|
||||||
params.signatureSize = 80;
|
params.signatureSize = INT_MAX;
|
||||||
params.nstructs = 20;
|
params.nstructs = 50;
|
||||||
defaultDescMatch = new FernDescriptorMatch (params);
|
defaultDescMatch = new FernDescriptorMatch (params);
|
||||||
specificDescMatch = new FernDescriptorMatch ();
|
specificDescMatch = new FernDescriptorMatch ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user