在安装opencv4.1.0时,卡在
IPPICV: Download: ippicv_2019_lnx_intel64_general_20180723.tgz
这个应该是编译opencv源码的通用问题,主要是网络问题,无法下载ippicv包,这里提供一个手动寻找安装包的方式,步骤如下:
1. 在opencv源代码中获取ippicv的下载地址
首先打开opencv-x.x.x\3rdparty\ippicv\ippicv.cmake文件,分别找到如下语句
set(IPPICV_COMMIT "32e315a5b106a7b89dbed51c28f8120a48b368b4")
"${OPENCV_IPPICV_URL}"
"$ENV{OPENCV_IPPICV_URL}"
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
if(X86_64)
set(OPENCV_ICV_NAME "ippicv_2019_lnx_intel64_general_20180723.tgz")
set(OPENCV_ICV_HASH "c0bd78adb4156bbf552c1dfe90599607")
拼接关键句,获得ippicv_2019_lnx_intel64_general_20180723.tgz的下载地址
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_lnx_intel64_general_20180723.tgz
2. 下载
ippicv_2019_lnx_intel64_general_20180723.tgz
3.修改 ippicv.cmake
将如下
"${OPENCV_IPPICV_URL}"
"$ENV{OPENCV_IPPICV_URL}"
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
中的
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
修改为ippicv安装包所在本地路径
"file:///home/student/SFDN/Downloads"
4. 编译opencv
cmake -D OPENCV_ENABLE_NONFREE=ON ..
5. How to build OpenCV with extra modules
$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
$ make -j5
加上额外模块的编译是
cmake -D OPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>