FaceRecognition train
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