On Github riomus / zosia-gesture-recognition
OpenSource library
Uses userMedia to process webcam data
Provides friendly API
Assumptions
Pixel color (brightness) do not change during movement
I(x+u,y+v,t+1)=I(x,y,t)
Optical flow returns motion for each pixel, steps that are taken to discretize whole image motion:
Calculate average motion of whole image Calculate angle of motion vector Discretize angle using 'compass rose'
Hidden Markov models
Connections between states and observations can be represented as matrices
Rows and columns represents from and to of connection
Value is a probability of transition or emmision
Viterbi algorithm to calculate path and learn probabilities