123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /**
- * @file LFGenericLocal.cpp
- * @brief generic local features
- * @author Erik Rodner
- * @date 02/05/2008
- */
- #include <iostream>
- #include <sstream>
- #include "vislearning/features/localfeatures/LFGenericLocal.h"
- #include "vislearning/features/localfeatures/LocalFeatureSift.h"
- #include "vislearning/features/localfeatures/IDRandomSampling.h"
- using namespace OBJREC;
- using namespace std;
- using namespace NICE;
- LFGenericLocal::LFGenericLocal( const Config *conf, int numFeatures )
- {
- lf = new LocalFeatureSift(conf);
- id = new IDRandomSampling(conf, numFeatures);
- }
- LFGenericLocal::~LFGenericLocal()
- {
- delete lf;
- }
- int LFGenericLocal::getDescSize () const
- {
- return lf->getDescSize();
- }
- int LFGenericLocal::extractFeatures ( const NICE::Image & img,
- VVector & features,
- VVector & positions ) const
- {
- id->getInterests ( img, positions );
- lf->getDescriptors ( img, positions, features );
- return 0;
- }
- void LFGenericLocal::visualizeFeatures ( NICE::Image & mark,
- const VVector & positions,
- size_t color ) const
- {
- lf->visualizeFeatures ( mark, positions, color );
- }
|