NDEVR
API Documentation
KeyFrameDatabase.h
1#pragma once
2#include "OrbSLAM/Headers/KeyFrame.h"
3#include "OrbSLAM/Headers/Frame.h"
4#include "OrbSLAM/Headers/ORBVocabulary.h"
5#include "OrbSLAM/Headers/Map.h"
6#include "Base/Headers/Dictionary.h"
7#include "Base/Headers/Buffer.hpp"
8#include<mutex>
9namespace NDEVR
10{
11
12 class KeyFrame;
13 class Frame;
14 class Map;
21 {
22 public:
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24
31
35 void add(KeyFrame* pKF);
36
40 void erase(KeyFrame* pKF);
41
43 void clear();
47 void clearMap(Map* pMap);
48
55
62 void DetectCandidates(KeyFrame* pKF, float minScore, Buffer<KeyFrame*>& vpLoopCand, Buffer<KeyFrame*>& vpMergeCand);
69 void DetectBestCandidates(KeyFrame* pKF, Buffer<KeyFrame*>& vpLoopCand, Buffer<KeyFrame*>& vpMergeCand, uint04 nMinWords);
76 void DetectNBestCandidates(KeyFrame* pKF, Buffer<KeyFrame*>& vpLoopCand, Buffer<KeyFrame*>& vpMergeCand, uint04 nNumCandidates);
77
88
89 protected:
98 Buffer<KeyFrame*> findCanditates(KeyFrame* pKFi, KeyFrame::ScoreEnum type, fltp04 min_score, uint04 min_words = 0, uint04 max_count = Constant<uint04>::Invalid);
108 Buffer<KeyFrame*> filter(Frame* pKFi, const Buffer<KeyFrame*>& filter, KeyFrame::ScoreEnum type, fltp04 min_score, uint04 min_words = 0, uint04 max_count = Constant<uint04>::Invalid);
109 const ORBVocabulary* mpVoc = nullptr;
111 std::mutex mMutex;
112
113 };
114}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Represents a single image frame with extracted features and pose information.
Definition Frame.h:111
void clear()
Clears all entries from the database.
KeyFrameDatabase(const ORBVocabulary &voc)
Constructs the database with an ORB vocabulary.
const ORBVocabulary * mpVoc
Associated ORB vocabulary.
void clearMap(Map *pMap)
Clears entries belonging to a specific map.
void erase(KeyFrame *pKF)
Removes a keyframe from the database.
Buffer< KeyFrame * > findCanditates(KeyFrame *pKFi, KeyFrame::ScoreEnum type, fltp04 min_score, uint04 min_words=0, uint04 max_count=Constant< uint04 >::Invalid)
Finds candidate keyframes matching a query.
Buffer< KeyFrame * > DetectRelocalizationCandidates(Frame *F, Map *pMap)
Detects relocalization candidates for a given frame.
Buffer< KeyFrame * > filter(Frame *pKFi, const Buffer< KeyFrame * > &filter, KeyFrame::ScoreEnum type, fltp04 min_score, uint04 min_words=0, uint04 max_count=Constant< uint04 >::Invalid)
Filters candidates from a pre-selected set.
void DetectBestCandidates(KeyFrame *pKF, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand, uint04 nMinWords)
Detects the best loop and merge candidates by word count.
void SetORBVocabulary(ORBVocabulary *pORBVoc)
Updates the ORB vocabulary.
std::mutex mMutex
Mutex for thread-safe access.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW KeyFrameDatabase()
Default constructor.
void add(KeyFrame *pKF)
Adds a keyframe to the database.
void DetectNBestCandidates(KeyFrame *pKF, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand, uint04 nNumCandidates)
Detects the N best loop and merge candidates.
void DetectCandidates(KeyFrame *pKF, float minScore, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand)
Detects loop and merge candidates simultaneously.
Buffer< Buffer< KeyFrame * > > mvInvertedFile
Inverted file mapping word IDs to keyframes.
Buffer< KeyFrame * > DetectLoopCandidates(KeyFrame *pKF, float minScore)
Detects loop closure candidates (deprecated).
A keyframe in the SLAM map, derived from Frame.
Definition KeyFrame.h:31
ScoreEnum
Enumerates the types of place-recognition scoring.
Definition KeyFrame.h:294
Represents a single SLAM map containing keyframes and map points.
Definition Map.h:22
The primary namespace for the NDEVR SDK.
@ type
The type identifier string for this model node.
Definition Model.h:58
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
TemplatedVocabulary< FORB::TDescriptor, FORB > ORBVocabulary
ORB visual vocabulary type for Bag-of-Words place recognition.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...