最近在自己电脑上装caffe,在配置opencv的时候,突然发现原来那个安装脚本已经被更新成3.0的了,虽然想试试,希望侥幸能通过,不过caffe编译的时候就直接不认识Mat了,还是装回2.4.x的版本吧,下面时手动安装的步骤:
wget -O opencv-2.4.7.tar.gz http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.7/opencv-2.4.7.tar.gz/download
tar -zxf opencv-2.4.7.tar.gz
cd opencv-2.4.7
sed -i '/string(MD5/d' cmake/cl2cpp.cmake
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j 4
sudo make install
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig