error starting CascadeClassifier with xml file
I am trying to initialize my Cascade classifier with cascade = cv2.CascadeClassifier(xml_path)
But it raises the error
OpenCV Error: Unknown error code -49 (Input file is empty) in cvOpenFileStorage, file C:\projects\opencv-python\opencv\modules\core\src\persistence.cpp, line 4484
cv2.error: C:\projects\opencv-python\opencv\modules\core\src\persistence.cpp:4484: error: (-49) Input file is empty in function cvOpenFileStorage
I have just downloaded the xml file from https://github.com/opencv/opencv/tree...
What am I missing?
check the file size on disk again. the error msg might be true, and your download was broken
thank you for your reply, the file size is ok (~6MB)
no cascade of that size exists. and which one is it, exactly ?
(seems, it failed to find a valid xml or yml signature)
It is the haarcascade_frontalcatface.xml
again, the size is wrong, and it does not seem to be valid xml. something's wrong with your file.
thank you! good to know, it helps to know where is problem, I will look into it!
try to open it in a text editor, or do something like:
i'm sure, it's not , what you expected
@berak thank you so much, I was just being stupid, it really was not what I was expecting and I missed to check that. Thank you!