This is a video of the $1 Gesture Recognizer running on a mobile phone (Sony Ericsson G900i), implemented in Java ME by Alex Olwal.
You can download the Java library here at olwal.com/?dollar.
Official $1 gesture recognizer website:
depts.washington.edu/aimgroup/proj/dollar/.
The $1 gesture recognizer was proposed by Jacob O. Wobbrock, Andrew D. Wilson, and Yang Li in their UIST 2007 paper:
faculty.washington.edu/wobbrock/pubs/uist-07.1.pdf