From 16bb3e13dd2a7ed8fa3652e313d592dd81c73a07 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 16 Jul 2016 23:32:48 +0200 Subject: tracker/pt: declare floating-point type size in one place We want double precision for POSIT. It's best for the type to be set in ope place without the need to go over everything while switching it back and forth during tests. Machine epsilon for float is very small as per . Also see the absurdly high epsilon of 1e-4 of POSIT that we've had. With floats, making the epsilon lower resulted in change deltas flushing to zero. This typically led to the translation Z value being very unstable in PT. After the epsilon and data type size changes the Z value is stable. --- tracker-pt/point_extractor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tracker-pt/point_extractor.h') diff --git a/tracker-pt/point_extractor.h b/tracker-pt/point_extractor.h index 94948d34..67b2b8ea 100644 --- a/tracker-pt/point_extractor.h +++ b/tracker-pt/point_extractor.h @@ -16,13 +16,13 @@ #include -class PointExtractor +class PointExtractor final : private pt_types { public: // extracts points from frame and draws some processing info into frame, if draw_output is set // dt: time since last call in seconds // WARNING: returned reference is valid as long as object - const std::vector &extract_points(cv::Mat &frame); + const std::vector& extract_points(cv::Mat &frame); int get_n_points() { QMutexLocker l(&mtx); return points.size(); } PointExtractor(); @@ -31,7 +31,7 @@ private: static constexpr double pi = 3.14159265359; static constexpr int hist_c = 1; - std::vector points; + std::vector points; QMutex mtx; cv::Mat frame_gray; cv::Mat frame_bin; -- cgit v1.2.3