#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 () |
void | deleteUnusedWords () |
void | exportDictionary (const char *fileNameReferences, const char *fileNameDescriptors) const |
virtual std::vector< int > | findNN (const std::list< VisualWord * > &vws) 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 |
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 |
cv::flann::Index * | _flannIndex |
bool | _incrementalDictionary |
int | _lastWordId |
std::map< int,int > | _mapIndexId |
bool | _newWordsComparedTogether |
float | _nndrRatio |
std::set< int > | _notIndexedWords |
std::set< int > | _removedIndexedWords |
NNStrategy | _strategy |
std::map< int, VisualWord * > | _unusedWords |
Definition at line 45 of file VWDictionary.h.
Definition at line 48 of file VWDictionary.h.
rtabmap::VWDictionary::VWDictionary | ( | const ParametersMap & | parameters = ParametersMap() | ) |
Definition at line 48 of file VWDictionary.cpp.
rtabmap::VWDictionary::~VWDictionary | ( | ) | [virtual] |
Definition at line 62 of file VWDictionary.cpp.
std::list< int > rtabmap::VWDictionary::addNewWords | ( | const cv::Mat & | descriptors, |
int | signatureId | ||
) | [virtual] |
Definition at line 393 of file VWDictionary.cpp.
void rtabmap::VWDictionary::addWord | ( | VisualWord * | vw | ) | [virtual] |
Definition at line 818 of file VWDictionary.cpp.
void rtabmap::VWDictionary::addWordRef | ( | int | wordId, |
int | signatureId | ||
) |
Definition at line 359 of file VWDictionary.cpp.
void rtabmap::VWDictionary::clear | ( | ) |
Definition at line 328 of file VWDictionary.cpp.
Definition at line 878 of file VWDictionary.cpp.
void rtabmap::VWDictionary::exportDictionary | ( | const char * | fileNameReferences, |
const char * | fileNameDescriptors | ||
) | const |
Definition at line 888 of file VWDictionary.cpp.
std::vector< int > rtabmap::VWDictionary::findNN | ( | const std::list< VisualWord * > & | vws | ) | const [virtual] |
Definition at line 622 of file VWDictionary.cpp.
int rtabmap::VWDictionary::getLastIndexedWordId | ( | ) | const |
Definition at line 242 of file VWDictionary.cpp.
int rtabmap::VWDictionary::getNextId | ( | ) | [protected] |
Definition at line 354 of file VWDictionary.cpp.
float rtabmap::VWDictionary::getNndrRatio | ( | ) | const [inline] |
Definition at line 73 of file VWDictionary.h.
unsigned int rtabmap::VWDictionary::getNotIndexedWordsCount | ( | ) | const [inline] |
Definition at line 74 of file VWDictionary.h.
int rtabmap::VWDictionary::getTotalActiveReferences | ( | ) | const [inline] |
Definition at line 76 of file VWDictionary.h.
VisualWord * rtabmap::VWDictionary::getUnusedWord | ( | int | id | ) | const |
Definition at line 840 of file VWDictionary.cpp.
std::vector< int > rtabmap::VWDictionary::getUnusedWordIds | ( | ) | const |
Definition at line 855 of file VWDictionary.cpp.
std::vector< VisualWord * > rtabmap::VWDictionary::getUnusedWords | ( | ) | const |
Definition at line 845 of file VWDictionary.cpp.
unsigned int rtabmap::VWDictionary::getUnusedWordsSize | ( | ) | const [inline] |
Definition at line 87 of file VWDictionary.h.
const std::map<int, VisualWord *>& rtabmap::VWDictionary::getVisualWords | ( | ) | const [inline] |
Definition at line 72 of file VWDictionary.h.
const VisualWord * rtabmap::VWDictionary::getWord | ( | int | id | ) | const |
Definition at line 835 of file VWDictionary.cpp.
bool rtabmap::VWDictionary::isIncremental | ( | ) | const [inline] |
Definition at line 78 of file VWDictionary.h.
void rtabmap::VWDictionary::parseParameters | ( | const ParametersMap & | parameters | ) | [virtual] |
Definition at line 68 of file VWDictionary.cpp.
void rtabmap::VWDictionary::removeAllWordRef | ( | int | wordId, |
int | signatureId | ||
) |
Definition at line 379 of file VWDictionary.cpp.
void rtabmap::VWDictionary::removeWords | ( | const std::vector< VisualWord * > & | words | ) |
Definition at line 865 of file VWDictionary.cpp.
void rtabmap::VWDictionary::setFixedDictionary | ( | const std::string & | dictionaryPath | ) |
Definition at line 118 of file VWDictionary.cpp.
Definition at line 105 of file VWDictionary.cpp.
void rtabmap::VWDictionary::setLastWordId | ( | int | id | ) | [inline] |
Definition at line 71 of file VWDictionary.h.
void rtabmap::VWDictionary::setNNStrategy | ( | NNStrategy | strategy | ) |
Definition at line 219 of file VWDictionary.cpp.
void rtabmap::VWDictionary::update | ( | ) | [virtual] |
Definition at line 254 of file VWDictionary.cpp.
cv::Mat rtabmap::VWDictionary::_dataTree [private] |
Definition at line 105 of file VWDictionary.h.
std::string rtabmap::VWDictionary::_dictionaryPath [private] |
Definition at line 101 of file VWDictionary.h.
Definition at line 104 of file VWDictionary.h.
bool rtabmap::VWDictionary::_incrementalDictionary [private] |
Definition at line 99 of file VWDictionary.h.
int rtabmap::VWDictionary::_lastWordId [private] |
Definition at line 103 of file VWDictionary.h.
std::map<int ,int> rtabmap::VWDictionary::_mapIndexId [private] |
Definition at line 107 of file VWDictionary.h.
bool rtabmap::VWDictionary::_newWordsComparedTogether [private] |
Definition at line 102 of file VWDictionary.h.
float rtabmap::VWDictionary::_nndrRatio [private] |
Definition at line 100 of file VWDictionary.h.
std::set<int> rtabmap::VWDictionary::_notIndexedWords [private] |
Definition at line 109 of file VWDictionary.h.
std::set<int> rtabmap::VWDictionary::_removedIndexedWords [private] |
Definition at line 110 of file VWDictionary.h.
NNStrategy rtabmap::VWDictionary::_strategy [private] |
Definition at line 106 of file VWDictionary.h.
int rtabmap::VWDictionary::_totalActiveReferences [protected] |
Definition at line 96 of file VWDictionary.h.
std::map<int, VisualWord*> rtabmap::VWDictionary::_unusedWords [private] |
Definition at line 108 of file VWDictionary.h.
std::map<int, VisualWord *> rtabmap::VWDictionary::_visualWords [protected] |
Definition at line 95 of file VWDictionary.h.
const int rtabmap::VWDictionary::ID_INVALID = 0 [static] |
Definition at line 50 of file VWDictionary.h.
const int rtabmap::VWDictionary::ID_START = 1 [static] |
Definition at line 49 of file VWDictionary.h.