Joe Faulkner
Joe Faulkner

Reputation: 19

Can't open .xml file in read mode Opencv

import cv2

data = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

returns:

Can't open file: 'haarcascade_frontalface_default.xml' in read mode

I'm new to all this and not quite sure what this error means.

Tried to open haarcascade_frontalface_default.xml

using cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

I've looked everywhere. Any suggestions?

Upvotes: 1

Views: 1970

Answers (1)

balu
balu

Reputation: 1143

Give the full path of the xml and it will work.

Upvotes: 0

Related Questions