37 _descriptor(descriptor),
53 std::map<int, int>::iterator iter =
_references.find(signatureId);
60 _references.insert(std::pair<int, int>(signatureId, 1));
74 unsigned long memoryUsage =
sizeof(
VisualWord);
75 memoryUsage +=
_references.size() * (
sizeof(int)*2+
sizeof(std::map<int ,int>::iterator)) +
sizeof(std::map<int ,int>);
76 memoryUsage +=
_oldReferences.size() * (
sizeof(int)*2+
sizeof(std::map<int ,int>::iterator)) +
sizeof(std::map<int ,int>);
unsigned long getMemoryUsed() const
int removeAllRef(int signatureId)
V uTake(std::map< K, V > &m, const K &key, const V &defaultValue=V())
Wrappers of STL for convenient functions.
std::map< int, int > _oldReferences
std::map< int, int > _references
void addRef(int signatureId)
ULogger class and convenient macros.
VisualWord(int id, const cv::Mat &descriptor, int signatureId=0)