This commit is contained in:
Alexandre VEROT 2023-02-10 10:13:26 +01:00
parent eb92b45567
commit 5acbdea1f3
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
# Load video using OpenCV # Load video using OpenCV
video = cv2.VideoCapture("PPG_Programming.mp4") video = cv2.VideoCapture("Sophia.mp4")
# Get video information # Get video information
fps = video.get(cv2.CAP_PROP_FPS) fps = video.get(cv2.CAP_PROP_FPS)
@ -40,7 +40,7 @@ for i in range(num_frames):
if len(face) > 0: if len(face) > 0:
x, y, w, h = face[0] x, y, w, h = face[0]
face = frame[y:y+h, x:x+w] face = frame[y:y+h, x:x+w]
frame = cv2.rectangle(frame, (int(x*1.15), int(y*1.15)), frame = cv2.rectangle(frame, (int(x*1.15), int(y*1)),
(x + int(w*0.7), y + int(h*0.2)), (0, 255, 0), 3) (x + int(w*0.7), y + int(h*0.2)), (0, 255, 0), 3)
# Afficher l'image # Afficher l'image
# cv2.imshow("Faces", frame) # cv2.imshow("Faces", frame)

BIN
Sophia.mp4 Normal file

Binary file not shown.