Hello I am trying to create a facial recognition program but I have a peculiar error:
here is my code:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
face_cascade = cv2.CascadeClassifier("lbpcascade_frontalface.xml")
faces = face_cascade.detectMultiScale(gray, scaleFactor=1.2, minNeighbors=5);
and this error is the output
SystemError: <class 'cv2.CascadeClassifier'> returned a result with an error set
I have "lbpcascade_frontalface.xml" in the working directory so that shouldn't be an issue
if it helps when I enter
cv2.__version__
I get
'4.0.0'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…