MCPcopy Create free account
hub / github.com/UZ-SLAMLab/ORB_SLAM3 / clearMap

Method clearMap

src/KeyFrameDatabase.cc:74–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void KeyFrameDatabase::clearMap(Map* pMap)
75{
76 unique_lock<mutex> lock(mMutex);
77
78 // Erase elements in the Inverse File for the entry
79 for(std::vector<list<KeyFrame*> >::iterator vit=mvInvertedFile.begin(), vend=mvInvertedFile.end(); vit!=vend; vit++)
80 {
81 // List of keyframes that share the word
82 list<KeyFrame*> &lKFs = *vit;
83
84 for(list<KeyFrame*>::iterator lit=lKFs.begin(), lend= lKFs.end(); lit!=lend;)
85 {
86 KeyFrame* pKFi = *lit;
87 if(pMap == pKFi->GetMap())
88 {
89 lit = lKFs.erase(lit);
90 // Dont delete the KF because the class Map clean all the KF when it is destroyed
91 }
92 else
93 {
94 ++lit;
95 }
96 }
97 }
98}
99
100vector<KeyFrame*> KeyFrameDatabase::DetectLoopCandidates(KeyFrame* pKF, float minScore)
101{

Callers

nothing calls this directly

Calls 2

eraseMethod · 0.80
GetMapMethod · 0.45

Tested by

no test coverage detected