From 38327a0b701a68c11c04383d256b6305c4bf9b42 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 22 Nov 2014 22:18:26 +0100 Subject: pt: fix copy-paste bug in d_order logic Issue: #63, #93 --- ftnoir_tracker_pt/point_tracker.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index 3fe9f9ad..afb348c6 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -52,11 +52,6 @@ PointModel::PointModel(Vec3f M01, Vec3f M02) float s22 = M02.dot(M02); P = 1.0/(s11*s22-s12*s12) * Matx22f(s22, -s12, -s12, s11); - // calculate d and d_order for simple freetrack-like point correspondence - vector points; - points.push_back(Vec2f(0,0)); - points.push_back(Vec2f(M01[0], M01[1])); - points.push_back(Vec2f(M02[0], M02[1])); } #ifdef OPENTRACK_API @@ -106,11 +101,18 @@ PointTracker::PointOrder PointTracker::find_correspondences(const std::vector model_points; + model_points.push_back(Vec2f(0,0)); + model_points.push_back(Vec2f(model.M01[0], model.M01[1])); + model_points.push_back(Vec2f(model.M02[0], model.M02[1])); + model.get_d_order(model_points, model_d_order); // set correspondences PointOrder p; for (int i=0; i