From 5996bd4e9a567a73882d12ad7a6708f93b06bb69 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 20 Dec 2014 23:29:03 +0100 Subject: pt: fix d_order logic Issue: #107 --- ftnoir_tracker_pt/point_tracker.cpp | 12 +++++------- ftnoir_tracker_pt/point_tracker.h | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index 7a9fe645..eeb689ce 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -40,8 +40,7 @@ static bool d_vals_sort(const pair a, const pair b) } #endif -template -void PointModel::get_d_order(const std::vector& points, int d_order[], vec d) const +void PointModel::get_d_order(const std::vector& points, int d_order[], cv::Vec2f d) const { // fit line to orthographically projected points vector< pair > d_vals; @@ -80,17 +79,16 @@ PointTracker::PointOrder PointTracker::find_correspondences(const std::vector{ + model.get_d_order(std::vector { Vec2f{0,0}, Vec2f(model.M01[0], model.M01[1]), Vec2f(model.M02[0], model.M02[1]) }, model_d_order, - cv::Vec2f(model.M01[0]-model.M02[0], - model.M01[1]-model.M02[1])); + d); // set correspondences PointOrder p; for (int i=0; i - void get_d_order(const std::vector& points, int* d_order, vec d) const; + void get_d_order(const std::vector& points, int* d_order, cv::Vec2f d) const; }; // ---------------------------------------------------------------------------- -- cgit v1.2.3