32 #include <opencv2/highgui/highgui.hpp> 33 #include <opencv2/core/core.hpp> 34 #include <opencv2/features2d/features2d.hpp> 63 virtual void parseParameters(
const ParametersMap & parameters);
65 virtual void update();
67 virtual std::list<int> addNewWords(
68 const cv::Mat & descriptors,
72 std::vector<int> findNN(
const std::list<VisualWord *> & vws)
const;
73 std::vector<int> findNN(
const cv::Mat & descriptors)
const;
75 void addWordRef(
int wordId,
int signatureId);
76 void removeAllWordRef(
int wordId,
int signatureId);
80 const std::map<int, VisualWord *> &
getVisualWords()
const {
return _visualWords;}
83 int getLastIndexedWordId()
const;
85 unsigned int getIndexedWordsCount()
const;
86 unsigned int getIndexMemoryUsed()
const;
90 void setIncrementalDictionary();
91 void setFixedDictionary(
const std::string & dictionaryPath);
93 void exportDictionary(
const char * fileNameReferences,
const char * fileNameDescriptors)
const;
95 void clear(
bool printWarningsIfNotEmpty =
true);
96 std::vector<VisualWord *> getUnusedWords()
const;
97 std::vector<int> getUnusedWordIds()
const;
99 void removeWords(
const std::vector<VisualWord*> & words);
100 void deleteUnusedWords();
std::map< std::string, std::string > ParametersMap
std::map< int,int > _mapIdIndex
int _totalActiveReferences
void setLastWordId(int id)
float getNndrRatio() const
bool isIncrementalFlann() const
bool _newWordsComparedTogether
bool _incrementalDictionary
std::map< int,int > _mapIndexId
std::set< int > _notIndexedWords
std::map< int, VisualWord * > _unusedWords
std::set< int > _removedIndexedWords
static const int ID_START
unsigned int getNotIndexedWordsCount() const
unsigned int getUnusedWordsSize() const
static const int ID_INVALID
int getTotalActiveReferences() const
bool isIncremental() const
std::string _dictionaryPath
const std::map< int, VisualWord * > & getVisualWords() const
std::map< int, VisualWord * > _visualWords