From 6daebd39798c593bf68a2a207d9f1e403aefb73a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 25 Sep 2019 00:38:26 +0200 Subject: [PATCH] updates --- utils/datasets.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/datasets.py b/utils/datasets.py index dabdedcd..08b55466 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -208,12 +208,11 @@ class LoadStreams: # multiple IP or RTSP cameras w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) fps = cap.get(cv2.CAP_PROP_FPS) % 100 - print(' success (%gx%g at %.2f FPS).' % (w, h, fps)) + _, self.imgs[i] = cap.read() # guarantee first frame thread = Thread(target=self.update, args=([i, cap]), daemon=True) + print(' success (%gx%g at %.2f FPS).' % (w, h, fps)) thread.start() - print('') # newline - time.sleep(0.5) # allow connections to start def update(self, index, cap): # Read next stream frame in a daemon thread