Dynamic gesture recognition

Dynamic gesture recognitionRoutine Experiment EffectCode ExplanationGesture recognition key codeflow chart

 

Routine Experiment Effect

In this section, we will learn how to use K230 to realize the human body detection function.

The example code is in [Source code/08.Body/09.dynamic_gesture.py]

After connecting to the IDE, run the code and wait for the routine to run and load the model. (It takes about 8 to 10 seconds)

image-20250214211026973

After waiting for the routine to run and load the model, we put our hand in front of the camera and wait for the gesture icon to appear in the upper left corner. The appearance of this icon means that K230 is ready to recognize gestures, and we can perform the corresponding gesture waving behavior. The specific operation can be seen in the following animation:

1

Serial port output function has been added

After detecting the gesture, the following serial output format will be sent

$dir#

The '$' represents the beginning of the data, and the '#' represents the end of the data.

dir is the direction, 0 is up, 1 is left, 2 is down, 3 is right, 4 is unchanged

*Note: The current code will send multiple serial port data when a gesture is recognized. You can filter it on the receiving end.

Code Explanation

There is too much complete code in this section, so only the key parts of the code are explained here

Gesture recognition key code

flow chart

image-20250214211753224