diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-31 07:28:00 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-31 07:53:02 +0100 |
commit | 1576bd06113ca6fc9a4ddb68621a636c0a21ee2e (patch) | |
tree | 6d14bc3bf4b251f3f8dda02cd16bdc2990e5f2aa /tracker-aruco/ftnoir_tracker_aruco.cpp | |
parent | e8d59272d85bcac4a89ff36a190aee09dd7dfac9 (diff) |
tracker/aruco: add inactive experimental unsharp masking code
It's slow and untested beyond my replaying users' camera feed videos.
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(); |