摘要: 准备工作 我们需要先安装matplotlib库,然后导入库,这些很简单,我就不讲了,哦,把numpy也导入进来。 import matplotlib.pyplot as plt import numpy as np 正式开始 plt.和ax. 我们经常会在画图的代码里看到,有用plt.的,有用ax. 阅读全文
posted @ 2021-05-28 11:13 xuwenwei 阅读(1411) 评论(0) 推荐(0) 编辑
摘要: 1. 摄像头采集到照片,把照片变成gray图像,减少内存读取。 2. 利用人脸检测器,在灰度图像上找到人脸,把图像放大1倍,可以注重图像细节。(这个人脸肯能是多张头像。但是我们通常只是处理一张头像) detector = dlib.get_frontal_face_detector() # 人脸检测 阅读全文
posted @ 2021-05-28 11:09 xuwenwei 阅读(497) 评论(0) 推荐(0) 编辑