I\'ve just begun using the OpenCV library for Python and came across something I didn\'t understand.
cap = cv2.VideoCapture(0) while True: ret, frame =
cv2.waitkey(1) is being used in while loop.It shows the output for 1msec but because of infinite while loop it is the sequence of images that are perceived by our brain as a single continuos video.
Hope this helped.