1

python 人脸识别

 2 years ago
source link: https://blog.csdn.net/qq_52200688/article/details/122712361
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

python 人脸识别

wh来啦 于 2022-01-27 10:21:47 发布 782
专栏收录该内容
28 篇文章 0 订阅

代码结果:

寻找导入的xml文件

找到cv2安装的路径,在该路径下找到/data文件。

里面默认下载了一部分xml文件,不是全部的xml文件。如果需要的xml文件不在里面,需要自行在网上下载,然后放到该目录下,以备调用。比如自行安装('haarcascade_mcs_nose.xml','haarcascade_mcs_mouth.xml')

import cv2

 导入xml文件,可以根据任务需要,自行选择需要导入的xml文件

 设置窗口:

 打开摄像头,人脸识别:

 完整代码:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK