Ask Your Question
2

FaceRecognition train

asked 2012-09-17 10:29:41 -0600

Mister004 gravatar image

Hello!

I'm currently trying to become familiar with OpenCV 2.4.2 but even the easiest programs just don't want to work :(

My small code:

int main(int argc, const char *argv[]) {

vector<Mat> faces;
vector<int> labels;

//Lade Bilder in Gesichts-Vector
faces.push_back(imread("path/person0_0.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);
faces.push_back(imread("path/person0_1.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);
faces.push_back(imread("path/person0_2.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);
faces.push_back(imread("path/person0_3.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);

//Erstelle einen FaceRecognizer
Ptr<FaceRecognizer> faceRec = createFisherFaceRecognizer();
//"trainiere" die Gesichter in den FaceRecognizer
faceRec->train(faces, labels);

return 0;

}

Eveything works until this line: faceRec->train(faces, labels);

Error Message: Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly

I already looked into the API and found a example about face recognition. The example has exactly the same syntax as I have but it doesn't work. Has anybody an idea what's wrong with my code?

Greetings Mister004

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-09-17 13:00:17 -0600

updated 2012-09-19 14:28:08 -0600

Does the sample coming with OpenCV work for you? And is there any chance you paste the full program, with your includes? A quick Google Search shows, that a RtlWerpReportException almost always occurs with Qt. Are you including or using Qt?

If it isn't connected to Qt, then to reproduce I need to know:

  • Operating System, 32/64 bit?
  • Which compiler are you using?
  • Have you built OpenCV with Qt enabled?
edit flag offensive delete link more

Comments

Ok first thanks for the answer!

  1. No it does not
  2. I use Qt
  3. Operating system: Windows 7 64bit

Includes: include "opencv2/core/core.hpp" include "opencv2/contrib/contrib.hpp" include "opencv2/highgui/highgui.hpp"

using namespace cv; using namespace std;

The rest is the same as above

Mister004 gravatar imageMister004 ( 2012-09-17 14:50:42 -0600 )edit

Question Tools

Stats

Asked: 2012-09-17 10:29:41 -0600

Seen: 464 times

Last updated: Sep 19 '12