summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-23 15:24:15 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-23 15:24:15 +0100
commit96988d34f573087a4b7359b8358d081ee1f8a5ba (patch)
tree0249804b667ef7f58023888103490419c9a55794 /tracker-aruco
parent8c012e5835d5b4d0500810309b0a8e6d360aad53 (diff)
tracker/aruco: fix experimental Canny thresholding
Diffstat (limited to 'tracker-aruco')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp4
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 78be1623..c322d323 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -312,8 +312,12 @@ void aruco_tracker::set_detector_params()
detector._thresMethod = aruco::MarkerDetector::FIXED_THRES;
else
detector._thresMethod = aruco::MarkerDetector::ADPT_THRES;
+
+ detector.setThresholdParams(adaptive_sizes[adaptive_size_pos], adaptive_thres);
#else
detector._thresMethod = aruco::MarkerDetector::CANNY;
+ int value = adaptive_sizes[adaptive_size_pos];
+ detector.setThresholdParams(value, value * 3);
#endif
}
diff --git a/tracker-aruco/ftnoir_tracker_aruco.h b/tracker-aruco/ftnoir_tracker_aruco.h
index f25d3314..3a98e9d1 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.h
+++ b/tracker-aruco/ftnoir_tracker_aruco.h
@@ -133,9 +133,9 @@ private:
static constexpr inline const int adaptive_sizes[] =
{
#if defined USE_EXPERIMENTAL_CANNY
- 3,
- 5,
- 7,
+ 10,
+ 30,
+ 80,
#else
7,
9,