Gestures - adamjberg/RIME GitHub Wiki

#Background

This section provides some background information on gestures as they relate to the RIME application. By the end of this section, the user should understand the concept of a gesture, how they are implemented in RIME, and how to create them.


##What is a gesture in RIME?

A RIME gesture is a characteristic pattern of incoming Linear Accelerometer data, coming from an iOS or Android device. The Linear Accelerometer measures the acceleration of the device from an external force in 3 dimensions and removes the acceleration coming from gravity.

Therefore, a gesture in RIME is a finite series of 3 dimensional acceleration vectors with a start and an end. Currently, the start and end of the gesture are specified by a button.

##Training a gesture

RIME requires the user to specify a gesture several times. To start training from the home screen:

  1. Press the Gestures button
  2. Press the Add Gesture button
  3. Type a name for the gesture at the top
  4. Press the Record button to start a single training of your gesture
  5. Release the Record button at the end of your gesture
  6. Repeat steps 4 and 5 around 10 times.
  7. Press the Save Gesture button once you have finished training the gesture.

The more training you perform for a gesture, the more reliable the gesture detection will be.

##Recognition

To start recognizing a gesture from the home screen:

  1. Press the Gestures button
  2. Press and hold the Recognize button to start the gesture
  3. Release the Recognize button once you have completed the gesture

###Tips for Successful Gestures

Start and stop the gesture with the device not moving. The data is filtered, such that when the device isn't moving it won't add new data to the gesture. This helps the user define a start and end to their gesture, that is uniform across training sessions.

The linear accelerometer measures acceleration, therefore slow movements will go practically unnoticed. Easy to detect gestures will have sharp accelerations and distinct changes in direction.

Make sure you are performing your gesture the same way you trained it. If you train a gesture vertically, don't expect it to work as well horizontally.