Ubuntu安装opencv编译make出错

Helloworld233 2016-06-07 05:39:51
我用的是Ubuntu10.04版本的,装的是opencv2.4.13,可以cmake过去,但是make时出现以下问题:
[ 11%] Built target pch_Generate_opencv_imgproc
[ 16%] Built target opencv_imgproc
[ 16%] Built target opencv_highgui_pch_dephelp
[ 16%] Built target pch_Generate_opencv_highgui
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
In file included from /home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘AVFrame* icv_alloc_picture_FFMPEG(int, int, int, bool)’:
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1352:14: error: ‘AVFrame’ has no member named ‘format’
picture->format = pix_fmt;
^
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1353:14: error: ‘AVFrame’ has no member named ‘width’
picture->width = width;
^
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1354:14: error: ‘AVFrame’ has no member named ‘height’
picture->height = height;
^
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
root@ubuntu:/home/Opencv/opencv-build# cd
root@ubuntu:~# apt-get install opencv
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package opencv
root@ubuntu:~#


...全文
1452 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
nothingbutpassion 2016-06-10
  • 打赏
  • 举报
回复
检查一下是否安装了ffmpeg以及已安装的ffmeg版本是否匹配
apple_v1 2016-06-07
  • 打赏
  • 举报
回复
apt-get install ffmpeg

427

社区成员

发帖
与我相关
我的任务
社区描述
非技术问题的乐园
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