diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 19:42:36 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 21:10:13 +0200 |
commit | f837647d6159941526ac479050bf317ae13a41a1 (patch) | |
tree | 0f711ed525fc83075f58deee5788cfc1bd3da59a /tracker-pt/ftnoir_tracker_pt.cpp | |
parent | 69d068a7da4f46eab4e2437b5dbf237b1c1d7bed (diff) |
video/widget, tracker/pt: skip widget processing in more cases
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index dabd48b4..2911a217 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -71,10 +71,10 @@ void Tracker_PT::run() { const bool preview_visible = check_is_visible(); - if (preview_visible) + if (preview_visible && !widget->fresh()) preview_frame->set_last_frame(*frame); - point_extractor->extract_points(*frame, *preview_frame, preview_visible, points); + point_extractor->extract_points(*frame, *preview_frame, preview_visible && !widget->fresh(), points); point_count.store(points.size(), std::memory_order_relaxed); const bool success = points.size() >= PointModel::N_POINTS; @@ -99,7 +99,7 @@ void Tracker_PT::run() X_CM = point_tracker.pose(); } - if (preview_visible) + if (preview_visible && !widget->fresh()) { const f fx = pt_camera_info::get_focal_length(info.fov, info.res_x, info.res_y); Affine X_MH(mat33::eye(), vec3(s.t_MH_x, s.t_MH_y, s.t_MH_z)); |