我们正在尝试在Github上安装并运行OpenPose Library的演示: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#manual-compilation
完成安装Caffe和所有先决条件,但在执行安装命令时,我们得到以下错误:
CXX examples/tutorial_wrapper/2_user_synchronous.cpp
AR -o .build_release/lib/libopenpose.a
LD -o .build_release/lib/libopenpose.so.1.0.0-rc3
CXX/LD -o .build_release/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.bin
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::set(int, double)'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::release()'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::operator>>(cv::Mat&)'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoWriter::VideoWriter(cv::String const&, int, double, cv::Size_<int>, bool)'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::isOpened() const'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::get(int) const'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::VideoCapture(int)'
.build_release/lib/libopenpose.so: undefined reference to `cv::VideoCapture::~VideoCapture()'
.build_release/lib/libopenpose.so: undefined reference to `vtable for cv::VideoWriter'
collect2: error: ld returned 1 exit status
Makefile:492: recipe for target '.build_release/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.bin' failed
make: *** [.build_release/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.bin] Error 1
make: *** Waiting for unfinished jobs....
------------------------- -------------------------
Errors detected. Exiting script. The software might have not been successfully installed.
------------------------- -------------------------
请帮助我了解这个。
由于
答案 0 :(得分:0)
这可能是因为libopencv_video和/或libopencv_videoio尚未添加到项目中。如果从源代码构建opencv,请检查是否已构建这些库。
答案 1 :(得分:0)
看起来你没有检查OpenPose和Caffe makefiles.config文件中的OpenCV3标志。
例如,如果您使用的是手动编译,假设您有Ubuntu 16和CUDA 8.所以您需要修改这两个文件:
在两者中取消注释# OPENCV_VERSION := 3
。
之后再次运行他们指定的命令:cp Makefile.config.Ubuntu16.example Makefile.config
在OpenPose和Caffe中都make clean
并重新构建它。