# Revision history [back]

magic: add a waitkey(30); after the imshow()

long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)

• magic: add a waitkey(30); after the imshow()

• long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)

• magic: add a waitkey(30);cv::waitkey(30); after the imshow()cv::imshow()

• long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)