ubuntu16.04 安装opencv 3.3.0
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu16.04 安装opencv 3.3.0相关的知识,希望对你有一定的参考价值。
sudo apt-get update sudo apt-get upgrade sudo rpi-update sudo reboot sudo apt-get install build-essential git cmake pkg-config sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev sudo apt-get install libxvidcore-dev libx264-dev sudo apt-get install libgtk2.0-dev sudo apt-get install libatlas-base-dev gfortran cd ~ git clone https://github.com/Itseez/opencv.git cd opencv git checkout 3.3.0 cd ~ git clone https://github.com/Itseez/opencv_contrib.git cd opencv_contrib git checkout 3.3.0
卸载老版本
pip uninstall opencv-python
安装opencv 3.3.0
pip install numpy cd ~/opencv mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=OFF \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON .. make -j4 sudo make install sudo ldconfig
以上是关于ubuntu16.04 安装opencv 3.3.0的主要内容,如果未能解决你的问题,请参考以下文章
ubuntu16.04安装opencv2.4.10过程中的问题
Linux ubuntu16.04 安装opencv4教程(源码编译)