summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-20 23:20:34 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-20 23:24:14 +0200
commitbe6e8566a13cf468433ca5a86b9595e96cda1907 (patch)
treec840a7418e88778f11d40213c40910a8cacba232
parent8faba81716c5d4283a31262dea795888cdb372b0 (diff)
tracker/pt: fix crash with more than 3 points
Found-by: @DaMichel
-rw-r--r--tracker-pt/point_tracker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp
index bc5bf3cd..e6cda11a 100644
--- a/tracker-pt/point_tracker.cpp
+++ b/tracker-pt/point_tracker.cpp
@@ -39,7 +39,7 @@ void PointModel::get_d_order(const std::vector<cv::Vec2d>& points, int* d_order,
// fit line to orthographically projected points
std::vector<std::pair<double,int>> d_vals;
// get sort indices with respect to d scalar product
- for (unsigned i = 0; i<points.size(); ++i)
+ for (unsigned i = 0; i < N_POINTS; ++i)
d_vals.push_back(std::pair<double, int>(d.dot(points[i]), i));
std::sort(d_vals.begin(),