Speeded up descriptors evaluations using clear ()

This commit is contained in:
Ilya Lysenkov
2010-06-02 06:55:03 +00:00
parent 8e526dc58a
commit bb235220e7
4 changed files with 73 additions and 32 deletions

View File

@@ -204,7 +204,7 @@ void OneWayDescriptorMatch::add( const Mat& image, vector<KeyPoint>& keypoints )
{
if( base.empty() )
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.pcaFilename,
params.trainPath, params.trainImagesList);
params.trainPath, params.trainImagesList, params.minScale, params.maxScale, params.stepScale);
size_t trainFeatureCount = keypoints.size();
@@ -225,7 +225,7 @@ void OneWayDescriptorMatch::add( KeyPointCollection& keypoints )
{
if( base.empty() )
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.pcaFilename,
params.trainPath, params.trainImagesList);
params.trainPath, params.trainImagesList, params.minScale, params.maxScale, params.stepScale);
size_t trainFeatureCount = keypoints.calcKeypointCount();
@@ -275,6 +275,12 @@ void OneWayDescriptorMatch::classify( const Mat& image, vector<KeyPoint>& points
}
}
void OneWayDescriptorMatch::clear ()
{
GenericDescriptorMatch::clear();
base->clear ();
}
/****************************************************************************************\
* CalonderDescriptorMatch *
\****************************************************************************************/