12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef KEYFRAMEDATABASE_H
- #define KEYFRAMEDATABASE_H
- #include <vector>
- #include <list>
- #include <set>
- #include "KeyFrame.h"
- #include "Frame.h"
- #include "ORBVocabulary.h"
- #include "Map.h"
- #include <boost/serialization/base_object.hpp>
- #include <boost/serialization/vector.hpp>
- #include <boost/serialization/list.hpp>
- #include<mutex>
- namespace ORB_SLAM3
- {
- class KeyFrame;
- class Frame;
- class Map;
- class KeyFrameDatabase
- {
- public:
- KeyFrameDatabase(const ORBVocabulary &voc);
- void add(KeyFrame* pKF);
- void erase(KeyFrame* pKF);
- void clear();
- void clearMap(Map* pMap);
-
- std::vector<KeyFrame *> DetectLoopCandidates(KeyFrame* pKF, float minScore);
-
- void DetectCandidates(KeyFrame* pKF, float minScore,vector<KeyFrame*>& vpLoopCand, vector<KeyFrame*>& vpMergeCand);
- void DetectBestCandidates(KeyFrame *pKF, vector<KeyFrame*> &vpLoopCand, vector<KeyFrame*> &vpMergeCand, int nMinWords);
- void DetectNBestCandidates(KeyFrame *pKF, vector<KeyFrame*> &vpLoopCand, vector<KeyFrame*> &vpMergeCand, int nNumCandidates);
-
- std::vector<KeyFrame*> DetectRelocalizationCandidates(Frame* F, Map* pMap);
- void SetORBVocabulary(ORBVocabulary* pORBVoc);
- protected:
-
- const ORBVocabulary* mpVoc;
-
- std::vector<list<KeyFrame*> > mvInvertedFile;
-
- std::mutex mMutex;
- };
- }
- #endif
|