2021-05-12 14:32:11
Ubuntu 14.04安裝OpenCV2.4.9
2020-06-16 17:38:36
Ubuntu 14.04安裝OpenCV2.4.9
安裝工具
sudo apt-get install git
sudo apt-get install g++
sudo apt-get install vim
下載Opencv
解壓
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的官方文件也有說明:
- GCC 4.4.x or later. This can be installed with:
sudo apt-get install build-essential
- CMake 2.6 or higher;
- Git;
- GTK+2.x or higher, including headers (libgtk2.0-dev);
- pkg-config;
- Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy);
- ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev;
- [optional] libdc1394 2.x;
- [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 ..
構建和安裝
make
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
相關文章