

If you specify 0 as the value, then it will wait indefinitelyĭestroyAllWindows() will destroy all windows created. If you press any key, then the program will continue. If you specify a numeric value other than 0, then it will wait for specified milliseconds for any keyboard event. WaitKey() is a keyboard binding function.

The first parameter is the window name, and the second parameter is the image.
