summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/pt-api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt/pt-api.cpp')
-rw-r--r--tracker-pt/pt-api.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tracker-pt/pt-api.cpp b/tracker-pt/pt-api.cpp
index c11f372f..0a6c8e2b 100644
--- a/tracker-pt/pt-api.cpp
+++ b/tracker-pt/pt-api.cpp
@@ -60,3 +60,22 @@ double pt_point_extractor::threshold_radius_value(int w, int h, int threshold)
return radius;
}
+
+
+std::tuple<double, double> pt_pixel_pos_mixin::to_pixel_pos(double x, double y, int w, int h)
+{
+ return std::make_tuple(w*(x+.5), .5*(h - 2*y*w));
+}
+
+std::tuple<double, double> pt_pixel_pos_mixin::to_screen_pos(double px, double py, int w, int h)
+{
+ return std::make_tuple((px - w/2.)/w, -(py - h/2.)/w);
+}
+
+pt_frame::pt_frame()
+{
+}
+
+pt_frame::~pt_frame()
+{
+}