i am trying to move mouse cursor by capturing finger coordinate in opencv. i am not able to move the cursor to maximum screen size which is 1366*768. my webcam resolution is 640*480. my mouse pointer moves only to half of the screen. i do not know why.
This is my code segment. mouse_pointer.x and mouse_pointer.y are the coordinate of my fore-finger.The Mouse_move is not an opencv function.
this is the function call:
Code:
Mouse_Move(((1366*mouse_pointer.x)/640),((768*mouse_pointer.y)/480));
void Mouse_Move(DWORD dx,DWORD dy)
{
DWORD event=0;
event = MOUSEEVENTF_ABSOLUTE|MOUSEEVENTF_MOVE;
mouse_event(event, dx*65535/Get_ScreenWidth(), dy*65535/Get_ScreenHight(), 0, 0);
}