Why removing waitKey() in openCV doesn't work?
问题 I'm starting out with OpenCV with Python 3 and I have the following snippet: import cv2 video = cv2.VideoCapture(0) while True: success, captured_frame = video.read() cv2.imshow('Video', captured_frame) pressed_key = cv2.waitKey(1) & 0xFF if pressed_key == ord('q'): break video.release() cv2.destroyAllWindows() If I remove the pressed_key variable along with its condition, the program runs but the Video window is blank and Windows attempts to force quit the program. Why is that? 回答1: opencv