Added a sleep in order to run the output close to real time
This commit is contained in:
parent
3f114dd792
commit
02369184fa
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ from pathlib import Path
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
import imutils
|
import imutils
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
@ -47,6 +48,7 @@ def main():
|
||||||
# exit if 's' key is pressed
|
# exit if 's' key is pressed
|
||||||
if cv2.waitKey(1) & 0xFF == ord('s'):
|
if cv2.waitKey(1) & 0xFF == ord('s'):
|
||||||
break
|
break
|
||||||
|
time.sleep(0.03)
|
||||||
else:
|
else:
|
||||||
print("Could not read frame!")
|
print("Could not read frame!")
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue