From 4ca4b13b62426c7f6921d88f72cd0a15986dca29 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Feb 2019 08:13:50 +0100 Subject: tracker/aruco: avoid busy-loop on camera failure --- tracker-aruco/ftnoir_tracker_aruco.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tracker-aruco/ftnoir_tracker_aruco.cpp') diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index bddec739..986eb943 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -374,7 +374,10 @@ void aruco_tracker::run() QMutexLocker l(&camera_mtx); if (!camera.read(color)) + { + portable::sleep(100); continue; + } } cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); -- cgit v1.2.3