| 980 | } |
| 981 | |
| 982 | bool 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 | |
| 1003 | void Estimator::CreateKeyframe() { |
| 1004 | if (!m_current_frame) { |
nothing calls this directly
no outgoing calls
no test coverage detected