安裝openCV踩坑
a. cmake之前:需要下載ippicv_linux_20151201.tgz,然後拷貝到opencv-3.0.0-beta/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/中,覆蓋原來的tgz檔案(注意注意:是覆蓋,因為cmake編譯的原始碼裡面把該檔案的名字寫死了,所以這裡一定要原名覆蓋,否則cmake的時候依舊找不到該tgz檔案)
b. cmake命令:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler ..
注意:最後的CUDA_GENERATION=Kepler 以及 兩個小點“ ..”
解釋:
CUDA_GENERATION=Kepler 是為了避免NVCC與GPU architecture不匹配的問題,假如不寫最後的option,可能會出現的錯誤為: Unsupported gpu architecture 'compute_11'
c. make
潛在性錯誤
1.CUDA版本大於等於8的問題:
修改graphcuts.cpp檔案(路徑不一定,我的在opencv-3.0.0-beta/modules/cuda/src/),將:
#include "precomp.hpp"
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
改為
#include "precomp.hpp"
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)
2. curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
d.python各種依賴包
pip2 install easydict
apt-get install python-yaml