summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-03 08:13:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-03 08:15:45 +0100
commit4ca4b13b62426c7f6921d88f72cd0a15986dca29 (patch)
treeffebcb4db25f09fe58413f8ad8d66abab1460828 /tracker-aruco
parent1beb7dfe8cd9a288893783862ce9f2e4a39239ab (diff)
tracker/aruco: avoid busy-loop on camera failure
Diffstat (limited to 'tracker-aruco')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp3
1 files changed, 3 insertions, 0 deletions
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);