Tuesday, February 19, 2008

More of my Handiwork

Digging around through some old projects, and found this little gem.

Handwriting Recognition Demo

Working (mostly) handwriting recognition, in flash, using a fairly novel approach! (As far as I know at least.) Read on for more explanation!


Recently rediscovered this old prototype while dredging the depths of my "projects" directory. Funny story about it, actually. It came about, (as with so many good things) over a dare and subsequent bet. I was working on Leapster at the time, which was an embedded system that ran Flash. The neat thing about it was the stylus input, which, since the Nintendo DS was still new on the scene, was fairly fresh and neat.

We (myself and several other engineers) were musing over the possibility of using the stylus as a text input device, but the general consensus was that that wouldn’t be something that was possible with our CPU available, much less making it work in Flash.

Long story short, after insisting that it was probably possible, at least in a general sense, a friend wagered a candy bar that I was full of it.

As fate would have it though, what I was actually full of was flu virus, and I spent the next day (a Friday) home sick. With nothing better to do, I did some digging into the problem, and came up with this neat little prototype, which I proudly displayed the following Monday. (And yes, I got a candy-bar out of it.)

Sadly, LeapFrog was never terribly interested in going this direction, so it remains a fun curiosity that time forgot. Still, it’s a neat approach. It’s not perfectly accurate, but it does have the significant advantage that it runs at acceptable speeds on our poor, embedded flash system.

I’ve also uploaded this document, describing how it works, for anyone curious about the technical details. The short of it is, it basically uses a transformation, which converts the user’s glyph into a unique number which contains some topographic information, and then checks a giant, sorted list, to see if the number matches with anything known. Since the transformation is fairly fast at runtime, lookups are fairly quick.

Anyway. Neat, old stuff! Fond memories! I can still taste the candy bar! (It tasted like Science! And also like Victory!)

No comments: