Commit a5ce8c7f authored by Ivan Tyagov's avatar Ivan Tyagov

stop iteration if key pressed ONLY in a non headless mode

parent 9cd47af7
......@@ -185,10 +185,10 @@ async def main():
if not headless:
cv2.imshow("Frame", frame)
cv2.imshow("Mask", mask)
key = cv2.waitKey(1)
if key == 27:
break
# stop iteration if key pressed in a non headless mode
key = cv2.waitKey(1)
if key == 27:
break
if __name__ == "__main__":
logging.basicConfig(level=logging.ERROR)
......
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