MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / clear

Method clear

src/PLPSLAM/data/map_database.cc:143–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 void map_database::clear()
144 {
145 std::lock_guard<std::mutex> lock(mtx_map_access_);
146
147 for (auto &lm : landmarks_)
148 {
149 delete lm.second;
150 lm.second = nullptr;
151 }
152
153 for (auto &keyfrm : keyframes_)
154 {
155 delete keyfrm.second;
156 keyfrm.second = nullptr;
157 }
158
159 if (_b_seg_or_not)
160 {
161 for (auto &pl : _landmarks_plane)
162 {
163 delete pl.second;
164 pl.second = nullptr;
165 }
166
167 _landmarks_plane.clear();
168 }
169
170 landmarks_.clear();
171 keyframes_.clear();
172 max_keyfrm_id_ = 0;
173 local_landmarks_.clear();
174 origin_keyfrm_ = nullptr;
175
176 frm_stats_.clear();
177
178 spdlog::info("clear map database");
179 }
180
181 void map_database::from_json(camera_database *cam_db, bow_vocabulary *bow_vocab, bow_database *bow_db,
182 const nlohmann::json &json_keyfrms, const nlohmann::json &json_landmarks)

Callers 15

create_new_planeMethod · 0.45
resetMethod · 0.45
resumeMethod · 0.45
resetMethod · 0.45
resetMethod · 0.45
brute_force_matchMethod · 0.45
undistort_keypointsMethod · 0.45
undistort_keypointsMethod · 0.45

Calls 1

infoFunction · 0.85

Tested by 2

undistort_keypointsMethod · 0.36
initializeMethod · 0.36