我正在基于Gesture的鼠标做一个项目 . 我用手作为对象 . 我已经跟踪了手,现在我得到了手轮廓中心的坐标 . 现在,如果我直接使用那个坐标,那么我就无法将鼠标移到手窗外 . 我尝试使用缩放因子,但是,然后,鼠标位置向下移动而不是缩放,但新指针覆盖的区域与手轮廓窗口相同 . 我可以做什么来覆盖整个屏幕 . 我在OpenCV上使用Visual C 2010 . 鼠标调用和鼠标功能的代码片段如下 .

/*SetCursorPos sets the cursor position at x,y*/
int mymouse(int x,int y)
{
        x*=3; /*I have tried many value for this, like screen size/handcontour window size etc*/
        y*=3;
    SetCursorPos(x,y);
    return 0;
}

/* x and y of hand center are passed as shown below*/

mymouse(mc[0].x,mc[0].y);

更新:我可以使用ClientToScreen()或MapWindowPoints来实现相同的目标吗?如果是这样,请解释相同 .