Installing OpenCV 2.4.* with Python Support

Opencv的安装简直让想在图像处理方面试试水的新手抓耳挠腮,今天记录下心酸的安装过程,避免 fall in a same hole.

1.

cd ~/
git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git

2.

cd ~/opencv
mkdir build
cd build

3.

cmake -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..

(这部如果遇到文件 ippicv_linux_20151201.tgz 下载失败的情况,可以手动下载至 opencv/3rdpart/ippiv/downloads/liniux_*/ 下 再作cmake)

4.

make

5.

sudo make install

6.

sudo ln -s /usr/local/lib/python2.7/site-packages/cv2.so {your_python_path}/cv2.so
sudo ln -s /usr/local/lib/python2.7/site-packages/cv.py {your_python_path}/cv.py

发表评论

电子邮件地址不会被公开。 必填项已用*标注