From eb1ad39023671ec6980f8631179452423de15e90 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 3 Jan 2019 23:36:23 +0100 Subject: tracker/pt: set expected pose to identity reset_state() Also there's this evil `static' but it probably resulted in having it set to identity anyway. --- tracker-pt/point_tracker.cpp | 20 +++++++++++++------- tracker-pt/point_tracker.h | 3 ++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp index a68e83eb..34699aab 100644 --- a/tracker-pt/point_tracker.cpp +++ b/tracker-pt/point_tracker.cpp @@ -288,7 +288,7 @@ int PointTracker::POSIT(const PointModel& model, const PointOrder& order, f foca // The expected rotation used for resolving the ambiguity in POSIT: // In every iteration step the rotation closer to R_expected is taken - static const mat33 R_expected(X_CM.R); + const mat33& R_expected{X_CM_expected.R}; // initial pose = last (predicted) pose vec3 k; @@ -308,8 +308,8 @@ int PointTracker::POSIT(const PointModel& model, const PointOrder& order, f foca constexpr int max_iter = 100; - int i=1; - for (; i