iphone - 在 iPhone 上绘图

标签 iphone drawing vector gestures

我正在尝试为 child 开发一款 iPhone 应用程序,该应用程序能够通过触摸在屏幕上绘制字符,我想知道如何将绘制的字符与良好的字母字符相匹配。我将如何比较两种形状(绘图和现有) 任何想法?? 一些代码?

最佳答案

Using GLGestureRecognizer您可以创建一个目录,它将根据您预定义的“字母表”计算输入点数组之间的度量。

GLGestureRecognizer is an Objective-C implementation of the $1 Unistroke Recognizer, a simple gesture recognition algorithm (see Credits below). It is made available here in the form of an iPhone application project. It was implemented over the course of a couple evenings in late April 2009 by Adam Preble.

A demo iPhone project (Gestures.xcodeproj) is provided; a UIView subclass receives touch events and sends them to the GLGestureRecognizer class while drawing the touched path in white. Once the gesture is completed, the resampled gesture is shown in green, its center at the red dot, along with the name of the best match, score (lower is better), and gesture orientation. A sample size of 16 points is used in the example, which seems to be adequate for very basic shapes.

关于iphone - 在 iPhone 上绘图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3352822/

相关文章:

iphone - Xcode iPhone OS 多个版本

java - 如何使用 g.fillRect 方法在 Java 中创建一个 Rectangle 对象

c++ - 在 eclipse 4.16.0 中启用 pretty-print 在 Windows 10 上不起作用

iphone - CoreData 中不同的模型版本

iphone - iOS 4核心横向运动姿态

iphone - 如何使用加速度计检测 iPhone 在太空中的运动?

c++ - 运行 mastermind 程序时出现 Cygwin 错误

c++ - 如何重写像vector这样的c++类

iphone - 应用程序 didReceiveLocalNotification 未触发 iOS7

javascript - Highcharts - 对 Angular 线 X/Y 轴