基于 OpenCV 和 Mediapipe ,对象检测和识别,如手势检测 https://github.com/cvzone/cvzone
天问 0c74ac7db0 Update 'README.md' | 9 months ago | |
---|---|---|
README.md | 9 months ago |
基于 OpenCV 和 Mediapipe ,对象检测和识别,如手势检测
import cvzone
import cv2
cap = cv2.VideoCapture(0)
cap.set(3, 1280)
cap.set(4, 720)
detector = cvzone.HandDetector(detectionCon=0.5, maxHands=1)
while True:
success, img = cap.read()
img = detector.findHands(img)
lmList, bbox = detector.findPosition(img)
cv2.imshow("Image", img)
cv2.waitKey(1)