kinect平滑鼠标移动 [英] kinect smoothing mouse movement

查看:157
本文介绍了kinect平滑鼠标移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在开发一个项目,以使用kinect使用 Depth Image 跟踪的指尖移动鼠标光标.我可能会进行跟踪,但是问题是要以平滑的方式移动鼠标.在我的程序中,当我移动鼠标时,鼠标不会平滑移动,而是从一个像素跳到另一个像素.我的问题是,是否可以使用类似骨骼跟踪的平滑参数的方法来平滑光标的移动?

Hello all,
I''m working on a project to move the mouse cursor using the fingertip which is tracked by kinect using Depth Image. I''m albe to do the tracking but the problem is in moving the mouse in a smooth way. In my program, when I move the mouse it doesn''t move in a smooth way , but instead it just jumps from pixel to pixel. My question is , Is there a way to use something like the smooth parameters of the skeletal tracking inorder to smooth my cursor''s movement ?

推荐答案

骨骼平滑,这应该会有所帮助.我发现的最佳方法是使用所需目标的移动平均值(在您的情况下为鼠标的位置).因此,与其在每次指尖移动时简单地移动光标,不如使用队列来存储最后N个点(从5到12的任何地方似乎都很好用).然后,您可以对队列中的值求平均值,并将其应用于光标.在下一个循环中,您将删除最旧的点,并将新的点添加到队列中,然后再次取平均值.您只是重复一遍.您可以通过调整队列中保留的点数来获得更高或更低的平滑度.
You could use the skeletal smoothing, and that should help a bit. The best way I''ve found is with a moving average of your desired target (in your case, the mouse location). So instead of simply moving the cursor every time you have a movement in your fingertip point, use a queue to store the last N number of points (anywhere from 5 to 12 seems to work well). You then average the values in the queue, and apply that to your cursor. The next cycle, you will remove the oldest point, and add the new point to the queue, then average again. You just keep repeating this. You can get higher or lower smoothing by adjusting the number of points you keep in your queue.


这篇关于kinect平滑鼠标移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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