diff options
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r-- | ftnoir_tracker_pt/FTNoIR_PT_Controls.ui | 58 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h | 7 | ||||
-rw-r--r-- | 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 @@ <string>Point extraction</string> </property> <layout class="QGridLayout" name="gridLayout_7"> - <item row="3" column="1"> - <widget class="QSpinBox" name="maxdiam_spin"> - <property name="toolTip"> - <string>Maximum point diameter</string> - </property> - <property name="suffix"> - <string> px</string> - </property> - <property name="maximum"> - <number>1024</number> - </property> - </widget> - </item> <item row="3" column="0"> <widget class="QLabel" name="label_8"> <property name="text"> @@ -322,19 +309,6 @@ </property> </widget> </item> - <item row="2" column="1"> - <widget class="QSpinBox" name="mindiam_spin"> - <property name="toolTip"> - <string>Minimum point diameter</string> - </property> - <property name="suffix"> - <string> px</string> - </property> - <property name="maximum"> - <number>1024</number> - </property> - </widget> - </item> <item row="1" column="0"> <widget class="QLabel" name="label"> <property name="text"> @@ -394,6 +368,38 @@ </property> </widget> </item> + <item row="3" column="1"> + <widget class="QDoubleSpinBox" name="maxdiam_spin"> + <property name="toolTip"> + <string>Maximum point diameter</string> + </property> + <property name="suffix"> + <string> px</string> + </property> + <property name="decimals"> + <number>1</number> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QDoubleSpinBox" name="mindiam_spin"> + <property name="toolTip"> + <string>Minimum point diameter</string> + </property> + <property name="suffix"> + <string> px</string> + </property> + <property name="decimals"> + <number>1</number> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + </widget> + </item> </layout> </widget> </item> 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<int> cam_res_x, cam_res_y, cam_fps, - threshold, - min_point_size, - max_point_size; + threshold; + value<double> min_point_size, max_point_size; value<int> m01_x, m01_y, m01_z; value<int> 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<cv::Vec2f> 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 { |