Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Gesture recognition
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import cv2
import numpy as np
from cvzone.HandTrackingModule import HandDetector

# 初始化手部检测模块
handDetector = HandDetector(maxHands=2, detectionCon=0.5, trackCon=0.5)

# 假设我们有一个输入图像,名为img
img = cv2.imread('path_to_your_image.jpg')

# 使用手部检测模块检测手势
handLms, handNo = handDetector.findPosition(img)

# 打印出手势的关键点位置和包围框信息
print(handLms)
print(handNo)