Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

most likely, your cascades were not loaded.

try an absolute path, like:

face_cascade = cv2.CascadeClassifier('/complete/path/to/haarcascade_frontalface_default.xml')

also please check the result of it:

face_cascade.empty()