From 1fb92e6c58573d8188e8fe2cd49257409d15f527 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 22 Feb 2018 12:56:50 +0100 Subject: [PATCH] opencv_trail_effect.cpp: use cv::waitKeyEx() instead of cv::waitKey() In some OpenCV 3 version there was a change of behavior of cv::waitKey() in case the delay expired with no key presses, use cv::waitKeyEx() to rely on the old behavior. For details see https://github.com/opencv/opencv/pull/7866#issuecomment-269322846 --- opencv_trail_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv_trail_effect.cpp b/opencv_trail_effect.cpp index 97b4aa7..5a4e928 100644 --- a/opencv_trail_effect.cpp +++ b/opencv_trail_effect.cpp @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) trail->draw(canvas); cv::imshow("Frame", canvas); - if (cv::waitKey(30) >= 0) + if (cv::waitKeyEx(30) >= 0) break; if (outputVideo.isOpened()) -- 2.1.4