我对 OpenCV 比较陌生,我正在尝试使用虚拟鼠标。我想出了如何检测不同的颜色并将它们过滤掉。当检测到特定颜色时,我找不到如何点击鼠标。这是我的示例代码:
if (b == 1){
if (x >= 0 && y >= 0 && PosX >= 0 && PosY >= 0)
//Here is the function to left clicking the mouse
}
Run Code Online (Sandbox Code Playgroud)
我想出了如何移动鼠标。我用过SetCursorPos(x,y)。我将不胜感激任何帮助。先感谢您!