Ask Your Question

Revision history [back]

Facerecognizer problem with opencv 2.4.5

I am working o the face recognition example at : http://docs.opencv.org/trunk/modules/contrib/doc/facerec/tutorial/facerec_video_recognition.html. I am using eclipse on ubuntu if that’s relevant. Earlier I was using 2.3.1 but it came with an error

‘FaceRecognizer’ was not declared in this scope

so after going through the reply here http://stackoverflow.com/a/11399099/824239 I updated to the version 2.4.5 of opencv on a different path, but previous version of opencv is still on the machine. Now after directing my include paths and libraries to the new location in the eclipse project, I am still getting the same error.

make all 
Building file: ../src/faceRec_vid.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/research/projects/SystemDesign/tools/munish_temp/opencv/include/opencv2 -I/usr/local/research/projects/SystemDesign/tools/munish_temp/opencv/include/opencv -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/faceRec_vid.d" -MT"src/faceRec_vid.d" -o"src/faceRec_vid.o" "../src/faceRec_vid.cpp"
../src/faceRec_vid.cpp: In function ‘int main(int, const char**)’:
../src/faceRec_vid.cpp:87:9: error: ‘FaceRecognizer’ was not declared in this scope
../src/faceRec_vid.cpp:87:23: error: template argument 1 is invalid
../src/faceRec_vid.cpp:87:31: error: invalid type in declaration before ‘=’ token
../src/faceRec_vid.cpp:87:60: error: ‘createFisherFaceRecognizer’ was not declared in this scope
../src/faceRec_vid.cpp:88:10: error: base operand of ‘->’ is not a pointer
../src/faceRec_vid.cpp:118:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/faceRec_vid.cpp:136:35: error: base operand of ‘->’ is not a pointer
make: *** [src/faceRec_vid.o] Error 1

Am I missing any thing that i need to do, to direct my eclipse project to the right version. How can I get rid of this error.