你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 14.04安装OpenCV2.4.9

[日期:2016-07-04] 来源:Linux社区  作者:qust_waiwai [字体: ]

Ubuntu 14.04安装OpenCV2.4.9

安装工具

sudo apt-get install git
sudo apt-get install g++
sudo apt-get install vim

下载Opencv

opencv2.9

解压

mkdir tmp
mv opencv-2.4.9.zip tmp
cd tmp
unzip opencv-2.4.9.zip
cd opencv-2.4.9
mkdir release

安装依赖库

sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev  

在opencv的官方文档也有说明:

  1. GCC 4.4.x or later. This can be installed with:sudo apt-get install build-essential
  2. CMake 2.6 or higher;
  3. Git;
  4. GTK+2.x or higher, including headers (libgtk2.0-dev);
  5. pkg-config;
  6. Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy);
  7. ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev;
  8. [optional] libdc1394 2.x;
  9. [optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev.
    ff-dev, libjasper-dev.

进入目录生成MakeFile文件

cd releaase

安装所有的lib文件都会被安装到/usr/local目录下

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

cmake

构建和安装

make

make

make install

make install

加载动态连接库

sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

sudo ldconfig

OpenCV官方教程中文版(For Python) PDF  http://www.linuxidc.com/Linux/2015-08/121400.htm

Ubuntu Linux下安装OpenCV2.4.1所需包 http://www.linuxidc.com/Linux/2012-08/68184.htm

Ubuntu 12.04 安装 OpenCV2.4.2 http://www.linuxidc.com/Linux/2012-09/70158.htm

CentOS下OpenCV无法读取视频文件 http://www.linuxidc.com/Linux/2011-07/39295.htm

Ubuntu 12.04下安装OpenCV 2.4.5总结 http://www.linuxidc.com/Linux/2013-06/86704.htm

Ubuntu 10.04中安装OpenCv2.1九步曲 http://www.linuxidc.com/Linux/2010-09/28678.htm

基于QT和OpenCV的人脸识别系统 http://www.linuxidc.com/Linux/2011-11/47806.htm

[翻译]Ubuntu 14.04, 13.10 下安装 OpenCV 2.4.9  http://www.linuxidc.com/Linux/2014-12/110045.htm

OpenCV的详细介绍请点这里
OpenCV的下载地址请点这里

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

本文永久更新链接地址http://www.linuxidc.com/Linux/2016-07/132884.htm

linux
相关资讯       OpenCV2.4.9  Ubuntu 14.04安装OpenCV2.4.9