Fix the waitKey large number bug of opencv.