本文实例为大家分享了python动态人脸检测的具体代码,供大家参考,具体内容如下
直接上代码: 按Q退出
import cv2
import numpy as np
cv2.namedWindow(test)
cap = cv2.VideoCapture(0) #加载摄像头录制
# cap = cv2.VideoCapture(test.mp4) #打开视频文件
success, frame = cap.read()
# classifier = cv2.CascadeClassifier(/Users/yuki/anaconda/share/OpenCV/haarcascade
1