如何在iPhone应用程序中实现手写识别功能?
我的 iPhone 应用程序有一个类似于手写识别的要求。
我想在我的视图上给用户一个空间,他可以通过在屏幕上触摸和拖动手指来书写任何字符,并根据与他的输入相匹配的内容,文本框应显示英文字母。
上面是我想要的示例:
我应该如何实现此功能?我是这方面的初学者。
I have a requirement in my iPhone app which is something similar to Handwriting Recognition.
I want to give user a space on my view where he can write any character by touch and dragging his finger on the screen and based on what matches with his input the textbox should show the English alphabet.
Above is an example of what I want:
How should I implement this feature? I am a beginner in this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您最好开始了解此功能的图像处理。不难,但是OCR,应该是你类似的编码。然而,由于其瞬态性,手写识别非常困难。但无论如何,它是可行的。
You better start to learn about image processing for this feature. It is not difficult but the OCR , should be your similar coding. However, because of its transient then the hand writing recognition is much difficult.. But anyway, it is doable.
我已经看到一些围绕 UIGestureRecognizer 子类的代码来定义“检查”手势。它识别触摸开始,向东南移动,然后向东北移动以绘制复选标记。也许您可以将字母形状定义为特定的手势识别器,然后将整个识别器字母表附加到视图中,看看您会得到什么。
I've seen some code around to subclass UIGestureRecognizer to define a "check" gesture. It recognizes touch beginning, moving southeast, then moving northeast to draw a checkmark. Perhaps you could define letter shapes as specific gesture recognizers and then attached your whole alphabet of recognizers to a view and see what you get.
目前没有可用的手写框架或库。如果你足够聪明,可以使用iOS的一些手势技术和手写算法来创建它
There is no handwriting Frameworks or Libraries currently available. If you are brainy enough use some gesture techniques of iOS and handwriting algorithms to create it