使用手势在屏幕上显示鼠标指针时出现问题 [英] problem with displaying of a Mouse Pointer on the screen using hand motion

查看:166
本文介绍了使用手势在屏幕上显示鼠标指针时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在使用手势进行虚拟鼠标项目,
手戴式腕带,根据腕带的中心,我将鼠标指针移动到屏幕上,方法是使用以下公式将中心坐标转换为屏幕坐标:
xscreen =(ximage/图像宽度)*屏幕宽度
yscreen =(yimage/图像高度)*屏幕高度
问题是鼠标指针不能在屏幕上平滑移动,但是会以非常不自然的方式跳跃.

hi all
i''m working on a virtual mouse project using hand motion,
the hand wear wristband, according to the center of wristband i move the mouse pointer on the screen,by converting the center coordinates to screen coordinates using the following equation:
xscreen=(ximage/image width)*screen width
yscreen=(yimage/image height)*screen height
the problem is that the mouse pointer does not move on the screen smoothly,but it jumps in a very unnatural fashion.

推荐答案

问题可能是您的分辨率与您的屏幕分辨率相比,图像太低.
如果图像宽度为160,屏幕宽度为1600,则对于探测器中移动的每个像素,屏幕中的像素将移动十.如果是这种情况,那么就很难对其进行平滑处理,因为您必须发明"中间像素并将其保持与真实对象大致相同的速度.

另一种可能性是检测频段位置花费的时间太长-因此连续检测相距很远.解决方案?加快检测速度,获得更快的处理器,转向本机代码...

无论哪种方式,我都认为在这种稀疏的描述中我们无法为您提供很多帮助.
The problem is possibly that the resolution of your image is too low compared to your screen resolution.
If your image width is 160 and your screen width is 1600, then for every pixel you move in the detector, you will move ten in the screen. If this is the case, then it gets really difficult to smooth it as you have to "invent" the intermediate pixels and keep it to roughly the same speed as the real object.

The other possibility is that it is taking too long to detect the band position - so successive detections are a long way apart. Solution? Speed up detection, get a faster processor, move to native code...

Either way, I don''t think there is a lot we can do to help you from such a sparse description.


这篇关于使用手势在屏幕上显示鼠标指针时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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