Qt Documentation

QtSensorGestures Plugins

The QtSensorGestures recognizer plugins are the way to create your own sensor gestures.

Creating software to recognize motion gestures using sensors is a huge subject not covered here.

The QSensorGesture API does not limit usage to any of the common classification methods of gesture recognition, such as Hidden Markov Models, Neural Networks, Dynamic Time Warping, or even the ad-hoc heuristic recognizers of Qt's built-in sensor gesture recognizers. It's basically a signaling system for lower level gesture recogition methods and algorithms to communicate to the higher level applications.

Recognizer Plugins

The Sensor Gesture Recognizers that come with Qt are made using an ad-hoc heuristic approach. The user cannot define their own gestures, and must learn how to perform and accommodate the pre-defined gestures herein.

A developer may use any method, including computationally- and training-intensive well- known classifiers, to produce gesture recognizers. There are currently no classes in Qt for gesture training, nor is it possible for the user to define his own sensor-based motion gestures.

A procedure for writing ad-hoc recognizers might include:

Obtain and gather output from the accelerometer through QAccelerometerReading of a gesture being performed.

Use various methods and constraints on the accelerometer data to recognize the various states:

Initial "listening" state for a gesture

Start of a possible gesture, moving into a "detecting" state

End of a possible gesture, moving into a "recognizing" state

and finally, if it is recognized, the "recognized" state, or if not recognized, move back to the "listening" state.

Test procedure to make sure it is easy to perform, and will not produce too many false positive recognitions, or collisions if used with other gestures. Meaning that gestures performed get recognized as another gesture instead.

Phone is held in a top up position with a side facing forward for a moment. Swing it quickly with a downward motion like it is being used to point at something with the top corner. Uses the Accelerometer and Orientation sensors.