7. 手掌检测
在AI摄像头进行人手检测。可以用于手势控制,如VR,体感游戏,虚拟演奏,行为监控等场景。
7.1. 手掌图
7.2. Python示例
例程:手掌检测.py
#mPythonType:0
from mpython import *
import smartcamera_k230 as smartcamera
smart_camera = smartcamera.SmartCameraK230(tx=Pin.P1, rx=Pin.P0)
smart_camera.model_init(3)
while True:
smart_camera.hand_detect.recognize()
if smart_camera.hand_detect.flag:
print('已识别到')
print(str('手掌数量:') + str(smart_camera.hand_detect.hand_num))
7.3. mPython图形化示例