Ovidiu Moise
Ovidiu Moise

Reputation: 1

Raspberry Pi 4 Model B ==> AttributeError: module 'cv2' has no attribute 'CascadeClassifier'

I would like to try face detection but I face the following issue:

face_cascade = cv2.CascadeClassifier(haar_file) 
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'cv2' has no attribute 'CascadeClassifier'

I have the following system installed:

In fact I reduced the code to only two lines to limit the possible issues:

import cv2
face_cascade = cv2.CascadeClassifier(haarcascade_frontalface_default.xml)

Upvotes: 0

Views: 95

Answers (0)

Related Questions