Classifier load error. [closed]

asked 2016-07-22 10:49:03 -0600

kilasuelika gravatar image

updated 2016-07-23 11:14:45 -0600

Development: I tried to copy others codes and run the project in vs. And then I replaced the codes with mine.They worded normally! Even I created a new project and pasted my codes, they worked.

It's funny:)

My program always stops at: CascadeClassifier face_cascade; face_cascade.load("‪E:\opencv\sources\data\haarcascades\haarcascade_frontalface_alt2.xml"); if (!face_cascade.load("‪E:\opencv\sources\data\haarcascades\haarcascade_frontalface_alt2.xml")){ cout << "Classfier not loaded"; waitKey(); return -1; }

So the problem is that I can't load the classifier. I have been searching on the Internet for much time and correct many problems others faced. But I can never load it. I set the model to "Debug". My linker is using ".....d.dll". I have been checking the file path for 100 times and trying different spellings.

It's so annoying. Can anyone tell me what to do? Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by kilasuelika
close date 2016-07-23 11:10:57.025326

Comments

1

yawn ..

please never use single slashes in filenames. either have 2 of them, or use single forward slashes.

berak gravatar imageberak ( 2016-07-22 19:06:39 -0600 )edit

Thank you for your reply. My codes suddenly work again though I don't understand why it didn't work. I changed nothing. I tried to use "/" in the path name but it made no sense.previously. I have to say that it's confusing.

kilasuelika gravatar imagekilasuelika ( 2016-07-23 11:05:39 -0600 )edit