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

Method TrackStats2File

src/Tracking.cc:213–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void Tracking::TrackStats2File()
214{
215 ofstream f;
216 f.open("SessionInfo.txt");
217 f << fixed;
218 f << "Number of KFs: " << mpAtlas->GetAllKeyFrames().size() << endl;
219 f << "Number of MPs: " << mpAtlas->GetAllMapPoints().size() << endl;
220
221 f << "OpenCV version: " << CV_VERSION << endl;
222
223 f.close();
224
225 f.open("TrackingTimeStats.txt");
226 f << fixed << setprecision(6);
227
228 f << "#Image Rect[ms], Image Resize[ms], ORB ext[ms], Stereo match[ms], IMU preint[ms], Pose pred[ms], LM track[ms], KF dec[ms], Total[ms]" << endl;
229
230 for(int i=0; i<vdTrackTotal_ms.size(); ++i)
231 {
232 double stereo_rect = 0.0;
233 if(!vdRectStereo_ms.empty())
234 {
235 stereo_rect = vdRectStereo_ms[i];
236 }
237
238 double resize_image = 0.0;
239 if(!vdResizeImage_ms.empty())
240 {
241 resize_image = vdResizeImage_ms[i];
242 }
243
244 double stereo_match = 0.0;
245 if(!vdStereoMatch_ms.empty())
246 {
247 stereo_match = vdStereoMatch_ms[i];
248 }
249
250 double imu_preint = 0.0;
251 if(!vdIMUInteg_ms.empty())
252 {
253 imu_preint = vdIMUInteg_ms[i];
254 }
255
256 f << stereo_rect << "," << resize_image << "," << vdORBExtract_ms[i] << "," << stereo_match << "," << imu_preint << ","
257 << vdPosePred_ms[i] << "," << vdLMTrack_ms[i] << "," << vdNewKF_ms[i] << "," << vdTrackTotal_ms[i] << endl;
258 }
259
260 f.close();
261}
262
263void Tracking::PrintTimeStats()
264{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
GetAllKeyFramesMethod · 0.45
GetAllMapPointsMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected