ST / Mbed 2 deprecated 53L0A1_HandGestureRecognition

Dependencies:   X_NUCLEO_53L0A1 mbed

Fork of 53L0A1_HandGestureRecognition by Licio Mapelli

Embed: (wiki syntax)

« Back to documentation index

Motion

Motion detector based on simple threshold. More...

Data Structures

struct  MotionData_t
 Data structure for motion detection. More...

Enumerations

enum  Gestures_Motion_Code_t {
  GESTURES_MOTION_NULL = 0, GESTURES_MOTION_DOWN_STATE = 1, GESTURES_MOTION_UP_STATE = 2, GESTURES_MOTION_RAISE_UP = 3,
  GESTURES_MOTION_DROP_DOWN = 4
}
 

Codes associated to Motion detection.

More...

Functions

int tof_initMotion (int threshold, MotionData_t *data)
 Initialize Motion data.
int tof_getMotion (int32_t range_mm, MotionData_t *data)
 Return current motion state.

Detailed Description

Motion detector based on simple threshold.

Description
This module returns one of the states defined in Gestures_Motion_Code_t based on a programmable range threshold. When a transition state is returned (GESTURES_MOTION_RAISE_UP or GESTURES_MOTION_DROP_DOWN), it also returns the duration (in ms) of the previous state. For instance, assuming GESTURES_MOTION_RAISE_UP is returned, duration is the time the state GESTURES_MOTION_DOWN_STATE has been maintained before the down=>up transition.

Enumeration Type Documentation

Codes associated to Motion detection.

Enumerator:
GESTURES_MOTION_NULL 

No motion detected

GESTURES_MOTION_DOWN_STATE 

Hand is down (below threshold)

GESTURES_MOTION_UP_STATE 

Hand is up (above threshold)

GESTURES_MOTION_RAISE_UP 

Hand is raising up (transition from DOWN_STATE to UP_STATE is detected)

GESTURES_MOTION_DROP_DOWN 

Hand is dropping down (transition from UP_STATE to DOWN_STATE is detected)

Definition at line 59 of file tof_motion.h.


Function Documentation

int tof_getMotion ( int32_t  range_mm,
MotionData_t data 
)

Return current motion state.

Returns:
One of the states defined in Gestures_Motion_Code_t

Definition at line 48 of file tof_motion.c.

int tof_initMotion ( int  threshold,
MotionData_t data 
)

Initialize Motion data.

Returns:
0 on success

Definition at line 38 of file tof_motion.c.