Skip to content

Commit e19a449

Browse files
Fixed roiSelector platform dependency bug - lower 8 bits comparison for keypresses.
1 parent f073c00 commit e19a449

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/tracking/src/roiSelector.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ namespace cv {
107107
// select the object
108108
setMouseCallback( windowName, mouseHandler, (void *)&selectorParams );
109109

110+
// extract lower 8 bits for scancode comparison
111+
unsigned int key_ = key & 0xFF;
110112
// end selection process on SPACE (32) ESC (27) or ENTER (13)
111-
while(!(key==32 || key==27 || key==13)){
113+
while(!(key_==32 || key_==27 || key_==13)){
112114
// draw the selected object
113115
rectangle(
114116
selectorParams.image,

0 commit comments

Comments
 (0)