diff options
Diffstat (limited to 'ftnoir_tracker_pt/point_tracker.h')
-rw-r--r-- | ftnoir_tracker_pt/point_tracker.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h index 7c710704..49ff577e 100644 --- a/ftnoir_tracker_pt/point_tracker.h +++ b/ftnoir_tracker_pt/point_tracker.h @@ -69,8 +69,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) { @@ -85,26 +83,25 @@ public: 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) { - switch (s.active_model_panel) + if (s.model_used == Cap) { - 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; - 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)); - 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); - break; + const double z = 100, x = 120, y = 60; + M01 = cv::Vec3f(-x, -y, -z); + M02 = cv::Vec3f(x, -y, -z); + } + else + { + const double a = 27, b = 43, c = 62, d = 74; + M01 = cv::Vec3f(0, b, -a); + M02 = cv::Vec3f(0, -c, -d); } } - + void get_d_order(const std::vector<cv::Vec2f>& points, int* d_order, cv::Vec2f d) const; }; |