c++ - Moving Mouse Pointer -
i doing project on gesture based mouse. using hand object. have tracked hand , co-ordinate of center of hand-contour. if use co-ordinates directly, can't move mouse outside hand-window. tried using scaling factor, then, instead of scaling, mouse position shifts downwards, area covered new pointer same hand-contour window. can covering entire screen. using visual c++ 2010 opencv. code snippet mouse call , mouse function below.
/*setcursorpos sets cursor position @ x,y*/ int mymouse(int x,int y) { x*=3; /*i have tried many value this, screen size/handcontour window size etc*/ y*=3; setcursorpos(x,y); return 0; } /* x , y of hand center passed shown below*/ mymouse(mc[0].x,mc[0].y);
update: can use clienttoscreen () or mapwindowpoints achieve same?? if please explain same .
Comments
Post a Comment