diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-11 16:27:09 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-11 16:27:09 +0100 | 
| commit | 7217cf5ac2191c92c956c88f012282882593bfc4 (patch) | |
| tree | a82a5fc88aee6b1a57d00d78f7e5730153c7b336 /FTNoIR_Tracker_PT | |
| parent | 9e9d76b68996840d264f7c8760d7879c2cc8781c (diff) | |
fix translation estimation
Diffstat (limited to 'FTNoIR_Tracker_PT')
| -rw-r--r-- | FTNoIR_Tracker_PT/point_tracker.cpp | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/FTNoIR_Tracker_PT/point_tracker.cpp b/FTNoIR_Tracker_PT/point_tracker.cpp index a881da62..2dd89aed 100644 --- a/FTNoIR_Tracker_PT/point_tracker.cpp +++ b/FTNoIR_Tracker_PT/point_tracker.cpp @@ -240,9 +240,11 @@ void PointTracker::POSIT(float fov, int w, int h)      obj_points.push_back(point_model->M01);
      obj_points.push_back(point_model->M02);
 -    img_points.push_back(p[0]);
 -    img_points.push_back(p[1]);
 -    img_points.push_back(p[2]);
 +    for (int i = 0; i < 3; i++)
 +    {
 +        auto p2 = cv::Point(p[i][0] * w + w/2, p[i][1] * h + h/2);
 +        img_points.push_back(p2);
 +    }
      const float HT_PI = 3.1415926535;
  | 
