diff --git a/samples/python2/grabcut.py b/samples/python2/grabcut.py index 4de4f393b4..9fc1280acf 100644 --- a/samples/python2/grabcut.py +++ b/samples/python2/grabcut.py @@ -124,7 +124,7 @@ while(1): cv2.imshow('output',output) cv2.imshow('input',img) - k = cv2.waitKey(1) + k = 0xFF & cv2.waitKey(1) # key bindings if k == 27: # esc to exit