waitKey有两个作用:
1. It waits for x milliseconds for a key press. If a key was pressed during that time, it returns the key's ASCII code. Otherwise, it returns -1.
2It handles any windowing events, such as creating windows with cv::namedWindow(), or showing images with cv::imshow().