我正在尝试使用http://docs.opencv.org/trunk/modules/contrib/doc/facerec/facerec_tutorial.html在 OPencv 中进行面部识别。但是我不断收到此错误:
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
所以我决定使用
for(int i=0; i < images().size; i++)
resize(images[i],images[0],images[0].size(),0,0, INTER_NEAREST );
其中 images 是 Mat 类型的向量,包含所有加载的图像。但是当我尝试编译它时,它告诉我:
facerecognition.cpp:141:27: error: no match for call to ‘(std::vector<cv::Mat>) ()’
这是 for(..) 所在的行。有人可以帮我吗?