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的下載地址:請點這裡