CHENGQI YANG / MGC3130

Dependencies:   BufferedArray

Dependents:   NucleoMGC3130 i2c_master

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GestureInfo.h Source File

GestureInfo.h

00001 #ifndef UK_AC_HERTS_SMARTLAB_MGC3130_GestuerInfo
00002 #define UK_AC_HERTS_SMARTLAB_MGC3130_GestuerInfo
00003 
00004 /** Recognized Gestures:
00005 * The recognized gestures are results of the HMM classification. Edge detection
00006 * can be used to further classify where the gesture has been done (Edge
00007 * Flicks). Furthermore, gesture attributes give information about the direction of
00008 * the flick.
00009 */
00010 class GestureInfo
00011 {
00012 private:
00013 
00014     /// 4 bytes gesture information.
00015     unsigned char * data;
00016 public:
00017 
00018     /** Set the internal memory, used by API itself.
00019     *
00020     * @param value 4 bytes char array
00021     */
00022     void set(unsigned char * value);
00023 
00024     /** Get the recognized gesture information.
00025     *
00026     * @returns
00027             0 No Gesture
00028             1 Garbage Model
00029             2 Flick West To East
00030             3 Flick East To West
00031             4 Flick South To North,
00032             5 Flick North To South
00033             6 Circle Clockwise, only active if AirWheel disabled
00034             7 Circle Counterclockwise, only active if AirWheel disabled
00035             8 WaveX
00036             9 WaveY
00037             64 Hold
00038             73 Presence
00039             65 Edge Flick West To East
00040             66 Edge Flick East To West
00041             67 Edge Flick South To North
00042             68 Edge Flick North To South
00043             69 Double Flick West To East
00044             70 Double Flick East To West
00045             71 Double Flick South To North
00046             72 Double Flick North To South
00047     */
00048     int getRecognizedGesture();
00049 
00050     /** Get the recognized gesture class.
00051     *
00052     * @returns
00053     *       0 Garbage Model
00054     *       1 Flick Gesture
00055     *       2 Circula Gesture
00056     */
00057     int getGestureClass();
00058 
00059     /** Check if the recognized gesture is classified as edge flick.
00060     *
00061     * @returns
00062     *       true qualified
00063     *       false not qualified
00064     */
00065     bool isEdgeFlick();
00066     
00067     /** Check if the user’s hand is within the sensing space.
00068     *
00069     * @returns
00070     *       true qualified
00071     *       false not qualified
00072     */
00073     bool isHandPresence();
00074     
00075     /** Check if the hand is not moving. Further dependencies can be adjusted inside Aurea Parametrization.
00076     *
00077     * @returns
00078     *       true qualified
00079     *       false not qualified
00080     */
00081     bool isHandHold();
00082 
00083     /** Check if the user’s hand is approximately above the sensor.
00084     *
00085     * @returns
00086     *       true qualified
00087     *       false not qualified
00088     */
00089     bool isHandInside();
00090     
00091     /** Check if the gesture recognition in progress. This bit is set when the Gesture Recognizer is active and Reset when the gesture is recognized and the Recognizer is Off.
00092     *
00093     * @returns
00094     *       true qualified
00095     *       false not qualified
00096     */
00097     bool isRecognitionInProcess();
00098 };
00099 
00100 #endif