Ask Your Question

Revision history [back]

Classifier load error.

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.

Classifier load error.

Development: I tried to copy others codes and run the project in vs. And then I replaced the codes with mine.And now my codes worked! Even I create a new project and paste my codes, it works.

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.

Classifier load error.

Development: I tried to copy others codes and run the project in vs. And then I replaced the codes with mine.And now my codes worked! mine.They worded normally! Even I create created a new project and paste pasted my codes, it works.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.