opencv 解决ippicv下载慢的问题: ippicv_2019_lnx_intel64_general_20180723
OpenCV + CMake我已经弄过无数次了,电脑都换了好几波,经常卡在这里,记录一下,也方便大家。
下载超级慢,受不了,
1,下载 ippicv_2019_lnx_intel64_general_20180723.tgz等文件
保存路径随意,我是放在默认的下载路径 E:/softs/open/lib_softs/
链接:https://pan.baidu.com/s/1Mg5m7IygJvxYbjBWOmIikw
提取码:au1o
2,修改opencv里相关配置文件
下载完了之后,要到ippicv.cmake中修改下载地址,这样就不用再在网上下载了。
找到
/opencv_source/opencv/3rdparty/ippicv/ippicv.cmake
将其中的
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}ippicv/"
改为步骤1中手动下载的文件的本地路径(也就是将网络下载的模式改为本地文件下载的模式):
Linux
"file:///home/UserName/Downloads/" #(仅供参考,根据自己的路径填写)
windows
"file://E:/softs/open/lib_softs/"
编辑完成保存退出。
如果你想通过迅雷或IDM下载,根据ippicv.cmake,具体下载地址应该是
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_mac_intel64_general_20180723.tgz
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_mac_ia32_general_20180723.tgz
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_lnx_intel64_general_20180723.tgz
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_lnx_ia32_general_20180723.tgz
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_win_intel64_20180723_general.zip
https://raw.githubusercontent.com/opencv/opencv_3rdparty/32e315a5b106a7b89dbed51c28f8120a48b368b4/ippicv/ippicv_2019_win_ia32_20180723_general.zip
3,重新cmake
这个不说了,我用的cmake-gui
命令行大概这样,
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
到了下载ippicv那一步时会自动从本地下载。
face_landmark_model.dat
另外还有一个令人头痛的face_landmark_model.dat,文件不大,但老是下载不下来,
找到
open_sruc\opencv_contrib-4.1.1\modules\face\CMakeLists.txt
把其中的
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${__commit_hash}/"
改成
"file://E:/softs/open/lib_softs/"
同样,把下载好的
face_landmark_model.dat放在该文件夹下面即可
ffmpeg
同样,可以在opencv/3rdparty/ffmpeg/ffmpeg.cmake中修改相关链接,并下载下列文件到本地,