Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
rtabmap::VWDictionary Class Reference

#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
 
unsigned long getMemoryUsed () const
 
float getNndrRatio () const
 
unsigned int getNotIndexedWordsCount () const
 
int getTotalActiveReferences () const
 
VisualWordgetUnusedWord (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 VisualWordgetWord (int id) const
 
bool isIncremental () const
 
bool isIncrementalFlann () const
 
virtual void parseParameters (const ParametersMap &parameters)
 
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)
 
bool setNNStrategy (NNStrategy strategy)
 
virtual void update ()
 
 VWDictionary (const ParametersMap &parameters=ParametersMap())
 
virtual ~VWDictionary ()
 

Static Public Member Functions

static cv::Mat convert32FToBin (const cv::Mat &descriptorsIn, bool byteToFloat=true)
 
static cv::Mat convertBinTo32F (const cv::Mat &descriptorsIn, bool byteToFloat=true)
 
static std::string nnStrategyName (NNStrategy strategy)
 

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

bool _byteToFloat
 
cv::Mat _dataTree
 
std::string _dictionaryPath
 
FlannIndex_flannIndex
 
bool _incrementalDictionary
 
bool _incrementalFlann
 
int _lastWordId
 
std::map< int,int > _mapIdIndex
 
std::map< int,int > _mapIndexId
 
std::string _newDictionaryPath
 
bool _newWordsComparedTogether
 
float _nndrRatio
 
std::set< int > _notIndexedWords
 
float _rebalancingFactor
 
std::set< int > _removedIndexedWords
 
NNStrategy _strategy
 
std::map< int, VisualWord * > _unusedWords
 
bool useDistanceL1_
 

Detailed Description

Definition at line 46 of file VWDictionary.h.

Member Enumeration Documentation

◆ NNStrategy

Enumerator
kNNFlannNaive 
kNNFlannKdTree 
kNNFlannLSH 
kNNBruteForce 
kNNBruteForceGPU 
kNNUndef 

Definition at line 49 of file VWDictionary.h.

Constructor & Destructor Documentation

◆ VWDictionary()

rtabmap::VWDictionary::VWDictionary ( const ParametersMap parameters = ParametersMap())

Definition at line 63 of file VWDictionary.cpp.

◆ ~VWDictionary()

rtabmap::VWDictionary::~VWDictionary ( )
virtual

Definition at line 81 of file VWDictionary.cpp.

Member Function Documentation

◆ addNewWords()

std::list< int > rtabmap::VWDictionary::addNewWords ( const cv::Mat &  descriptors,
int  signatureId 
)
virtual

Definition at line 759 of file VWDictionary.cpp.

◆ addWord()

void rtabmap::VWDictionary::addWord ( VisualWord vw)
virtual

Definition at line 1393 of file VWDictionary.cpp.

◆ addWordRef()

void rtabmap::VWDictionary::addWordRef ( int  wordId,
int  signatureId 
)

Definition at line 728 of file VWDictionary.cpp.

◆ clear()

void rtabmap::VWDictionary::clear ( bool  printWarningsIfNotEmpty = true)

Definition at line 692 of file VWDictionary.cpp.

◆ convert32FToBin()

cv::Mat rtabmap::VWDictionary::convert32FToBin ( const cv::Mat &  descriptorsIn,
bool  byteToFloat = true 
)
static

Definition at line 432 of file VWDictionary.cpp.

◆ convertBinTo32F()

cv::Mat rtabmap::VWDictionary::convertBinTo32F ( const cv::Mat &  descriptorsIn,
bool  byteToFloat = true 
)
static

Definition at line 397 of file VWDictionary.cpp.

◆ deleteUnusedWords()

void rtabmap::VWDictionary::deleteUnusedWords ( )

Definition at line 1448 of file VWDictionary.cpp.

◆ exportDictionary()

void rtabmap::VWDictionary::exportDictionary ( const char *  fileNameReferences,
const char *  fileNameDescriptors 
) const

Definition at line 1458 of file VWDictionary.cpp.

