opencv-face-recognition-python icon indicating copy to clipboard operation
opencv-face-recognition-python copied to clipboard

Why this happened?: SystemError: <class 'cv2.CascadeClassifier'> returned a result with an error set

Open Thomas-stc opened this issue 3 years ago • 0 comments

Dear sir. When I practice face detection by using the code as follows and an error happened as mentioned in Title. gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) face_cascade = cv2.CascadeClassifier('opencv-files/lbpcascade_frontalface.xml') faces = face_cascade.detectMultiScale(gray, scaleFactor=1.0, minNeighbors=5) I am sure that the the file "lbpcascade_frontalface.xml" has in the folder "opencv-files" which I created. by the way, I got "lbpcascade_frontalface.xml" from my colleague because I don't know where to download this file on web. I am looking forward for your answer, thank you very much.

Thomas-stc avatar May 23 '21 02:05 Thomas-stc