diff --git a/svo/src/frame_handler_base.cpp b/svo/src/frame_handler_base.cpp index ac7aaf3..3a8bad7 100644 --- a/svo/src/frame_handler_base.cpp +++ b/svo/src/frame_handler_base.cpp @@ -53,6 +53,9 @@ FrameHandlerBase() : g_permon->addTimer("pyramid_creation"); g_permon->addTimer("sparse_img_align"); g_permon->addTimer("reproject"); + g_permon->addTimer("reproject_kfs"); + g_permon->addTimer("reproject_candidates"); + g_permon->addTimer("feature_align"); g_permon->addTimer("pose_optimizer"); g_permon->addTimer("point_optimizer"); g_permon->addTimer("local_ba"); diff --git a/svo/src/reprojection.cpp b/svo/src/reprojection.cpp index 26de82c..3e27c8b 100644 --- a/svo/src/reprojection.cpp +++ b/svo/src/reprojection.cpp @@ -70,6 +70,7 @@ void reprojectMap( resetGrid(grid); // Identify those Keyframes which share a common field of view. + SVO_START_TIMER("reproject_kfs"); list< pair > close_kfs; map.getCloseKeyframes(frame, close_kfs); @@ -103,8 +104,10 @@ void reprojectMap( overlap_kfs.back().second++; } } + SVO_STOP_TIMER("reproject_kfs"); // Now project all point candidates + SVO_START_TIMER("reproject_candidates"); { boost::unique_lock lock(candidate_points.mut_); auto it=candidate_points.candidates_.begin(); @@ -122,10 +125,12 @@ void reprojectMap( } ++it; } - } + } // unlock the mutex when out of scope + SVO_STOP_TIMER("reproject_candidates"); // Now we go through each grid cell and select one point to match. // At the end, we should have at maximum one reprojected point per cell. + SVO_START_TIMER("feature_align"); n_matches=0; n_trials=0; for(size_t i=0; i (size_t) Config::maxFts()) break; } + SVO_STOP_TIMER("feature_align"); } bool pointQualityComparator(Candidate& lhs, Candidate& rhs)