◆ findNN() [1/2]

std::vector< int > rtabmap::VWDictionary::findNN ( const std::list< VisualWord *> &  vws) const

Definition at line 1070 of file VWDictionary.cpp.

◆ findNN() [2/2]

std::vector< int > rtabmap::VWDictionary::findNN ( const cv::Mat &  descriptors) const

Definition at line 1112 of file VWDictionary.cpp.

◆ getIndexedWordsCount()

unsigned int rtabmap::VWDictionary::getIndexedWordsCount ( ) const

Definition at line 359 of file VWDictionary.cpp.

◆ getIndexMemoryUsed()

unsigned int rtabmap::VWDictionary::getIndexMemoryUsed ( ) const

Definition at line 364 of file VWDictionary.cpp.

◆ getLastIndexedWordId()

int rtabmap::VWDictionary::getLastIndexedWordId ( ) const

Definition at line 347 of file VWDictionary.cpp.

◆ getMemoryUsed()

unsigned long rtabmap::VWDictionary::getMemoryUsed ( ) const

Definition at line 369 of file VWDictionary.cpp.

◆ getNextId()

int rtabmap::VWDictionary::getNextId ( )
protected

Definition at line 723 of file VWDictionary.cpp.

◆ getNndrRatio()

float rtabmap::VWDictionary::getNndrRatio ( ) const
inline

Definition at line 98 of file VWDictionary.h.

◆ getNotIndexedWordsCount()

unsigned int rtabmap::VWDictionary::getNotIndexedWordsCount ( ) const
inline

Definition at line 99 of file VWDictionary.h.

◆ getTotalActiveReferences()

int rtabmap::VWDictionary::getTotalActiveReferences ( ) const
inline

Definition at line 101 of file VWDictionary.h.

◆ getUnusedWord()

VisualWord * rtabmap::VWDictionary::getUnusedWord ( int  id) const

Definition at line 1419 of file VWDictionary.cpp.

◆ getUnusedWordIds()

std::vector< int > rtabmap::VWDictionary::getUnusedWordIds ( ) const

Definition at line 1429 of file VWDictionary.cpp.

◆ getUnusedWords()

std::vector< VisualWord * > rtabmap::VWDictionary::getUnusedWords ( ) const

Definition at line 1424 of file VWDictionary.cpp.

◆ getUnusedWordsSize()

unsigned int rtabmap::VWDictionary::getUnusedWordsSize ( ) const
inline

Definition at line 116 of file VWDictionary.h.

◆ getVisualWords()

const std::map<int, VisualWord *>& rtabmap::VWDictionary::getVisualWords ( ) const
inline

Definition at line 97 of file VWDictionary.h.

◆ getWord()

const VisualWord * rtabmap::VWDictionary::getWord ( int  id) const

Definition at line 1414 of file VWDictionary.cpp.

◆ isIncremental()

bool rtabmap::VWDictionary::isIncremental ( ) const
inline

Definition at line 106 of file VWDictionary.h.

◆ isIncrementalFlann()

bool rtabmap::VWDictionary::isIncrementalFlann ( ) const
inline

Definition at line 107 of file VWDictionary.h.

◆ nnStrategyName()

static std::string rtabmap::VWDictionary::nnStrategyName ( NNStrategy  strategy)
inlinestatic

Definition at line 58 of file VWDictionary.h.

◆ parseParameters()

void rtabmap::VWDictionary::parseParameters ( const ParametersMap parameters)
virtual

Definition at line 87 of file VWDictionary.cpp.

◆ removeAllWordRef()

void rtabmap::VWDictionary::removeAllWordRef ( int  wordId,
int  signatureId 
)

Definition at line 745 of file VWDictionary.cpp.

◆ removeWords()

void rtabmap::VWDictionary::removeWords ( const std::vector< VisualWord *> &  words)

Definition at line 1434 of file VWDictionary.cpp.

◆ setFixedDictionary()

void rtabmap::VWDictionary::setFixedDictionary ( const std::string dictionaryPath)

