在ubuntu14.04安装opencv3.1.0
在进行到cmake步骤时报错:CMake Error at 3rdparty/iICV: Failed to download ICV package: ippicv_linux_20151201.tgz. Status=1;"Unsupported protocol"
不明原因下载不了这个库,在csdn上下载了一个包,网址这里:http://download.csdn.net/download/lx928525166/9479919
不用解压缩,直接存放到/opencv-3.1.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ 目录下,然后重新cmake,发现顺利通过了。
整体流程如下:
编译环境安装:
1
|
sudo
apt-get
install
build-essential
|
必需包安装:
1
|
sudo
apt-get
install
cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
|
可选包安装:
1
|
sudo
apt-get
install
python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
|
opencv下载:
1
|
wget https:
//github
.com
/Itseez/opencv/archive/3
.1.0.zip
|
1
|
git clone git:
//github
.com
/Itseez/opencv
.git
|
创建编译的临时目录:
1
2
3
|
cd
~
/opencv-3.1.0
mkdir
build
cd
build
|
注意: 这里假设opencv解压开的或者从github获取的源代码目录在用户主目录下。
生成cmake编译配置:
1
|
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=
/usr/local
..
|
编译:
1
|
make
-j4
# runs 4 jobs in parallel
|
安装opencv:
1
|
sudo
make
install
|