Linux下OpenCV的安装配置
1 安装cmake及一些依赖库
sudo apt-get install cmake
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev
CentOS或RedHat:
yum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devel libpng-devel gstreamer-devellibavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig Python libtool nasm
2 安装opencv
从官网下载opencv并解压,cd命令进入opencv的目录
下载地址:http://opencv.org/downloads.html
cmake .
(cmake时间较长,约半小时)
sudo make
sudo makeinstall
3 配置
将opencv的库加入到路径,从而让系统可以找到,没第一个就加第二个
sudo gedit /etc/ld.so.conf.d/opencv.conf
sudo gedit /etc/ld.so.conf
末尾加入/usr/local/lib,保存退出
sudo ldconfig #使配置生效
sudo gedit /etc/bash.bashrc
末尾加入
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
保存退出
sudo source /etc/bash.bashrc #使配置生效
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的下载地址:请点这里
本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-05/1311.htm