gpt4 book ai didi

iphone - 在 iPhone 上绘图

转载 作者:行者123 更新时间:2023-12-03 18:58:58 25 4
gpt4 key购买 nike

我正在尝试为 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com