![]() |
NDEVR
API Documentation
|
Database of keyframes for place recognition and relocalization. More...
Public Member Functions | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | KeyFrameDatabase () |
| Default constructor. | |
| KeyFrameDatabase (const ORBVocabulary &voc) | |
| Constructs the database with an ORB vocabulary. | |
| void | add (KeyFrame *pKF) |
| Adds a keyframe to the database. | |
| void | clear () |
| Clears all entries from the database. | |
| void | clearMap (Map *pMap) |
| Clears entries belonging to a specific map. | |
| void | DetectBestCandidates (KeyFrame *pKF, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand, uint04 nMinWords) |
| Detects the best loop and merge candidates by word count. | |
| void | DetectCandidates (KeyFrame *pKF, float minScore, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand) |
| Detects loop and merge candidates simultaneously. | |
| Buffer< KeyFrame * > | DetectLoopCandidates (KeyFrame *pKF, float minScore) |
| Detects loop closure candidates (deprecated). | |
| void | DetectNBestCandidates (KeyFrame *pKF, Buffer< KeyFrame * > &vpLoopCand, Buffer< KeyFrame * > &vpMergeCand, uint04 nNumCandidates) |
| Detects the N best loop and merge candidates. | |
| Buffer< KeyFrame * > | DetectRelocalizationCandidates (Frame *F, Map *pMap) |
| Detects relocalization candidates for a given frame. | |
| void | erase (KeyFrame *pKF) |
| Removes a keyframe from the database. | |
| void | SetORBVocabulary (ORBVocabulary *pORBVoc) |
| Updates the ORB vocabulary. | |
Protected Member Functions | |
| 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. | |
| 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. | |
Protected Attributes | |
| std::mutex | mMutex |
| Mutex for thread-safe access. | |
| const ORBVocabulary * | mpVoc = nullptr |
| Associated ORB vocabulary. | |
| Buffer< Buffer< KeyFrame * > > | mvInvertedFile |
| Inverted file mapping word IDs to keyframes. | |
Database of keyframes for place recognition and relocalization.
Maintains an inverted file index of visual words to keyframes, enabling efficient detection of loop closure, merge, and relocalization candidates.
Definition at line 20 of file KeyFrameDatabase.h.
| KeyFrameDatabase::KeyFrameDatabase | ( | const ORBVocabulary & | voc | ) |
Constructs the database with an ORB vocabulary.
| [in] | voc | The ORB vocabulary for visual word lookup. |
| void KeyFrameDatabase::add | ( | KeyFrame * | pKF | ) |
Adds a keyframe to the database.
| [in] | pKF | Keyframe to add. |
| void KeyFrameDatabase::clearMap | ( | Map * | pMap | ) |
Clears entries belonging to a specific map.
| [in] | pMap | Map whose keyframes should be removed. |
Detects loop closure candidates (deprecated).
| [in] | pKF | Query keyframe. |
| [in] | minScore | Minimum similarity score threshold. |
| void KeyFrameDatabase::erase | ( | KeyFrame * | pKF | ) |
Removes a keyframe from the database.
| [in] | pKF | Keyframe to remove. |
|
protected |
Filters candidates from a pre-selected set.
| [in] | pKFi | Query frame. |
| [in] | filter | Pre-selected candidate buffer. |
| [in] | type | Score type. |
| [in] | min_score | Minimum similarity score. |
| [in] | min_words | Minimum shared word count. |
| [in] | max_count | Maximum number of candidates. |
References filter().
Referenced by filter().
|
protected |
Finds candidate keyframes matching a query.
| [in] | pKFi | Query keyframe. |
| [in] | type | Score type (merge, loop, relocation, place recognition). |
| [in] | min_score | Minimum similarity score. |
| [in] | min_words | Minimum shared word count. |
| [in] | max_count | Maximum number of candidates. |
| void KeyFrameDatabase::SetORBVocabulary | ( | ORBVocabulary * | pORBVoc | ) |
Updates the ORB vocabulary.
| [in] | pORBVoc | Pointer to the new ORB vocabulary. |