OpenCV Error: Assertion failed (!empty()) in detectMultiScale
Hi, i am trying to work with the example from the face-detection tutorial: tutorial link
While i do so and try to execute the examplecode in python, the following error occurs:
OpenCV Error: Assertion failed (!empty()) in detectMultiScale, file /home/julian/Downloads/opencv-3.0.0-beta/modules/objdetect/src/cascadedetect.cpp, line 1580 Traceback (most recent call last): File "/home/julian/PycharmProjects/PicProcessingTutorial/Face_Detection.py", line 15, in <module> faces = face_cascade.detectMultiScale(gray, 1.3, 5) cv2.error: /home/julian/Downloads/opencv-3.0.0-beta/modules/objdetect/src/cascadedetect.cpp:1580: error: (-215) !empty() in function detectMultiScale
What could be the reason for the error, how should i react to fix it? Thank you for your time and advice,
regards
jla
Have you loaded the classifier successfully?
your cascade-file was not loaded (probably not found).
I'm having the same error. face_cascade.load returns false. what am i supposed to do?
@bns, try an absolute path to the resp. xml file
I think either the name of file is wrong or file is not present in working directory