Add cv::waitKey to loops.