如何做出和识别手势?

发布于 2024-12-17 02:55:35 字数 291 浏览 0 评论 0原文

我正在使用网络摄像头获取视频源,然后对此视频源执行运动跟踪。运动跟踪器连续返回(x,y)坐标。

我想使用这些 (x,y) 来识别“向左滑动”、“向右滑动”、“向上滑动”或“向下滑动”等手势。

我如何制作和存储这些手势的模板以及如何找出/识别是否有一个 的手势已经发生了吗?

提前谢谢您:)

PS:我正在使用 Flex 4 和 ActionScript 3.0。如果有人可以帮我解决逻辑,我可以用 ActionScript 编写它。

I am using a web cam to get video feed and then performing motion tracking on this video feed. The motion tracker returns (x,y) co-ordinates continuously.

I want to use these (x,y) to recognize gestures such as "swipe left", "swipe right", "swipe up" or "swipe down".

How do i make and store templates of these gestures and how do i figure out/recognize if one
of the gestures has happened ?

Thank you in advance :)

PS: I am using Flex 4 and ActionScript 3.0. If someone could help me out with the logic, i can write it in ActionScript.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

似最初 2024-12-24 02:55:35

我能想到的一种可行的方法是使用一系列(X,Y)坐标来表示沿着手势的点。在小范围内,如果通过屏幕的手势被绘制为这样的图形:

|1|1|1|

|1|0|0|

|1|0|0|

并表示(从左上角表示 0,0):

(0,2)(0,1)(0,0)(0,1)(0,2)

将 x,y 坐标分解为单独的二维数组当前坐标和第一个点之间的总距离(在本例中的所有情况下都会增加 1),因此您将有两个数组:

X:(0,0)(1,1)(2,2)

Y:(0,1)(1,1)(2,2)

现在对每个数组进行最小二乘拟合,以找到 x 变化和 y 变化最接近的二次函数表示。对您的每个确定的手势执行相同的操作,然后将您的每个确定的手势的 x,y 坐标插入到用户手势的二次函数和您设计的每个确定的手势中,并查看哪一个最匹配。这是你的手势。

(我从未尝试过处理手势,但我不明白为什么这不起作用)

An approach I could think of working would be to have a series of (X,Y) coordinates representing points along the gesture. On a small scale if a gesture that passed through your screen was graphed as such:

|1|1|1|

|1|0|0|

|1|0|0|

and represented (from the upper left corner representing 0,0):

(0,2)(0,1)(0,0)(0,1)(0,2)

Break the x,y coordinates up into individual 2d arrays with total distance traveled between the current coordinate and the first point (in all cases in this example it would increment by 1) so you would have two arrays:

X:(0,0)(1,1)(2,2)

Y:(0,1)(1,1)(2,2)

Now do a least square fit on each array to find the closest representation of the change in x and change in y as quadratic functions. Do the same to your per-deteremined gestures and then plug in the x,y coordinates of your per-determined gestures into to the user's gesture's quadratic function and the per-determined gestures you designed and see which one it matches the closest. This is your gesture.

(I've never tried processing gestures, but I don't see why this wouldn't work)

溺孤伤于心 2024-12-24 02:55:35

您应该将您的任务分成更小的子任务。在计算机视觉中,没有什么比通用手势检测更能在所有环境中开箱即用的了。

首先,您需要能够检测运动。有多种方法可以做到这一点,例如背景扣除或斑点跟踪。

然后您需要从图像中提取某些特征,例如手。同样,有不止一种方法可以做到这一点。从肤色近似/评估(在不同的照明条件下很容易出错)开始,到真正尝试“分析”物体形状的更先进的技术。随着时间的推移,这些算法会“学习”手的样子。

我只能建议购买一本关于计算机视觉的像样的书,并在网上研究文章等。还有像 OpenCV 这样的库,您可以使用它来了解有关实现方面的更多信息。应该有多个 OpenCV 到 ActionScript 3 的端口。我还可以推荐 Eugene Zatepyakin 的文章和工具 (http://blog .inspirit.ru)。他正在使用 ActionScript 3 完成出色的 CV 工作。

长话短说,您应该研究运动跟踪和特征提取。

You should divide your task into smaller subtasks. In computer vision there is no thing like a generic gesture detection that works out of the box in all environments.

First of all, you need to be able to detect motion at all. There are several ways to do this, e.g. background subtraction or blob tracking.

Then you need to extract certain features from your image, e.g. a hand. Again, there is more than one way to do this. Starting from skin color approximation/evaluation, which is very error prone to different lighting conditions, to more advanced techniques which really try to "analyze" the shape of an object. Those algorithms "learn" over time how a hand should look like.

I can only recommend to buy a decent book about computer vision and to research the web for articles etc. There are also libraries like OpenCV you can use for learning more about the implementation side. There should be several ports of OpenCV to ActionScript 3. I also can recommend the articles and tools from Eugene Zatepyakin (http://blog.inspirit.ru). He's doing great CV stuff with ActionScript 3.

Long story short, you should research motion tracking and feature extraction.

农村范ル 2024-12-24 02:55:35

最好的起点是了解手语识别或触控板输入的工作原理,例如创建参考图像并将其与用户输入进行比较。针对 Adob​​e,有 FLARToolKit,详细信息请参阅 增强现实文章。

参考文献:

触控板科学

手手势识别

手语识别研究 - PDF< /a>

手势识别演练 - 视频

The best place to start is to read about how sign language recognition or trackpad input works, such as creating reference images and comparing them to user input. Specific to Adobe, there's the FLARToolKit, which is detailed in an augmented reality article on their website.

References:

Trackpad Science

Hand Gesture Recognition

Sign Language Recognition Research - PDF

Gesture Recognition Walkthrough - Video

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文