I am trying to get facial recogniton working in OPencv using http://docs.opencv.org/trunk/modules/contrib/doc/facerec/facerec_tutorial.html. However i Keep getting this error:
OpenCV Error: Unsupported format or combination of formats
(In the Eigenfaces method all input samples (training images) must
be of equal size! Expected 307200 pixels, but was 4915200 pixels.)
in train, file /home/itsy/Desktop/OpenCV-2.4.2/modules/contrib/src/facerec.cpp, line 326
So I decided to resize all my images inside my vector using
for(int i=0; i < images().size; i++)
resize(images[i],images[0],images[0].size(),0,0, INTER_NEAREST );
where images is a vector of Mat type and contains all the loaded images.But when I try to compile it it tells me:
facerecognition.cpp:141:27: error: no match for call to ‘(std::vector<cv::Mat>) ()’
which is the line on which for(..) is located. Could someone please help me out?
Since
imagesis not a function,images().sizedoesn’t make any sense. You wantimages.size(), sinceimages.sizeis a function.