summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/point_tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-10-07 10:08:13 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-10-07 10:08:13 +0200
commit2c227c6c073c24e3b7fcad32b3ea9a0b1c23eebe (patch)
tree9feb958a64d7d5b1e6d374525594a0bf57148260 /tracker-pt/point_tracker.h
parentfe059d422edc8cf2d4ab81cc862396d4454b9a00 (diff)
tracker/pt: C++11-ize
Diffstat (limited to 'tracker-pt/point_tracker.h')
-rw-r--r--tracker-pt/point_tracker.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h
index c35c6128..5576b41b 100644
--- a/tracker-pt/point_tracker.h
+++ b/tracker-pt/point_tracker.h
@@ -16,6 +16,7 @@ using namespace pt_types;
#include <opencv2/core/core.hpp>
#include <memory>
#include <vector>
+#include <array>
#include <QObject>
class Affine final
@@ -89,15 +90,7 @@ public:
private:
// the points in model order
- struct PointOrder
- {
- vec2 points[PointModel::N_POINTS];
- PointOrder()
- {
- for (unsigned i = 0; i < PointModel::N_POINTS; i++)
- points[i] = vec2(0, 0);
- }
- };
+ using PointOrder = std::array<vec2, 3>;
PointOrder find_correspondences(const std::vector<vec2>& projected_points, const PointModel &model);
PointOrder find_correspondences_previous(const std::vector<vec2>& points, const PointModel &model, f focal_length, int w, int h);