If We use cvShowImage function, The image wouldn't be shown on the window until cvWaiKey is called.

I got this problem when I displayed a video sequence. It's interesting that the window showed nothing without cvWaitKey, while when I stepped into the program, I could see the image correctly with the tool Image Watch ，The following code could directly show that: