partially integrate computer vision with state machine