- opencv下载
https://github.com/opencv/opencv/archive/3.0.0.zip - 安装opencv所需依赖
sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev libhdf5-dev -y
- 编译opencv
cd opencv3.0.0
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
make
make all
- 做软连接
ln -s ./lib/cv2.so /usr/local/lib/python2.7/dist-packages/cv2.so
-
验证