MCPcopy Create free account
hub / github.com/93won/360_visual_inertial_odometry / ShouldCreateKeyframe

Method ShouldCreateKeyframe

src/processing/Estimator.cpp:982–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982bool Estimator::ShouldCreateKeyframe() {
983 if (!m_current_frame || !m_last_keyframe) {
984 return false;
985 }
986
987 // Get parallax threshold from config
988 const auto& config = ConfigUtils::GetInstance();
989 float parallax_threshold = config.tracking_min_parallax_for_keyframe;
990
991 // Compute parallax between last keyframe and current frame
992 float parallax = ComputeParallax(m_last_keyframe, m_current_frame);
993
994 // Create keyframe if parallax exceeds threshold
995 if (parallax >= parallax_threshold) {
996 LOG_DEBUG("Parallax {:.2f} >= {:.2f}, creating new keyframe", parallax, parallax_threshold);
997 return true;
998 }
999
1000 return false;
1001}
1002
1003void Estimator::CreateKeyframe() {
1004 if (!m_current_frame) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected