diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-21 11:09:00 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-21 11:09:00 +0200 | 
| commit | d576eca6a6e894606239f36b54dcb3fe5f0744cf (patch) | |
| tree | 6ac68e5d63b75c9c5427be28fe24cc4b64f36329 /tracker-pt | |
| parent | aaf7965df8b423bcacd411931d4cb0bb238ced61 (diff) | |
tracker/pt: move pi constant to headers
Diffstat (limited to 'tracker-pt')
| -rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 1 | ||||
| -rw-r--r-- | tracker-pt/ftnoir_tracker_pt.h | 2 | ||||
| -rw-r--r-- | tracker-pt/point_extractor.h | 4 | ||||
| -rw-r--r-- | tracker-pt/point_tracker.cpp | 2 | ||||
| -rw-r--r-- | tracker-pt/point_tracker.h | 2 | 
5 files changed, 7 insertions, 4 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 6ff19479..2e6fd9b1 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -63,7 +63,6 @@ bool Tracker_PT::get_focal_length(float& ret)      const bool res = camera.get_info(info);      if (res)      { -        static constexpr double pi = 3.14159265359;          const int w = info.res_x, h = info.res_y;          const double diag = sqrt(1. + h/(double)w * h/(double)w);          const double diag_fov = static_cast<int>(s.fov) * pi / 180.; diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h index b6815bd7..d3b96f1d 100644 --- a/tracker-pt/ftnoir_tracker_pt.h +++ b/tracker-pt/ftnoir_tracker_pt.h @@ -31,6 +31,8 @@ class TrackerDialog_PT;  // Constantly processes the tracking chain in a separate thread  class Tracker_PT : public QThread, public ITracker  { +    static constexpr double pi = 3.14159265359; +      Q_OBJECT      friend class camera_dialog;      friend class TrackerDialog_PT; diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h index 3e4661f9..b3fac38a 100644 --- a/tracker-pt/point_extractor.h +++ b/tracker-pt/point_extractor.h @@ -28,7 +28,9 @@ public:      settings_pt s;  private: -    enum { hist_c = 2 }; +    static constexpr double pi = 3.14159265359; +    static constexpr int hist_c = 1; +      std::vector<cv::Vec2f> points;      QMutex mtx;      cv::Mat frame_gray; diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp index d3a3d400..1fb4128e 100644 --- a/tracker-pt/point_tracker.cpp +++ b/tracker-pt/point_tracker.cpp @@ -13,8 +13,6 @@  #include <QDebug> -const float PI = 3.14159265358979323846f; -  static void get_row(const cv::Matx33f& m, int i, cv::Vec3f& v)  {      v[0] = m(i,0); diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h index f964a107..e3f6cdb9 100644 --- a/tracker-pt/point_tracker.h +++ b/tracker-pt/point_tracker.h @@ -118,6 +118,8 @@ public:      Affine pose() { QMutexLocker l(&mtx); return X_CM; }      cv::Vec2f project(const cv::Vec3f& v_M, float f);  private: +    static constexpr float PI = 3.14159265358979323846f; +      // the points in model order      struct PointOrder      {  | 
