summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/tracker-easy-api.h
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-easy/tracker-easy-api.h')
-rw-r--r--tracker-easy/tracker-easy-api.h31
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