Ubuntu14.04下如何安装以及配置OpenCV3.0.0

百度云链接:https://pan.baidu.com/s/16CxKIutXYpoFXsFguOqyDA 提取码:21r7   (包含了opencv源码和ippicv_linux文件)

ubuntu14.04上安装opencv方法:

(1)准备工作,安装一些编译工具、辅助工具、以及关联库等;即依次输入以下命令:

"sudo apt-get install build-essential"

"sudo apt-get install cmake git pkg-config libgtk2.0-dev libavcodec-devlibavformat-dev libswscale-dev"

"sudo apt-get install python-dev python-opencv python-numpy libtbb2libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-devlibdc1394-22-dev"

(2)下载相应的opencv安装包,下载地址:http://opencv.org/downloads.html,如我下载的是opencv_3.0.0.zip;

(3)使用cd命令进入opencv_3.0.0.zip安装包所存放的目录,解压包文件,即“unzip opencv_3.0.0.zip”;

(4)按顺序依次执行以下命令“cd opencv-3.0.0”,"mkdirbuild","cd build";

(5)使用cmake编译文件,命令如下:cmake -DCMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON..

(6)make或者make -j $(nproc);

(7)sudo make install;

(8)设置环境变量:

    a、添加库路径:sudo/bin/bash -c 'echo "/usr/local/lib" >/etc/ld.so.conf.d/opencv.conf'

    b、更新系统库:sudoldconfig

文章借鉴:https://jingyan.baidu.com/article/14bd256e466474bb6d2612db.html

你可能感兴趣的:(Ubuntu14.04下如何安装以及配置OpenCV3.0.0)