8. 动态手势识别

在AI摄像头进行动态手势识别。可以识别向上、向下、向左、向右滑动手势,适用于智能家居控制、游戏交互等场景。

8.1. Python示例

动态手势识别.py
# 动态手势识别
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('手势id:') + str(smart_camera.dynamic_gesture.gesture_id))
        print(str('手势字符串:') + str(smart_camera.dynamic_gesture.gesture_str))




8.2. mPython图形化示例

../../../../_images/%E5%8A%A8%E6%80%81%E6%89%8B%E5%8A%BF.png