KeyFrameDatabase.h
Go to the documentation of this file.
1 
21 #ifndef KEYFRAMEDATABASE_H
22 #define KEYFRAMEDATABASE_H
23 
24 #include <vector>
25 #include <list>
26 #include <set>
27 
28 #include "KeyFrame.h"
29 #include "Frame.h"
30 #include "ORBVocabulary.h"
31 #include "BoostArchiver.h"
32 
33 #include<mutex>
34 
35 
36 namespace ORB_SLAM2
37 {
38 
39 class KeyFrame;
40 class Frame;
41 
42 
44 {
45 public:
46 
47  KeyFrameDatabase(const ORBVocabulary &voc);
48 
49  void add(KeyFrame* pKF);
50 
51  void erase(KeyFrame* pKF);
52 
53  void clear();
54 
55  // Loop Detection
56  std::vector<KeyFrame *> DetectLoopCandidates(KeyFrame* pKF, float minScore);
57 
58  // Relocalization
59  std::vector<KeyFrame*> DetectRelocalizationCandidates(Frame* F);
60 
61 protected:
62 
63  // Associated vocabulary
65 
66  // Inverted file
67  std::vector<list<KeyFrame*> > mvInvertedFile;
68 
69  // Mutex
70  std::mutex mMutex;
71 
72 // map serialization addition
73 public:
74  // for serialization
76  void SetORBvocabulary(ORBVocabulary *porbv) {mpVoc=porbv;}
77 private:
78  // serialize is recommended to be private
80  template<class Archive>
81  void serialize(Archive &ar, const unsigned int version);
82 
83 };
84 
85 } //namespace ORB_SLAM
86 
87 #endif
std::vector< KeyFrame * > DetectRelocalizationCandidates(Frame *F)
std::vector< list< KeyFrame * > > mvInvertedFile
friend class boost::serialization::access
void serialize(Archive &ar, const unsigned int version)
void SetORBvocabulary(ORBVocabulary *porbv)
std::vector< KeyFrame * > DetectLoopCandidates(KeyFrame *pKF, float minScore)
const ORBVocabulary * mpVoc


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