From f2607137b744b66b84be799fe56db08595c38867 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 17 Oct 2015 13:02:08 +0200 Subject: pt: switch min/max point size to reals --- ftnoir_tracker_pt/FTNoIR_PT_Controls.ui | 58 ++++++++++++++------------ ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h | 7 ++-- ftnoir_tracker_pt/point_extractor.cpp | 4 +- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui index acdbda78..88575644 100644 --- a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui +++ b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui @@ -299,19 +299,6 @@ Point extraction - - - - Maximum point diameter - - - px - - - 1024 - - - @@ -322,19 +309,6 @@ - - - - Minimum point diameter - - - px - - - 1024 - - - @@ -394,6 +368,38 @@ + + + + Maximum point diameter + + + px + + + 1 + + + 0.100000000000000 + + + + + + + Minimum point diameter + + + px + + + 1 + + + 0.100000000000000 + + + diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h index 57e68d0e..d7ddb6a9 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h @@ -17,9 +17,8 @@ struct settings_pt : opts value cam_res_x, cam_res_y, cam_fps, - threshold, - min_point_size, - max_point_size; + threshold; + value min_point_size, max_point_size; value m01_x, m01_y, m01_z; value m02_x, m02_y, m02_z; @@ -42,7 +41,7 @@ struct settings_pt : opts cam_res_y(b, "camera-res-height", 480), cam_fps(b, "camera-fps", 30), threshold(b, "threshold-primary", 128), - min_point_size(b, "min-point-size", 10), + min_point_size(b, "min-point-size", 1), max_point_size(b, "max-point-size", 50), m01_x(b, "m_01-x", 0), m01_y(b, "m_01-y", 0), diff --git a/ftnoir_tracker_pt/point_extractor.cpp b/ftnoir_tracker_pt/point_extractor.cpp index 0ac2fc32..77f2473c 100644 --- a/ftnoir_tracker_pt/point_extractor.cpp +++ b/ftnoir_tracker_pt/point_extractor.cpp @@ -28,8 +28,8 @@ std::vector PointExtractor::extract_points(cv::Mat& frame) cv::Mat frame_gray; cv::cvtColor(frame, frame_gray, cv::COLOR_RGB2GRAY); - const int region_size_min = s.min_point_size; - const int region_size_max = s.max_point_size; + const double region_size_min = s.min_point_size; + const double region_size_max = s.max_point_size; struct simple_blob { -- cgit v1.2.3