diff options
Diffstat (limited to 'tracker-aruco')
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 6e94e618..f389ea2c 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -388,7 +388,9 @@ void aruco_tracker::run() switch (img.channels) { case 1: - grayscale.setTo(color); break; + grayscale.create(img.height, img.width, CV_8UC1); + color.copyTo(grayscale); + break; case 3: cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); break; |