Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drawing on iphone

I am trying to develop an iPhone application for children which will be able to draw characters on screen with touch and I want to know how to match the character drawn with good character of the alphabet. How will i compare the two shapes (drawing and existing) Any idea?? some code?

like image 902
Jazzmanouch Avatar asked Oct 15 '22 02:10

Jazzmanouch


1 Answers

Using GLGestureRecognizer you can create a catalogue and it will compute a metric between an input point array against an "alphabet" you predefine.

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.

like image 170
CVertex Avatar answered Oct 19 '22 01:10

CVertex