From 02cb0471631279e3df3d18fa63fd202e03b8f11d Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Wed, 3 Jul 2024 22:24:55 +0200 Subject: [PATCH] infinite loop --- ocv_template_matching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocv_template_matching.py b/ocv_template_matching.py index 7357bf7..746b410 100644 --- a/ocv_template_matching.py +++ b/ocv_template_matching.py @@ -76,7 +76,8 @@ while True: # Read a new frame ok, image = video.read() if not ok: - break + video.set(cv2.CAP_PROP_POS_FRAMES, 0) + continue # Start timer timer = cv2.getTickCount()