summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-06-17 11:49:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-06-19 12:45:37 +0200
commit0e8c0f346461db5d5dc2225bc0f82e02fdc01eb3 (patch)
tree6b595ce4eba58ede92a38d0203baf1c870f09a31
parentf60d22925820b996a9446eb58ac69f8410ed8da9 (diff)
tracker/trackhat: use the old point size scaleopentrack-2022.3.0
-rw-r--r--tracker-trackhat/frame.cpp3
-rw-r--r--tracker-trackhat/trackhat.hpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/tracker-trackhat/frame.cpp b/tracker-trackhat/frame.cpp
index d8fae002..0e97ed0e 100644
--- a/tracker-trackhat/frame.cpp
+++ b/tracker-trackhat/frame.cpp
@@ -114,9 +114,10 @@ void trackhat_frame::init_points(const trackHat_ExtendedPoints_t& points_, doubl
if (pt.m_area >= min_size && pt.m_area <= max_size)
p.ok = true;
+ constexpr f c = (f)2941/trackhat_camera::sensor_size;
p.brightness = pt.m_averageBrightness;
- p.area = pt.m_area;
+ p.area = pt.m_area * c;
p.W = std::max(1, pt.m_boundryRigth - pt.m_boundryLeft);
p.H = std::max(1, pt.m_boundryDown - pt.m_boundryUp);
p.x = trackhat_camera::sensor_size-1-pt.m_coordinateX;
diff --git a/tracker-trackhat/trackhat.hpp b/tracker-trackhat/trackhat.hpp
index 1494d994..04da69cb 100644
--- a/tracker-trackhat/trackhat.hpp
+++ b/tracker-trackhat/trackhat.hpp
@@ -155,7 +155,7 @@ struct trackhat_camera final : pt_camera
f deadzone_amount() const override { return 10; }
- static constexpr int sensor_size = 4095;
+ static constexpr int sensor_size = 4096;
static constexpr int sensor_fov = 52;
static constexpr int point_count = TRACK_HAT_NUMBER_OF_POINTS;
static constexpr bool debug_mode = true;