Top Banner
State machines, or, Finite State Automata and the uses thereof
16

State machines for gesture recognition

May 24, 2015

Download

Technology

Dan Bourke

a rough outline of state machines, and ways in which one might use them for gesture recognition, specifically in Processing.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: State machines for gesture recognition

State machines, or, Finite State Automata and the uses thereof

Page 2: State machines for gesture recognition

What is a state machine?

Page 3: State machines for gesture recognition

Example state machine:

Traffic lights!

Page 4: State machines for gesture recognition

I apologise in advance for my 'art'.

This is why I am not a graphic designer.

Page 5: State machines for gesture recognition

State Top

Page 6: State machines for gesture recognition

State Base

Page 7: State machines for gesture recognition

State Pedestrian

Page 8: State machines for gesture recognition

State Machine Diagram

Page 9: State machines for gesture recognition

State Pedestrian

Entry Action: turn pedestrian lights green.Delay 20 seconds.

Flash pedestrian lights red.Delay 40 seconds.

Exit Action: turn pedestrian lights red.Load State Base

Page 10: State machines for gesture recognition

State Base

Entry Action:Turn appropriate lights green.

Delay 40 seconds.Turn off green lights, turn on amber lights.

Delay 15 deconds.

Exit action:Turn off amber lights, turn on red lights.

Load State Top

Page 11: State machines for gesture recognition

State Top

Entry Action: as State Base

Input Action:If input, perform exit action and load State Pedestrian.

Otherwise, perform exit action and load State Base

Exit Action: turn all lights red, load next state.

Page 12: State machines for gesture recognition

A better way?

Page 13: State machines for gesture recognition

A more efficient way!

Page 14: State machines for gesture recognition
Page 15: State machines for gesture recognition
Page 16: State machines for gesture recognition