Commit a5ce8c7f authored by Ivan Tyagov's avatar Ivan Tyagov

stop iteration if key pressed ONLY in a non headless mode

parent 9cd47af7
......@@ -185,7 +185,7 @@ async def main():
if not headless:
cv2.imshow("Frame", frame)
cv2.imshow("Mask", mask)
# stop iteration if key pressed in a non headless mode
key = cv2.waitKey(1)
if key == 27:
break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment