diff options
| author | Stéphane Lenclud <github@lenclud.com> | 2019-04-13 12:24:17 +0200 |
|---|---|---|
| committer | Stéphane Lenclud <github@lenclud.com> | 2019-04-13 12:24:17 +0200 |
| commit | 85c7d259a9c08d195c7bb5bf05ca89edbd176862 (patch) | |
| tree | 10df2c734ff3e209ebf26696ef716f25b168c799 /tracker-easy/tracker-easy-api.h | |
| parent | 88ec11c62fa343451e74efba37fba70f3b67997a (diff) | |
Easy Tracker: Deleting legacy point extractor. Various clean-up. Head center preview now working.
Diffstat (limited to 'tracker-easy/tracker-easy-api.h')
| -rw-r--r-- | tracker-easy/tracker-easy-api.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/tracker-easy/tracker-easy-api.h b/tracker-easy/tracker-easy-api.h index 40e472d49..e5627d118 100644 --- a/tracker-easy/tracker-easy-api.h +++ b/tracker-easy/tracker-easy-api.h @@ -22,43 +22,28 @@ const int KPointCount = 3; -/// -/// Utility class providing coordinates conversion functionalities -/// -struct Coordinates final -{ - using f = numeric_types::f; - - static std::tuple<f, f> to_pixel_pos(f x, f y, int w, int h); - static std::tuple<f, f> to_screen_pos(f px, f py, int w, int h); -}; - - -struct pt_point_extractor +class IPointExtractor { +public: using vec2 = numeric_types::vec2; using f = numeric_types::f; - pt_point_extractor(); - virtual ~pt_point_extractor(); - virtual void extract_points(const cv::Mat& image, cv::Mat& preview_frame, std::vector<vec2>& points, std::vector<vec2>& imagePoints) = 0; - - static f threshold_radius_value(int w, int h, int threshold); + virtual void extract_points(const cv::Mat& image, cv::Mat* aPreview, std::vector<vec2>& aPoints) = 0; }; -struct pt_runtime_traits +struct IEasyTrackerTraits { template<typename t> using pointer = std::shared_ptr<t>; - pt_runtime_traits(); - virtual ~pt_runtime_traits(); + IEasyTrackerTraits(); + virtual ~IEasyTrackerTraits(); - virtual pointer<pt_point_extractor> make_point_extractor() const = 0; + virtual pointer<IPointExtractor> make_point_extractor() const = 0; virtual QString get_module_name() const = 0; }; template<typename t> -using pt_pointer = typename pt_runtime_traits::pointer<t>; +using pt_pointer = typename IEasyTrackerTraits::pointer<t>; #ifdef __clang__ # pragma clang diagnostic pop |
