#include <VWDictionary.h>
Public Types | |
enum | NNStrategy { kNNFlannNaive, kNNFlannKdTree, kNNFlannLSH, kNNBruteForce, kNNBruteForceGPU, kNNUndef } |
Public Member Functions | |
virtual std::list< int > | addNewWords (const cv::Mat &descriptors, int signatureId) |
virtual void | addWord (VisualWord *vw) |
void | addWordRef (int wordId, int signatureId) |
void | clear (bool printWarningsIfNotEmpty=true) |
void | deleteUnusedWords () |
void | exportDictionary (const char *fileNameReferences, const char *fileNameDescriptors) const |
std::vector< int > | findNN (const std::list< VisualWord * > &vws) const |
std::vector< int > | findNN (const cv::Mat &descriptors) const |
unsigned int | getIndexedWordsCount () const |
unsigned int | getIndexMemoryUsed () const |
int | getLastIndexedWordId () const |
float | getNndrRatio () const |
unsigned int | getNotIndexedWordsCount () const |
int | getTotalActiveReferences () const |
VisualWord * | getUnusedWord (int id) const |
std::vector< int > | getUnusedWordIds () const |
std::vector< VisualWord * > | getUnusedWords () const |
unsigned int | getUnusedWordsSize () const |
const std::map< int, VisualWord * > & | getVisualWords () const |
const VisualWord * | getWord (int id) const |
bool | isIncremental () const |
bool | isIncrementalFlann () const |
virtual void | parseParameters (const ParametersMap ¶meters) |
void | removeAllWordRef (int wordId, int signatureId) |
void | removeWords (const std::vector< VisualWord * > &words) |
void | setFixedDictionary (const std::string &dictionaryPath) |
void | setIncrementalDictionary () |
void | setLastWordId (int id) |
void | setNNStrategy (NNStrategy strategy) |
virtual void | update () |
VWDictionary (const ParametersMap ¶meters=ParametersMap()) | |
virtual | ~VWDictionary () |
Static Public Attributes | |
static const int | ID_INVALID = 0 |
static const int | ID_START = 1 |
Protected Member Functions | |
int | getNextId () |
Protected Attributes | |
int | _totalActiveReferences |
std::map< int, VisualWord * > | _visualWords |
Private Attributes | |
cv::Mat | _dataTree |
std::string | _dictionaryPath |
FlannIndex * | _flannIndex |
bool | _incrementalDictionary |
bool | _incrementalFlann |
int | _lastWordId |
std::map< int,int > | _mapIdIndex |
std::map< int,int > | _mapIndexId |
bool | _newWordsComparedTogether |
float | _nndrRatio |
std::set< int > | _notIndexedWords |
float | _rebalancingFactor |
std::set< int > | _removedIndexedWords |
NNStrategy | _strategy |
std::map< int, VisualWord * > | _unusedWords |
bool | useDistanceL1_ |
Definition at line 46 of file VWDictionary.h.
Enumerator | |
---|---|
kNNFlannNaive | |
kNNFlannKdTree | |
kNNFlannLSH | |
kNNBruteForce | |
kNNBruteForceGPU | |
kNNUndef |
Definition at line 49 of file VWDictionary.h.
rtabmap::VWDictionary::VWDictionary | ( | const ParametersMap & | parameters = ParametersMap() | ) |
Definition at line 63 of file VWDictionary.cpp.
|
virtual |
Definition at line 80 of file VWDictionary.cpp.
|
virtual |
Definition at line 634 of file VWDictionary.cpp.
|
virtual |
Definition at line 1251 of file VWDictionary.cpp.
void rtabmap::VWDictionary::addWordRef | ( | int | wordId, |
int | signatureId | ||
) |
Definition at line 603 of file VWDictionary.cpp.
void rtabmap::VWDictionary::clear | ( | bool | printWarningsIfNotEmpty = true | ) |
Definition at line 561 of file VWDictionary.cpp.
void rtabmap::VWDictionary::deleteUnusedWords | ( | ) |
Definition at line 1306 of file VWDictionary.cpp.
void rtabmap::VWDictionary::exportDictionary | ( | const char * | fileNameReferences, |
const char * | fileNameDescriptors | ||
) | const |
Definition at line 1316 of file VWDictionary.cpp.
std::vector< int > rtabmap::VWDictionary::findNN | ( | const std::list< VisualWord * > & | vws | ) | const |
Definition at line 936 of file VWDictionary.cpp.
std::vector< int > rtabmap::VWDictionary::findNN | ( | const cv::Mat & | descriptors | ) | const |
Definition at line 978 of file VWDictionary.cpp.
unsigned int rtabmap::VWDictionary::getIndexedWordsCount | ( | ) | const |
Definition at line 338 of file VWDictionary.cpp.
unsigned int rtabmap::VWDictionary::getIndexMemoryUsed | ( | ) | const |
Definition at line 343 of file VWDictionary.cpp.
int rtabmap::VWDictionary::getLastIndexedWordId | ( | ) | const |
Definition at line 326 of file VWDictionary.cpp.
|
protected |
Definition at line 598 of file VWDictionary.cpp.
|
inline |
Definition at line 81 of file VWDictionary.h.
|
inline |
Definition at line 82 of file VWDictionary.h.
|
inline |
Definition at line 84 of file VWDictionary.h.
VisualWord * rtabmap::VWDictionary::getUnusedWord | ( | int | id | ) | const |
Definition at line 1277 of file VWDictionary.cpp.
std::vector< int > rtabmap::VWDictionary::getUnusedWordIds | ( | ) | const |
Definition at line 1287 of file VWDictionary.cpp.
std::vector< VisualWord * > rtabmap::VWDictionary::getUnusedWords | ( | ) | const |
Definition at line 1282 of file VWDictionary.cpp.
|
inline |
Definition at line 98 of file VWDictionary.h.
|
inline |
Definition at line 80 of file VWDictionary.h.
const VisualWord * rtabmap::VWDictionary::getWord | ( | int | id | ) | const |
Definition at line 1272 of file VWDictionary.cpp.
|
inline |
Definition at line 88 of file VWDictionary.h.
|
inline |
Definition at line 89 of file VWDictionary.h.
|
virtual |
Definition at line 86 of file VWDictionary.cpp.
void rtabmap::VWDictionary::removeAllWordRef | ( | int | wordId, |
int | signatureId | ||
) |
Definition at line 620 of file VWDictionary.cpp.
void rtabmap::VWDictionary::removeWords | ( | const std::vector< VisualWord * > & | words | ) |
Definition at line 1292 of file VWDictionary.cpp.
void rtabmap::VWDictionary::setFixedDictionary | ( | const std::string & | dictionaryPath | ) |
Definition at line 138 of file VWDictionary.cpp.
void rtabmap::VWDictionary::setIncrementalDictionary | ( | ) |
Definition at line 125 of file VWDictionary.cpp.
|
inline |
Definition at line 79 of file VWDictionary.h.
void rtabmap::VWDictionary::setNNStrategy | ( | NNStrategy | strategy | ) |
Definition at line 280 of file VWDictionary.cpp.
|
virtual |
Definition at line 348 of file VWDictionary.cpp.
|
private |
Definition at line 119 of file VWDictionary.h.
|
private |
Definition at line 114 of file VWDictionary.h.
|
private |
Definition at line 118 of file VWDictionary.h.
|
private |
Definition at line 110 of file VWDictionary.h.
|
private |
Definition at line 111 of file VWDictionary.h.
|
private |
Definition at line 116 of file VWDictionary.h.
|
private |
Definition at line 122 of file VWDictionary.h.
|
private |
Definition at line 121 of file VWDictionary.h.
|
private |
Definition at line 115 of file VWDictionary.h.
|
private |
Definition at line 113 of file VWDictionary.h.
|
private |
Definition at line 124 of file VWDictionary.h.
|
private |
Definition at line 112 of file VWDictionary.h.
|
private |
Definition at line 125 of file VWDictionary.h.
|
private |
Definition at line 120 of file VWDictionary.h.
|
protected |
Definition at line 107 of file VWDictionary.h.
|
private |
Definition at line 123 of file VWDictionary.h.
|
protected |
Definition at line 106 of file VWDictionary.h.
|
static |
Definition at line 57 of file VWDictionary.h.
|
static |
Definition at line 56 of file VWDictionary.h.
|
private |
Definition at line 117 of file VWDictionary.h.