You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
471 B
19 lines
471 B
import cv2
|
|
import cvzone
|
|
from cvzone.FaceMeshModule import FaceMeshDetector
|
|
|
|
|
|
cap = cv2.VideoCapture('Video.mp4')
|
|
detector= FaceMeshDetector(maxFaces=1)
|
|
while True:
|
|
if cap.get(cv2.CAP_PROP_POS_FRAMES)== cap.get(cv2.CAP_PROP_FRAME_COUNT):
|
|
cap.set(cv2.CAP_PROP_POS_FRAMES,0)
|
|
|
|
sucess, img = cap.read()
|
|
img, faces = detector.findFaceMesh(img,draw=True)
|
|
img=cv2.resize(img,(640,360))
|
|
cv2.imshow("Image",img)
|
|
cv2.waitKey(25)
|
|
|
|
|