在iPhone屏幕上绘图时识别模式 [英] Recognizing patterns when drawing over the iPhone screen

查看:139
本文介绍了在iPhone屏幕上绘图时识别模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个游戏,用户可以通过用手指绘制某些图案来发出命令......例如,如果他画了一个圆圈,一个'S'字母,一个表示法等等。

I'm trying to write a game where the user can issue commands by drawing certain patterns with his fingers..for example, if he draws a circle, an 'S' letter, an expiral, etc.

我已经熟悉了触摸事件,我能够读取坐标...我的问题是找到有关识别模式的算法和信息,但有一定程度的错误....例如,如果我应该检测到一个圆圈,我应该检测它,即使用户没有完成一个完美的。

I'm already familiar with touch events and I'm capable of reading the coordinates... my problem Is in finding algorithms and information about the recognition of the patterns with some degree of error.... for example, If I'm supposed to detect a circle I should detect it even if the user didn't did a make perfect one.

任何资源在这件事情上,谢谢!

Any resources in the matter?, thanks !

推荐答案

这个网站演示了一个非常简单,易于实现的手势识别器,他们用Javascript编写。我用另一种语言自己实现了它,发现它很容易处理。他们有代码,还有一篇描述算法的论文;你可能需要的一切。

This site demos a very simple, easy to implement gesture recognizer, which they wrote in Javascript. I've implemented it myself in another language, and found it quite easy to deal with. They've got code, and a paper describing the algorithm; everything you could need.

这篇关于在iPhone屏幕上绘图时识别模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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