summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/point_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_pt/point_tracker.h')
-rw-r--r--ftnoir_tracker_pt/point_tracker.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index cdcf2998..1474ad40 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -65,8 +65,6 @@ public:
cv::Vec3f u; // unit vector perpendicular to M01,M02-plane
cv::Matx22f P;
-
- enum Model { Clip = 0, Cap = 1, Custom = 2 };
PointModel(settings_pt& s)
{
@@ -81,26 +79,32 @@ public:
float s22 = M02.dot(M02);
P = 1.0/(s11*s22-s12*s12) * cv::Matx22f(s22, -s12, -s12, s11);
}
-
+
+ enum { Cap = 0, ClipRight = 1, ClipLeft = 2 };
+
void set_model(settings_pt& s)
{
- switch (s.active_model_panel)
+ switch (s.model_used)
{
- case Clip:
- M01 = cv::Vec3f(0, static_cast<double>(s.clip_ty), -static_cast<double>(s.clip_tz));
- M02 = cv::Vec3f(0, -static_cast<double>(s.clip_by), -static_cast<double>(s.clip_bz));
- break;
+ default:
case Cap:
- M01 = cv::Vec3f(-static_cast<double>(s.cap_x), -static_cast<double>(s.cap_y), -static_cast<double>(s.cap_z));
- M02 = cv::Vec3f(static_cast<double>(s.cap_x), -static_cast<double>(s.cap_y), -static_cast<double>(s.cap_z));
+ {
+ const double z = 100, x = 120, y = 60;
+ M01 = cv::Vec3f(-x, -y, -z);
+ M02 = cv::Vec3f(x, -y, -z);
break;
- case Custom:
- M01 = cv::Vec3f(s.m01_x, s.m01_y, s.m01_z);
- M02 = cv::Vec3f(s.m02_x, s.m02_y, s.m02_z);
+ }
+ case ClipLeft:
+ case ClipRight:
+ {
+ const double a = 27, b = 43, c = 62, d = 74;
+ M01 = cv::Vec3f(0, b, -a);
+ M02 = cv::Vec3f(0, -c, -d);
break;
}
+ }
}
-
+
void get_d_order(const std::vector<cv::Vec2f>& points, int* d_order, cv::Vec2f d) const;
};