BowVector.h
Go to the documentation of this file.
1 
10 #ifndef __D_T_BOW_VECTOR__
11 #define __D_T_BOW_VECTOR__
12 
13 #include <iostream>
14 #include <map>
15 #include <vector>
16 
17 namespace DBoW2 {
18 
20 typedef unsigned int WordId;
21 
23 typedef double WordValue;
24 
26 typedef unsigned int NodeId;
27 
29 enum LNorm
30 {
31  L1,
33 };
34 
37 {
39  TF,
40  IDF,
42 };
43 
46 {
50  KL,
53 };
54 
56 class BowVector:
57  public std::map<WordId, WordValue>
58 {
59 public:
60 
64  BowVector(void);
65 
69  ~BowVector(void);
70 
77  void addWeight(WordId id, WordValue v);
78 
84  void addIfNotExist(WordId id, WordValue v);
85 
90  void normalize(LNorm norm_type);
91 
97  friend std::ostream& operator<<(std::ostream &out, const BowVector &v);
98 
104  void saveM(const std::string &filename, size_t W) const;
105 };
106 
107 } // namespace DBoW2
108 
109 #endif
filename
WeightingType
Weighting type.
Definition: BowVector.h:36
ScoringType
Scoring type.
Definition: BowVector.h:45
void addWeight(WordId id, WordValue v)
Definition: BowVector.cpp:34
void saveM(const std::string &filename, size_t W) const
Definition: BowVector.cpp:105
friend std::ostream & operator<<(std::ostream &out, const BowVector &v)
Definition: BowVector.cpp:88
void normalize(LNorm norm_type)
Definition: BowVector.cpp:62
LNorm
L-norms for normalization.
Definition: BowVector.h:29
Vector of words to represent images.
Definition: BowVector.h:56
double WordValue
Value of a word.
Definition: BowVector.h:23
unsigned int WordId
Id of words.
Definition: BowVector.h:20
void addIfNotExist(WordId id, WordValue v)
Definition: BowVector.cpp:50
unsigned int NodeId
Id of nodes in the vocabulary treee.
Definition: BowVector.h:26


orb_slam2_ros
Author(s):
autogenerated on Wed Apr 21 2021 02:53:05