Vector of words to represent images. More...
#include <BowVector.h>

Public Member Functions | |
| void | addIfNotExist (WordId id, WordValue v) |
| void | addWeight (WordId id, WordValue v) |
| BowVector (void) | |
| void | normalize (LNorm norm_type) |
| void | saveM (const std::string &filename, size_t W) const |
| ~BowVector (void) | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const BowVector &v) |
Vector of words to represent images.
Definition at line 56 of file BowVector.h.
| DBoW2::BowVector::BowVector | ( | void | ) |
Constructor
Definition at line 22 of file BowVector.cpp.
| DBoW2::BowVector::~BowVector | ( | void | ) |
Destructor
Definition at line 28 of file BowVector.cpp.
Adds a word with a value to the vector only if this does not exist yet
| id | word id to look for |
| v | value to give to the word if this does not exist |
Definition at line 50 of file BowVector.cpp.
Adds a value to a word value existing in the vector, or creates a new word with the given value
| id | word id to look for |
| v | value to create the word with, or to add to existing word |
Definition at line 34 of file BowVector.cpp.
| void DBoW2::BowVector::normalize | ( | LNorm | norm_type | ) |
L1-Normalizes the values in the vector
| norm_type | norm used |
Definition at line 62 of file BowVector.cpp.
| void DBoW2::BowVector::saveM | ( | const std::string & | filename, |
| size_t | W | ||
| ) | const |
Saves the bow vector as a vector in a matlab file
| filename | |
| W | number of words in the vocabulary |
Definition at line 105 of file BowVector.cpp.
|
friend |
Prints the content of the bow vector
| out | stream |
| v |
Definition at line 88 of file BowVector.cpp.