diff options
Diffstat (limited to 'tracker-pt/point_tracker.h')
-rw-r--r-- | tracker-pt/point_tracker.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h index 70c7a9fc..7492b4eb 100644 --- a/tracker-pt/point_tracker.h +++ b/tracker-pt/point_tracker.h @@ -11,14 +11,11 @@ #include "cv/affine.hpp" #include "cv/numeric.hpp" #include "pt-api.hpp" +#include "point-filter.hpp" -#include <cstddef> -#include <memory> #include <vector> #include <array> -#include <opencv2/core.hpp> - #include <QObject> namespace pt_impl { @@ -46,7 +43,7 @@ struct PointModel final explicit PointModel(const pt_settings& s); void set_model(const pt_settings& s); - void get_d_order(const vec2* points, unsigned* d_order, const vec2& d) const; + static void get_d_order(const vec2* points, unsigned* d_order, const vec2& d); }; // ---------------------------------------------------------------------------- @@ -60,7 +57,12 @@ public: // track the pose using the set of normalized point coordinates (x pos in range -0.5:0.5) // f : (focal length)/(sensor width) // dt : time since last call - void track(const std::vector<vec2>& projected_points, const PointModel& model, const pt_camera_info& info, int init_phase_timeout); + void track(const std::vector<vec2>& projected_points, + const PointModel& model, + const pt_camera_info& info, + int init_phase_timeout, + point_filter& filter, + f deadzone_amount); Affine pose() const { return X_CM; } vec2 project(const vec3& v_M, f focal_length); vec2 project(const vec3& v_M, f focal_length, const Affine& X_CM); @@ -70,14 +72,13 @@ private: // the points in model order using PointOrder = std::array<vec2, 3>; - PointOrder find_correspondences(const vec2* projected_points, const PointModel &model); + static PointOrder find_correspondences(const vec2* projected_points, const PointModel &model); PointOrder find_correspondences_previous(const vec2* points, const PointModel &model, const pt_camera_info& info); // The POSIT algorithm, returns the number of iterations int POSIT(const PointModel& point_model, const PointOrder& order, f focal_length); Affine X_CM; // transform from model to camera Affine X_CM_expected; - PointOrder prev_positions; Timer t; bool init_phase = true; }; |