summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-pt/camera.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index 220bcc8e..89854cc7 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -6,6 +6,7 @@
*/
#include "camera.h"
+#include "compat/sleep.hpp"
namespace impl {
@@ -124,8 +125,8 @@ DEFUN_WARN_UNUSED bool Camera::_get_frame(cv::Mat& frame)
{
if (cap && cap->isOpened())
{
- for (int i = 0; i < 100 && !cap->read(frame); i++)
- ;;
+ for (int i = 0; i < 5 && !cap->read(frame); i++)
+ portable::sleep(100);
if (frame.empty())
return false;