On my last project I had to use a gesture to initiate an event. Due to this, I recently started experimenting in creating a simple multitouch version of some gesture engines that are available. I’ve come across three that are already available in AS3 and choose to start with the $1 gesture algorithm http://depts.washington.edu/aimgroup/proj/dollar/. It only seems fitting to start with this one since Andy Wilson of microsoft research (and many multitouch devices) had a hand in it’s development.
Like most algorithms, this one matches points drawn with a template that’s already stored. After the gesture is finished, it is matched up against templates in the database and given a percentage of how much it matched it’s closest template (from 0-1). One of the coolest things about this engine is that it’s orientation-less. This means, no matter how you’re orientated on the surface it’ll still recognize the gesture.
The main thing I contributed to the already created $1 gesture port was the ability to have multiple simultaneous gestures occurring at once. This means a single user can perform more than one gesture at a time or multiple users can perform their own gestures while someone else is using the device.
Currently, the demo isn’t fully segregated form the core gesture classes and therefore there’s still some work to be done so that the gesture classes can be used without the demo itself. In the meantime, go ahead and test this out and make sure to give some feedback; it also works with the mouse. The demo allows you to draw a gesture and if it matches on in the database, that gesture will ‘light up.’
The tolerance is set at 80% and therefore if a gesture doesn’t match 80% of a template, it’s not recognized.
