ubuntu 14.04 安装 OpenCV -2.4.13
1. 安装
(1) 更新软件源
sudo apt-get update sudo apt-get upgrade
(2)删除以前安装的 FFMPEG 和 x264 库:
sudo apt-get remove ffmpeg x264-dev
(3)安装必要的软件包
sudo apt-get install ocl-icd-libopencl1 build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils
(4)下载OpenCV-2.4.13 编译
mkdir opencv cd opencv
下载链接: https://pan.baidu.com/s/1kVDfI6b
下载到opencv 文件夹 并解压
unzip opencv-2.4.13.zip mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
(5) make 安装
make sudo make install sudo sh -c 'echo"/usr/local/lib">/etc/ld.so.conf.d/opencv.conf' sudo ldconfig
PS: 出错,但是没有问题
(6)重启系统使安装生效
sudo shutdown -r now
作者:白菜菜白
出处:http://www.cnblogs.com/lvchaoshun/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。