Help with createFisherFaceRecognizer();
Hi guys!
i'm newb on OpenCV, and i'm trying to execute the facerec_video.cpp from the sample sources...
my only change in the code is that i include the extensions needed in the source.
but i am having a problem when i try this part
// Get the height from the first image. We'll need this
// later in code to reshape the images to their original
// size AND we need to reshape incoming faces to this size:
int im_width = images[0].cols;
int im_height = images[0].rows;
// Create a FaceRecognizer and train it on the given images:
Ptr<FaceRecognizer> model = createFisherFaceRecognizer();
model->train(images, labels);
// That's it for learning the Face Recognition model. You now
// need to create the classifier for the task of Face Detection.
// We are going to use the haar cascade you have specified in the
// command line arguments:
//
more exactly on modes->rain(images,labels);
All my images test are in 325,325 pixels( 105625 pixels), i am using 4 pictures to each person, and am using 3 persons ... someone can help-me to fix please?
thx
this is the message
all images must have same size and same format(grayscale, 8bit)
thx ... but didn't work :(
oh, sorry, did not read the error properly, it says: expected 105625 pixels, but was 0 pixels - so one of your train images was invalid / empty.
please check your csv, and the folder it refers to (are there any non images in it ?)
throw in a check for img.empty(), where you load them
i looked better and found a corrupted image. my fault kkkk. thanks for the help !!