change int to char so that keys are registered properly, maybe this breaks others though

pull/13383/head
Ethan Rublee 14 years ago
parent be016a75df
commit e842a0c816
  1. 4
      samples/cpp/calibration.cpp

@ -448,7 +448,7 @@ int main( int argc, char** argv )
} }
imshow("Image View", view); imshow("Image View", view);
int key = waitKey(capture.isOpened() ? 50 : 500); int key = 0xff & waitKey(capture.isOpened() ? 50 : 500);
if( (key & 255) == 27 ) if( (key & 255) == 27 )
break; break;
@ -491,7 +491,7 @@ int main( int argc, char** argv )
//undistort( view, rview, cameraMatrix, distCoeffs, cameraMatrix ); //undistort( view, rview, cameraMatrix, distCoeffs, cameraMatrix );
remap(view, rview, map1, map2, INTER_LINEAR); remap(view, rview, map1, map2, INTER_LINEAR);
imshow("Image View", rview); imshow("Image View", rview);
int c = waitKey(); int c = 0xff & waitKey();
if( (c & 255) == 27 || c == 'q' || c == 'Q' ) if( (c & 255) == 27 || c == 'q' || c == 'Q' )
break; break;
} }

Loading…
Cancel
Save