OpenCV haarcascade_frontalface_alt.xml can't be found

c++, opencv, xml

Solution

For me the "haarcascade_frontalface_alt.xml" is in the following directory: C:\opencv2.4.9\sources\data\haarcascades

I am loading it with the following command:

`CascadeClassifier cascade1; cascade1.load("C:/opencv2.4.9/sources/data/haarcascades/haarcascade_frontalface_alt.xml");`

It seems to be working for me here when I give the exact path to the location of the file in win7 x64.

Another thing you can check is if your libraries are linked correctly(i.e: For debug/release mode, whichever one are you using)

Problem

It seems like there are a lot of people that have had this problem. I can't seem to get my program to find haarcascade_frontalface_alt.xml, haarcascade_frontalface_alt.xml IS in the current working directory, and every other project directory at this point. I have tried with both just "haarcascade_frontalface_alt.xml" AND "C:\haarcascade_frontalface_alt.xml" no luck. I made sure that it is "unblocked" in the properties, still nothing. Does anyone know how to get opencv to see haarcascade_frontalface_alt.xml in windows 7 x64? Thank you very much.

Original source