ubuntu14.04 安装opencv3.0.0

前端之家收集整理的这篇文章主要介绍了ubuntu14.04 安装opencv3.0.0前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

参考 http://www.knowsky.com/1055561.html

http://blog.csdn.net/tmosk/article/details/72780531

http://blog.csdn.net/wang4959520/article/details/51392804



1. 解压opencv-3.0.0

2. 下载ippicv_linux_20141027.tgz 代替原文件:/home/youname/opencv-3.0.0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/

3. 修改 opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp文件

#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)

改为

#include "precomp.hpp"

#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)、

4. 安装必要文件

sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev default-jdk ant libvtk5-qt4-dev

5. cd opencv-3.0.0

mkdir build

cd build

sudo cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_ARCH_BIN="6.1" ..

(CUDA_ARCH_BIN代表你当前显卡的计算能力。具体能力值可在nvidia官网下载cuda的地方查阅。)

sudo make

sudo make install

sudo gedit /etc/ld.so.conf.d/opencv.conf

在opencv.conf里面加入命令 /usr/local/lib 更新库目录 sudo ldconfig 打开文件bash.bashrc sudo gedit /etc/bash.bashrc 加入下面两行 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH

猜你在找的Ubuntu相关文章