From e842a0c8164164a3882202666dd8a20a8040bd00 Mon Sep 17 00:00:00 2001 From: Ethan Rublee Date: Wed, 20 Oct 2010 18:49:44 +0000 Subject: [PATCH] change int to char so that keys are registered properly, maybe this breaks others though --- samples/cpp/calibration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/calibration.cpp b/samples/cpp/calibration.cpp index 170ebf1391..6de2b0ea9d 100644 --- a/samples/cpp/calibration.cpp +++ b/samples/cpp/calibration.cpp @@ -448,7 +448,7 @@ int main( int argc, char** argv ) } imshow("Image View", view); - int key = waitKey(capture.isOpened() ? 50 : 500); + int key = 0xff & waitKey(capture.isOpened() ? 50 : 500); if( (key & 255) == 27 ) break; @@ -491,7 +491,7 @@ int main( int argc, char** argv ) //undistort( view, rview, cameraMatrix, distCoeffs, cameraMatrix ); remap(view, rview, map1, map2, INTER_LINEAR); imshow("Image View", rview); - int c = waitKey(); + int c = 0xff & waitKey(); if( (c & 255) == 27 || c == 'q' || c == 'Q' ) break; }