How to Troubleshoot Apps for the Modern Connected Worker
Pen-Based Gesture Recognition
1. Pen-Based Gesture Recognition
Beat Signer
Institute for Information Systems, ETH Zurich
8092 Zurich, Switzerland
http://vub.academia.edu/BeatSigner
USI Seminar, May 30, 2007
2. Outline
Motivation
Digital Pen and Paper Functionality
Gesture recognition algorithms
Evaluation of algorithms
iGesture framework
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 2
3. Pen-Based User Interfaces
Light Pen Graphics Tablet
PDAs and Tablet PCs Digital Pen and Paper
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 3
7. Gesture Design Guidelines
Different gestures should not look too similar
better recognition results
Gestures should be user friendly
intuitivity and usability
Gesture set size
Reuse of gestures
same semantics for different applications
application-specific gestures
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 7
8. Digital Pen and Paper
Developed by Anoto
Different pen manufacturers
Logitech, Maxel, Nokia, ...
Pattern space
60 million km2
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 8
9. Digital Ink Processing
Parse proprietary pen formats
position, timestamp, force, tilt, …
Stroke detection
pen up / down events
time difference between succeeding points
distance between succeeding points, …
Interpolation / Filtering
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 9
11. Ink Markup Language (InkML), W3C
XML language for representing digital ink
Pen movement data
<trace> and <traceFormat> elements
x,y coordinates, force, angles
Device-specific information
resolution, sample rate, …
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 11
14. SiGeR Algorithm
Simple Gesture Recogniser (Scott Swigart)
Gestures described by regular expressions
N, NE, E, SE, S, SW, W and NW
W
(E)+(N)+(W)+(S)+
S N
(NE|E|SE)+(NW|N|NE)+
(SW|W|NW)+(SE|S|SW)+
E
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 14
15. SiGeR Algorithm ...
Use additional statistical information
Description = Directions [";" Constraints];
Directions = Direction ["," Directions];
Direction = "N"|"NE"|"E"|"SE"|"S"|"SW"|"W"|"NW";
Constraints = Constraint ["AND" Constraints];
Constraint = Operand Operator Operand;
Operator = "EQ"|"NEQ"|"GT"|"GTE"|"LT"|"LTE";
Operand = "N"|"NE"|"E"|"SE"|"S"|"SW"|"W"|"NW"|
"DIAGONAL"|"STRAIGHT"|"PROXIMITY"|"STOPPOINTS";
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 15
16. SiGeR Algorithm ...
W
Examples
E,N,W,S;STRAIGHT GT 0.8 S N
AND PROXIMITY LT 0.2
E
W,SW,SE,NE,N,S;
PROXIMITY GT 0.7
AND STRAIGHT GT 0.3
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 16
17. Rubine Algorithm, 1991
Statistical classification algorithm for single
stroke gestures (training / classification)
A gesture G is represented as vector of P
sample points
G s0 ,... sP1, with si xi , yi , ti
Feature vector f extracted from G
f f1 ,... f F
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 17
18. Rubine Features
( x2 x0 )
f1 cos
( x2 x0 ) 2 ( y2 y0 ) 2
( y 2 y0 )
f 2 sin
( x2 x0 ) 2 ( y2 y0 ) 2
f 3 ( xmax xmin ) 2 ( ymax ymin ) 2
ymax ymin
f 4 arctan
xmax xmin
f5 xP 1 x0 2 yP 1 y0 2
( xP 1 x0 )
f 6 cos
f5
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 18
19. Rubine Features …
f 7 sin
yP 1 y0
f5
Let xi xi 1 xi yi yi 1 yi
P2
f 8 xi yi
2 2
i 0
xi yi 1 xi 1yi
Let i arctan
xi xi 1 xi yi 1
P2 P 2 P2
f9 i f10 i f11 i
2
i 1 i 1 i i
x y
P 2 2 2
Let ti ti 1 ti f12 max i 2 i
i 0 ti
f13 t P 1 t0
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 19
20. Rubine Training / Classification
Training phase
gesture samples
for class c
Optimal
Classifier
wc wc 0 ,..., wcF
ˆ ˆ ˆ
Recognition / classification phase
F
vcˆ wcˆ 0 wcˆi f i
i 1
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 20
29. Evaluation Multi-Stroke Gestures
E-Rubine Rubine SiGrid
Correct 75 72 73
Error 0 3 2
Reject 0 0 0
Precision 1.000 0.960 0.973
Recall 1.000 1.000 1.000
F-Measure 1.000 0.980 0.986
Number of gesture classes: 15
Training: 15 examples for each gesture class (collected by 1 person)
Test Samples: 75 (collected by the same person)
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 29
30. iGesture Framework
Exercise
download iGesture
analyse the design of the
framework
investigate the existing
algorithms
design and test your own
algorithm
build a small application
based on your recogniser
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 30
31. iGesture Architecture Overview
Management Evaluation
Console Tools
Recogniser
Common Data Structures
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 31
40. Recogniser API
Configuration configuration =
XMLTool.importConfiguration(new File(RUBINE));
GestureSet gestureSet =
XMLTool.importGestureSet(new File(RUBINE_SET));
configuration.addGestureSet(gestureSet);
recogniser = new Recogniser(configuration);
...
ResultSet result = recogniser.recognise(note);
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 40
41. Conclusions
Digital pen and paper technology
Gesture recognition algorithms
SiGeR, Rubine (E-Rubine), SiGrid
Evaluation
precision, recall and F-measure
General iGesture recognition framework
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 41
42. References
Beat Signer, Ueli Kurmann and Moira C. Norrie,
iGesture: A General Gesture Recognition
Framework, Proc. of ICDAR 2007, 9th Intl.
Conference on Document Analysis and
Recognition, Curitiba, Brazil, September 2007
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 42
43. References ...
Beat Signer, Moira C. Norrie and Ueli Kurmann,
iGesture: A Java Framework for the
Development and Deployment of Stroke-Based
Online Gesture Recognition Algorithms,
Technical Report ETH Zurich, TR561,
September 2007
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 43
44. References ...
Dean Rubine, Specifying Gestures by Example,
Proc. of ACM SIGGRAPH '91, 18th Intl.
Conference on Computer Graphics and
Interactive Techniques
iGesture Open Source Framework
http://www.igesture.org
USI Seminar, May 30, 2007 Beat Signer, signer@inf.ethz.ch 44