DBoW2::BowVector Class Reference

Vector of words to represent images. More...

#include <BowVector.h>

List of all members.

Public Member Functions

 BowVector (void)
 ~BowVector (void)
void addWeight (WordId id, WordValue v)
void addIfNotExist (WordId id, WordValue v)
void normalize (LNorm norm_type)
void saveM (const std::string &filename, size_t W) const

Friends

std::ostream & operator<< (std::ostream &out, const BowVector &v)

Detailed Description

Vector of words to represent images.


Constructor & Destructor Documentation

DBoW2::BowVector::BowVector ( void   ) 

Constructor

DBoW2::BowVector::~BowVector ( void   ) 

Destructor


Member Function Documentation

void DBoW2::BowVector::addIfNotExist ( WordId  id,
WordValue  v 
)

Adds a word with a value to the vector only if this does not exist yet

Parameters:
id word id to look for
v value to give to the word if this does not exist
void DBoW2::BowVector::addWeight ( WordId  id,
WordValue  v 
)

Adds a value to a word value existing in the vector, or creates a new word with the given value

Parameters:
id word id to look for
v value to create the word with, or to add to existing word
void DBoW2::BowVector::normalize ( LNorm  norm_type  ) 

L1-Normalizes the values in the vector

Parameters:
norm_type norm used
void DBoW2::BowVector::saveM ( const std::string &  filename,
size_t  W 
) const

Saves the bow vector as a vector in a matlab file

Parameters:
filename 
W number of words in the vocabulary

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const BowVector v 
) [friend]

Prints the content of the bow vector

Parameters:
out stream
v 

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends
Generated on Thu Feb 7 19:47:43 2013 by  doxygen 1.6.3