diff options
Diffstat (limited to 'tracker-aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 53907808..ec778624 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -15,6 +15,10 @@ #include <opencv2/imgproc.hpp> #include <opencv2/calib3d.hpp> +#ifdef DEBUG_UNSHARP_MASKING +# include <opencv2/highgui.hpp> +#endif + #include <QMutexLocker> #include <QDebug> @@ -34,6 +38,10 @@ constexpr const double aruco_tracker::RC; constexpr const float aruco_tracker::size_min; constexpr const float aruco_tracker::size_max; +#ifdef DEBUG_UNSHARP_MASKING +constexpr double aruco_tracker::gauss_kernel_size; +#endif + aruco_tracker::aruco_tracker() : pose{0,0,0, 0,0,0}, fps(0), @@ -371,6 +379,16 @@ void aruco_tracker::run() cv::cvtColor(color, grayscale, cv::COLOR_RGB2GRAY); +#ifdef DEBUG_UNSHARP_MASKING + { + static constexpr double strength = double(DEBUG_UNSHARP_MASKING); + cv::GaussianBlur(grayscale, blurred, cv::Size(0, 0), gauss_kernel_size); + cv::addWeighted(grayscale, 1 + strength, blurred, -strength, 0, grayscale); + cv::imshow("capture", grayscale); + cv::waitKey(1); + } +#endif + color.copyTo(frame); set_intrinsics(); |