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-24 18:46:12 +0200 |
commit | 4af0298b4844727e87964697357af088b63921d1 (patch) | |
tree | 03c49473e6a8e65ee3e8ac9cc4b79766444bf412 /tracker-easy/tracker-easy-api.h | |
parent | 547f3314f2a4e75a5d2c540a5f1221e9c59277ae (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 40e472d4..e5627d11 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 |