8. Dynamic Gesture Recognition

Perform dynamic gesture recognition on the AI Camera. It can recognize swipe-up, swipe-down, swipe-left, and swipe-right gestures, suitable for smart home control, game interaction, and similar scenarios.

8.1. Python Example

Dynamic Gesture Recognition.py
# Dynamic gesture recognition
from mpython import *
import smartcamera_k230 as smartcamera

smart_camera = smartcamera.SmartCameraK230(tx=Pin.P1, rx=Pin.P0)
smart_camera.model_init(25)

while True:
    smart_camera.dynamic_gesture.recognize()
    if(smart_camera.dynamic_gesture.gesture_id):
        print(str('Gesture id: ') + str(smart_camera.dynamic_gesture.gesture_id))
        print(str('Gesture string: ') + str(smart_camera.dynamic_gesture.gesture_str))




8.2. mPython Graphical Example

../../../../_images/dynamic_gesture.png