summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-08 06:57:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-08 06:57:48 +0200
commit78e20c5173ae722ddac1499df25e40a3ab6d0f3e (patch)
tree6640b38855e081824e8fc04bc8a723fa560d28fc /ftnoir_tracker_pt
parent527eef2a2f0e68b286e1b782ba148ecdfafbb89c (diff)
parent027fd0f8b4efcf005a0bba850109089737f40a3f (diff)
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r--ftnoir_tracker_pt/point_tracker.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index 1340a11d..49ff577e 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -63,29 +63,29 @@ class PointModel
public:
static constexpr int N_POINTS = 3;
- cv::Vec3f M01; // M01 in model frame
- cv::Vec3f M02; // M02 in model frame
+ cv::Vec3f M01; // M01 in model frame
+ cv::Vec3f M02; // M02 in model frame
- cv::Vec3f u; // unit vector perpendicular to M01,M02-plane
+ cv::Vec3f u; // unit vector perpendicular to M01,M02-plane
cv::Matx22f P;
-
+
PointModel(settings_pt& s)
{
set_model(s);
// calculate u
u = M01.cross(M02);
u /= norm(u);
-
+
// calculate projection matrix on M01,M02 plane
float s11 = M01.dot(M01);
float s12 = M01.dot(M02);
float s22 = M02.dot(M02);
P = 1.0/(s11*s22-s12*s12) * cv::Matx22f(s22, -s12, -s12, s11);
}
-
+
enum { Cap = 0, Clip = 1 };
-
+
void set_model(settings_pt& s)
{
if (s.model_used == Cap)
@@ -101,7 +101,7 @@ public:
M02 = cv::Vec3f(0, -c, -d);
}
}
-
+
void get_d_order(const std::vector<cv::Vec2f>& points, int* d_order, cv::Vec2f d) const;
};
@@ -137,8 +137,8 @@ private:
Affine X_CM; // trafo from model to camera
- Timer t;
- bool init_phase;
+ Timer t;
+ bool init_phase;
};
#endif //POINTTRACKER_H