基于opencv的电脑摄像头简易人脸识别
import cv2 as cv import keyboard face_engine = cv.CascadeClassifier(E:\\python\\haarcascade_frontalface_default.xml) eye_engine = cv.CascadeClassifier(E:\\python\\haarcascade_eye.xml) smile_engine = cv.CascadeClassifier(E:\\python\\haarcascade_smile.xml) cam = cv.VideoCapture(0) #开启电脑自带的摄像头