Definition at line 146 of file VWDictionary.cpp.

◆ setIncrementalDictionary()

void rtabmap::VWDictionary::setIncrementalDictionary ( )

Definition at line 132 of file VWDictionary.cpp.

◆ setLastWordId()

void rtabmap::VWDictionary::setLastWordId ( int  id)
inline

Definition at line 96 of file VWDictionary.h.

◆ setNNStrategy()

bool rtabmap::VWDictionary::setNNStrategy ( NNStrategy  strategy)

Definition at line 292 of file VWDictionary.cpp.

◆ update()

void rtabmap::VWDictionary::update ( )
virtual

Definition at line 468 of file VWDictionary.cpp.

Member Data Documentation

◆ _byteToFloat

bool rtabmap::VWDictionary::_byteToFloat
private

Definition at line 135 of file VWDictionary.h.

◆ _dataTree

cv::Mat rtabmap::VWDictionary::_dataTree
private

Definition at line 143 of file VWDictionary.h.

◆ _dictionaryPath

std::string rtabmap::VWDictionary::_dictionaryPath
private

Definition at line 137 of file VWDictionary.h.

◆ _flannIndex

FlannIndex* rtabmap::VWDictionary::_flannIndex
private

Definition at line 142 of file VWDictionary.h.

◆ _incrementalDictionary

bool rtabmap::VWDictionary::_incrementalDictionary
private

Definition at line 132 of file VWDictionary.h.

◆ _incrementalFlann

bool rtabmap::VWDictionary::_incrementalFlann
private

Definition at line 133 of file VWDictionary.h.

◆ _lastWordId

int rtabmap::VWDictionary::_lastWordId
private

Definition at line 140 of file VWDictionary.h.

◆ _mapIdIndex

std::map<int ,int> rtabmap::VWDictionary::_mapIdIndex
private

Definition at line 146 of file VWDictionary.h.

◆ _mapIndexId

std::map<int ,int> rtabmap::VWDictionary::_mapIndexId
private

Definition at line 145 of file VWDictionary.h.

◆ _newDictionaryPath

std::string rtabmap::VWDictionary::_newDictionaryPath
private

Definition at line 138 of file VWDictionary.h.

◆ _newWordsComparedTogether

bool rtabmap::VWDictionary::_newWordsComparedTogether
private

Definition at line 139 of file VWDictionary.h.

◆ _nndrRatio

float rtabmap::VWDictionary::_nndrRatio
private

Definition at line 136 of file VWDictionary.h.

◆ _notIndexedWords

std::set<int> rtabmap::VWDictionary::_notIndexedWords
private

Definition at line 148 of file VWDictionary.h.

◆ _rebalancingFactor

float rtabmap::VWDictionary::_rebalancingFactor
private

Definition at line 134 of file VWDictionary.h.

◆ _removedIndexedWords

std::set<int> rtabmap::VWDictionary::_removedIndexedWords
private

Definition at line 149 of file VWDictionary.h.

◆ _strategy

NNStrategy rtabmap::VWDictionary::_strategy
private

Definition at line 144 of file VWDictionary.h.

◆ _totalActiveReferences

int rtabmap::VWDictionary::_totalActiveReferences
protected

Definition at line 129 of file VWDictionary.h.

◆ _unusedWords

std::map<int, VisualWord*> rtabmap::VWDictionary::_unusedWords
private

Definition at line 147 of file VWDictionary.h.

◆ _visualWords

std::map<int, VisualWord *> rtabmap::VWDictionary::_visualWords
protected

Definition at line 128 of file VWDictionary.h.

◆ ID_INVALID

const int rtabmap::VWDictionary::ID_INVALID = 0
static

Definition at line 57 of file VWDictionary.h.

◆ ID_START

const int rtabmap::VWDictionary::ID_START = 1
static

Definition at line 56 of file VWDictionary.h.

◆ useDistanceL1_

bool rtabmap::VWDictionary::useDistanceL1_
private

Definition at line 141 of file VWDictionary.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00