diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-13 15:19:29 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-13 15:19:29 +0100 | 
| commit | 12b4ce09ea3d68c59bc1711e365c1bb8275302ad (patch) | |
| tree | d423cb1395473b9b95dfc3a590265acab18637c8 | |
| parent | cafae606e2653a249e4b6aa90ed8a90952cbfa10 (diff) | |
gui, tracker/pt: add new clip logic
| -rw-r--r-- | gui/wizard.cpp | 4 | ||||
| -rw-r--r-- | gui/wizard.h | 2 | ||||
| -rwxr-xr-x | tracker-pt/ftnoir_tracker_pt.cpp | 3 | ||||
| -rw-r--r-- | tracker-pt/point_tracker.h | 10 | 
4 files changed, 17 insertions, 2 deletions
| diff --git a/gui/wizard.cpp b/gui/wizard.cpp index 4075e695..e62acce5 100644 --- a/gui/wizard.cpp +++ b/gui/wizard.cpp @@ -51,6 +51,10 @@ void Wizard::set_data()          m = ClipRight;      else if (ui.clip_model_left->isChecked())          m = ClipLeft; +    else if (ui.new_clip_right->isChecked()) +        m = New_ClipRight; +    else if (ui.new_clip_right->isChecked()) +        m = New_ClipLeft;      else // ui.cap_model          m = Cap; diff --git a/gui/wizard.h b/gui/wizard.h index bb518788..ea15df62 100644 --- a/gui/wizard.h +++ b/gui/wizard.h @@ -14,7 +14,7 @@ class Wizard : public QWizard  public:      Wizard(QWidget* parent = nullptr); -    enum Model { Cap = 0, ClipRight = 1, ClipLeft = 2 }; +    enum Model { Cap = 0, ClipRight = 1, ClipLeft = 2, New_ClipRight = 3, New_ClipLeft = 4, };      enum { ClipRightX = 135, ClipLeftX = -135 };  private slots:      void set_data(); diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 04d5b526..f2c3f112 100755 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -184,8 +184,11 @@ cv::Vec3d Tracker_PT::get_model_offset()          // cap          case 0: offset[0] = 0; offset[1] = 0; offset[2] = 0; break;          // clip +        // new clip +        case 3:          case 1: offset[0] = 135; offset[1] = 0; offset[2] = 0; break;          // left clip +        case 4:          case 2: offset[0] = -135; offset[1] = 0; offset[2] = 0; break;          }      } diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h index bcdd0dc7..8ed27aec 100644 --- a/tracker-pt/point_tracker.h +++ b/tracker-pt/point_tracker.h @@ -55,7 +55,7 @@ class PointModel  {      friend class PointTracker;  public: -    enum { Cap = 0, ClipRight = 1, ClipLeft = 2 }; +    enum { Cap = 0, ClipRight = 1, ClipLeft = 2, New_ClipRight = 3, New_ClipLeft = 4, };      static constexpr int N_POINTS = 3; @@ -95,6 +95,14 @@ public:          case ClipLeft:          case ClipRight:          { +            const double a = 27, b = 43, c = 62, d = 74; +            M01 = cv::Vec3d(0, b, -a); +            M02 = cv::Vec3d(0, -c, -d); +            break; +        } +        case New_ClipLeft: +        case New_ClipRight: +        {              const double by = 75, bz = 35, ty = 40, tz = 18;              M01 = cv::Vec3d(0, ty, -tz);              M02 = cv::Vec3d(0, -by, -bz); | 
