我正在处理人脸识别示例:http ://docs.opencv.org/trunk/modules/contrib/doc/facerec/tutorial/facerec_video_recognition.html 。如果那是相关的,我在 ubuntu 上使用 eclipse。早些时候我使用的是 2.3.1,但它出现了一个错误 ‘FaceRecognizer’ was not declared in this scope
,所以在通过这里https://stackoverflow.com/a/11399099/824239的回复后,我在不同的路径上更新到了 opencv 的 2.4.5 版本,但之前opencv 的版本还在机器上。现在将我的包含路径和库定向到 Eclipse 项目中的新位置后,我仍然遇到相同的错误。
make all
Building file: ../src/faceRec_vid.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/research/opencv/include/opencv2 -I/usr/local/research/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
我是否遗漏了将我的 Eclipse 项目定向到正确版本所需做的任何事情。我怎样才能摆脱这个错误。