30#include "rtabmap/core/rtabmap_core_export.h"
32#include <opencv2/core/core.hpp>
58 VisualWord(
int id,
const cv::Mat & descriptor,
int signatureId = 0);
94 int id()
const {
return _id;}
125 int _totalReferences;
126 std::map<int, int> _references;
Represents a visual word (feature descriptor) used in the bag-of-words (BoW) model.
const cv::Mat & getDescriptor() const
Returns the feature descriptor of this word.
int getTotalReferences() const
Returns the total number of references (across all signatures).
bool isSaved() const
Checks if the word has been saved to the database.
void addRef(int signatureId)
Adds a reference to this word for the given signature ID.
void setSaved(bool saved)
Sets the saved flag for the word.
int removeAllRef(int signatureId)
Removes all references to this word for the given signature ID.
VisualWord(int id, const cv::Mat &descriptor, int signatureId=0)
Constructor.
int id() const
Returns the ID of this visual word.
unsigned long getMemoryUsed() const
Estimates the memory used by this visual word in bytes.
const std::map< int, int > & getReferences() const
Returns the references of this word.