在不使用鼠标的情况下控制鼠标 [英] control the mouse without using the mouse

查看:121
本文介绍了在不使用鼠标的情况下控制鼠标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用激光和网络摄像头控制鼠标?
我想用激光指示器替换鼠标....单击两次,双击我想用激光指示器几乎完成所有操作的鼠标....我该怎么做?

How can i control the mouse using a laser and a webcam?
i want to replace the mouse with the laser pointer....single click,double click n whatever mouse does i want to do almost all with the laser pointer....how can i do it??

推荐答案


  1. 在没有木板或家具的墙壁之前是理想的.
  2. 将网络摄像头对准墙壁,并保持一定距离,以使理想情况下,所有墙壁都被网络摄像头图像覆盖.
  3. 让程序从摄像机读取视频流,并进行分析以识别单击,双击,定位甚至手势.



读取视频流并从中读取帧将非常简单,也许可以在这里找到:多功能WebCam C#库 [ ^ ].由于激光笔很亮,并且大多数都具有独特的颜色,因此获取激光点在框架上的位置也不会造成问题.如果您的激光笔有一个可以打开和关闭的按钮,则可以轻松地模拟鼠标.将激光关闭一定的TBD时间将被记录为单击,双击也是如此.激光再次重新亮起时,应同时触发咔嗒声和双击声.

本文也可能为您提供很好的服务: C ++中的实时对象跟踪器 [ ^ ] .codeproject.com/script/Membership/View.aspx?mid = 4613314> Chesnokov Yuriy [



Reading of a video stream and fetching the frames from that would be pretty much straight forward and maybe can be found here: Versatile WebCam C# library[^]. Since laser pointers are rather bright and mostly have a distinctive color fetching the position of the laser dot on the frame should also pose no problem. If your laserpointer has a button with which it can be turned on and off you could easily emulate the mouse with that. Turning the laser off for a certain TBD amount of time would be registered as a click and the same goes for the double click. The click as well as the double click should be triggered when the laser finally comes back on.

This article might also serve you well: Real-Time Object Tracker in C++[^] by Chesnokov Yuriy[^]

Best Regards,

—MRB


这篇关于在不使用鼠标的情况下控制鼠标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