1. 首页
  2. 编程语言
  3. Perl
  4. Python用dilb提取照片上人脸的示例

Python用dilb提取照片上人脸的示例

上传者: 2020-12-17 13:37:35上传 PDF文件 49.82KB 热度 15次
上代码: #coding=utf-8 import cv2 import dlib path = "imagePath/9.jpg" img = cv2.imread(path) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #人脸分类器 detector = dlib.get_frontal_face_detector() # 获取人脸检测器 predictor = dlib.shape_predictor( "shape_predictor_68_face_landmarks.dat" ) color = (0, 255, 0) # 定义绘
下载地址
用户评论