Vector of nodes with indexes of local features
| 19 | |
| 20 | /// Vector of nodes with indexes of local features |
| 21 | class FeatureVector : public std::map<NodeId, std::vector<unsigned int> > { |
| 22 | public: |
| 23 | /** |
| 24 | * Constructor |
| 25 | */ |
| 26 | FeatureVector(void); |
| 27 | |
| 28 | /** |
| 29 | * Destructor |
| 30 | */ |
| 31 | ~FeatureVector(void); |
| 32 | |
| 33 | /** |
| 34 | * Adds a feature to an existing node, or adds a new node with an initial |
| 35 | * feature |
| 36 | * @param id node id to add or to modify |
| 37 | * @param i_feature index of feature to add to the given node |
| 38 | */ |
| 39 | void addFeature(NodeId id, unsigned int i_feature); |
| 40 | |
| 41 | /** |
| 42 | * Sends a string versions of the feature vector through the stream |
| 43 | * @param out stream |
| 44 | * @param v feature vector |
| 45 | */ |
| 46 | friend std::ostream& operator<<(std::ostream& out, const FeatureVector& v); |
| 47 | }; |
| 48 | |
| 49 | } // namespace DBoW2 |
| 50 |