vsign / composite_gestures.py
mkfallah's picture
Update composite_gestures.py
2b70dc1 verified
raw
history blame contribute delete
592 Bytes
# composite_gestures.py
# routines for detecting composite gestures from sequences of micro-gestures
from micro_gestures import fist_closed, palm_open, index_pointing_up, thumb_up
def detect_composite_gesture(sequence):
# detects a composite gesture from a list of micro-gesture labels
if sequence == ["palm_open"]:
return "hello" # open hand wave
if sequence == ["palm_open", "index_pointing_up", "palm_open"]:
return "goodbye"
if sequence == ["thumb_up"]:
return "yes"
if sequence == ["index_pointing_up"]:
return "no"
return None