well when i load third party cascade classifiers for eyes and nose detection the program throws an error saying ‘cv2.CascadeClassifier’> returned a result with an error set
But when i try with face cascade it works perfectly fine
well when i load third party cascade classifiers for eyes and nose detection the program throws an error saying ‘cv2.CascadeClassifier’> returned a result with an error set
But when i try with face cascade it works perfectly fine
Hi @amankharb,
Request you to ensure that the xml files are not corrupted and you are passing the correct path to them.
If that is not the issue, then try this line of code:
cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_eye.xml')
Let me know if this works!
eyes=eye_cascade.detectMultiScale(img,1.5,5) cv2.error: OpenCV(4.2.0) /Users/travis/build/skvark/opencv-python/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'
this error is popping now and i didnt face any problem with face_cascade when i was doing face recognition project and after that these nose and eye cascades that i download from CB only and these are not working correctly
This error too originates when the xml file is not read properly. Request you to attach your complete code through drive or cb.lk/ide. Also try giving the absolute path of the xml file you are trying to load.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.