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.cpp | |
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.cpp')
-rw-r--r-- | tracker-easy/tracker-easy-api.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/tracker-easy/tracker-easy-api.cpp b/tracker-easy/tracker-easy-api.cpp index aaeb0631..2e3988a8 100644 --- a/tracker-easy/tracker-easy-api.cpp +++ b/tracker-easy/tracker-easy-api.cpp @@ -4,32 +4,7 @@ using namespace numeric_types; +IEasyTrackerTraits::IEasyTrackerTraits() = default; +IEasyTrackerTraits::~IEasyTrackerTraits() = default; -pt_runtime_traits::pt_runtime_traits() = default; -pt_runtime_traits::~pt_runtime_traits() = default; -pt_point_extractor::pt_point_extractor() = default; -pt_point_extractor::~pt_point_extractor() = default; - -f pt_point_extractor::threshold_radius_value(int w, int h, int threshold) -{ - f cx = w / f{640}, cy = h / f{480}; - - const f min_radius = f{1.75} * cx; - const f max_radius = f{15} * cy; - - const f radius = std::fmax(f{0}, (max_radius-min_radius) * threshold / f(255) + min_radius); - - return radius; -} - -std::tuple<f, f> Coordinates::to_pixel_pos(f x, f y, int w, int h) -{ - return std::make_tuple(w*(x+f{.5}), f{.5}*(h - 2*y*w)); -} - -std::tuple<f, f> Coordinates::to_screen_pos(f px, f py, int w, int h) -{ - px *= w/(w-f{1}); py *= h/(h-f{1}); - return std::make_tuple((px - w/f{2})/w, -(py - h/f{2})/w); -} |