python openCV初步人脸识别时,haarcascade_frontalface_default.xml找不到怎么办,
到本站查了好多贴,都说去github下载
https://github.com/opencv/opencv/tree/master/data/haarcascades
可是下载RAW时总是出错,想了好多办法,都没成功,最后找大仙要了一个,今天程序出了个错,我跟踪进去找到了
C:\Program Files\Python37\Lib\site-packages\cv2\data 文件夹(与python安装位置有关),进去一看这里面的文件名看起来非常眼熟,haarcascade_frontalface_default.xml 就在这里面,当然还有好多别的
原来安装opencv-python4的时候,这些人脸特征配置文件已经下载了。
希望本文能帮助到初学者。