Opencv识别面部
·
Opencv识别面部
本文识别面部依然采用的是cv zone中的面部识别的模型。
安装Opencv
pip install opencv-python
安装cvzone
pip install cvzone
代码
from cvzone.FaceMeshModule import FaceMeshDetector
import cv2
cap = cv2.VideoCapture(0)
detector = FaceMeshDetector(maxFaces=1)
while True:
success, img = cap.read()
img, faces = detector.findFaceMesh(img)
if faces:
print(faces[0])
cv2.imshow("Image", img)
cv2.waitKey(1)

更多推荐



所有评论(0)