我计划开始更多地使用面部识别,所以我尝试安装dlib。我按照说明操作:
cd examples
mkdir build
cd build
cmake ..
cmake --build . --config Release
唯一失败的是最后一个。它运行良好,直到完成99%,然后:
Scanning dependencies of target train_shape_predictor_ex
[ 96%] Building CXX object CMakeFiles/train_shape_predictor_ex.dir/train_shape_predictor_ex.cpp.o
[ 96%] Linking CXX executable train_shape_predictor_ex
[ 96%] Built target train_shape_predictor_ex
Scanning dependencies of target using_custom_kernels_ex
[ 96%] Building CXX object CMakeFiles/using_custom_kernels_ex.dir/using_custom_kernels_ex.cpp.o
[ 97%] Linking CXX executable using_custom_kernels_ex
[ 97%] Built target using_custom_kernels_ex
Scanning dependencies of target video_tracking_ex
[ 97%] Building CXX object CMakeFiles/video_tracking_ex.dir/video_tracking_ex.cpp.o
[ 98%] Linking CXX executable video_tracking_ex
[ 98%] Built target video_tracking_ex
Scanning dependencies of target webcam_face_pose_ex
[ 98%] Building CXX object CMakeFiles/webcam_face_pose_ex.dir/webcam_face_pose_ex.cpp.o
[ 99%] Linking CXX executable webcam_face_pose_ex
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFOpen@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFSetWarningHandler@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFReadRGBATile@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/local/lib/libopencv_highgui.so.2.4.11: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
make[2]: *** [webcam_face_pose_ex] Error 1
make[1]: *** [CMakeFiles/webcam_face_pose_ex.dir/all] Error 2
make: *** [all] Error 2
在我看来,我只是缺少一些文件。我该如何解决这个问题?
答案 0 :(得分:2)
这是一些Ubuntu版本上使用LibTIFF 4的OpenCV的众所周知的问题。看看这里:
http://answers.opencv.org/question/35642/libtiff_40-link-errors/