I have involved with opencv key finction ie cvWaitKey(0).whenever i press the "r" key the point on opencv image window is moving right direction, for "L" towards left ,for "u" upward direction as bbellow.
while(true)
{
int key = cvWaitKey(0);
cout<<"key="<<key<<endl;
if (key == 'u'){
y -= 1;
globalCoordinateY[point]=y;
}else if(key=='d'){
y += 1;
globalCoordinateY[point]=y;
}else if(key=='l'){
x -= 1;
globalCoordinateX[point]=x;
}else if(key=='r'){
x+= 1;
globalCoordinateX[point]=x;
}
showImage();
}
yes it works fine.
My problem is with arrow keys cvWaitKey(0) not working. Does Opencv provide a another function?if not can anyone give me suggestion about how to do that?
Thanking You.