E:\Python37\python.exe E:/Python37/untitled/FaceDemo.py
Traceback (most recent call last):
File “E:/Python37/untitled/FaceDemo.py”, line 24, in
faces = face.detectMultiScale(gray,1.1,3)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1658: error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale’
出现这种报错可能是因为你路径有错误。(眼见不一定为实,看一下我的另外一篇博客:https://blog.csdn.net/qq_42621977/article/details/89317774)
路径右击属性-安全-复制,出现下面报错:
在命令行(cmd)下获取的路径就没有错误: