python 人脸检测

匿名 (未验证) 提交于 2019-12-02 22:56:40
import face_recognition import cv2 image = face_recognition.load_image_file("face2.jpg") face_locations = face_recognition.face_locations(image) facenum = len(face_locations) for i in range(0, facenum):     top =  face_locations[i][0]     right =  face_locations[i][1]     bottom = face_locations[i][2]     left = face_locations[i][3]     start = (left, top)     end = (right, bottom)     color = (0, 0, 255)     thickness = 2     cv2.rectangle(img, start, end, color, thickness)  cv2.namedWindow(u"识别") cv2.imshow(u"识别", img)  cv2.waitKey(0) cv2.destroyAllWindows()
转载请标明出处:python 人脸检测
文章来源: python 人脸检测
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!