Showing posts with label Template Matching. Show all posts
Showing posts with label Template Matching. Show all posts

Sunday, October 12, 2014

Write your own Gesture Recognizer: Quick and Easy

$1 Recognizer

Citation

J. O. Wobbrock, M. G. Hall, and A. D. Wilson, “Gestures without Libraries , Toolkits or Training : A $ 1 Recognizer for User Interface Prototypes,” pp. 159–168.
http://dl.acm.org/citation.cfm?id=1294238

The motivation behind this paper was that the existing Gesture recognizers were too complex for them to be implemented by UI developers or Software developers unfamiliar with the field of Pattern Recognition. So, the authors put forth a very simple and implementable algorithm that is capable of recognizing a single stroke gestures. They also argue that the lack of such an algorithm actually inhibited the widespread adoption of Gesture-based Recognition in designing the applications.

The algorithm is famously known as $1 recognizer. This approach is mainly divided into four steps:

  1. Re-Sampling the points: The points of the stroke are resampled so that all the points are equidistant from each other
  2. Rotate and Translate: In this step, the strokes are rotated along the indicative angle so that they get aligned with the template strokes with which they will be compared. Indicative angle is the angle made by the first point of the stroke and the centroid of the stroke,
  3. Scale: The image is then scaled to a reference square of the size to which the template strokes have been scaled
  4. Recognition: This step compares the stroke with the template strokes by finding out the distance between the two strokes. During this step, the matching is done for various angles as the rotation in the second step might not have aligned the stroke at the required angle
Thoughts:
The motivation behind this algorithm is that any UI developer or a person known to programming should be able to implement this quite easily. They performed a user study to verify this claim and they found that most of them were able to implement the algorithm in few hours. This algorithm also performed well on Gesture recognition for Single strokes. Moreover, this algorithm doesn't really have much training time as it just requires a simple template for any gesture comparison.

Future Ideas and Research Work:
The author tried to keep the algorithm as simple as possible, at the same time, ensuring that it works well. Since, in Step 2, the algorithm rotates the stroke, so this makes this algorithm rotation invariance, There are many applications where the rotation/direction of the gestures actually matters a lot. e.g. Swipes (left, right, up and down). So, this algorithm can be made more context aware. Also, the idea of indicative angle is good but not that effective. Certain improvements can be carried out in that field as well.