Ubuntu 14.04安装OpenCV2.4.9
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 <br>
- 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
加载动态连接库
OpenCV的详细介绍:请点这里
OpenCV的下载地址:请点这里
相关推荐
greent00 2020-06-10
csdmeb 2020-06-08
BeanJoy 2020-02-24
learningCV 2020-11-10
learningCV 2020-08-25
huang00 2020-08-21
wangdaren 2020-08-15
BeanJoy 2020-07-28
csdmeb 2020-06-25
wangdaren 2020-06-14
pythonxuexi 2020-06-13
woniulx0 2020-06-13
liangzuojiayi 2020-06-09
greent00 2020-06-09
BeanJoy 2020-06-06
lihuifei 2020-06-05
wangdaren 2020-06-03
wangdaren 2020-05-31