Ask Your Question

Revision history [back]

Simply said, what @sturkmen says, is that you do not automatically refresh the window, but wait for a keypress. You can solve this by changing k=cv2.waitKey(0) & 0XFF to k=cv2.waitKey(10) & 0XFF which will auto refresh your screen each 10 milliseconds.

Simply said, what @sturkmen says, is that you do not automatically refresh the window, but wait for a keypress. Your waitKey(0) holds your loop forever, until a key is pressed. This makes that your while loop is actually not doing anything. You can solve this by changing k=cv2.waitKey(0) & 0XFF to k=cv2.waitKey(10) & 0XFF which will auto refresh your screen each 10 milliseconds.