当先锋百科网

首页 1 2 3 4 5 6 7

安装opencv

sudo apt-get install build-essential

sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

sudo apt-get install python3-dev python3-scipy python3-numpy python3-pandas python3-matplotlib python3-sklearn

 

https://github.com/opencv/opencv/releases

 

https://github.com/opencv/opencv/archive/3.4.9.tar.gz

 

(py365) user@ubuntu:~/caffe_ssd$ cd opencv-3.4.9/

(py365) user@ubuntu:~/caffe_ssd/opencv-3.4.9$ ls

3rdparty  cmake           CONTRIBUTING.md  doc      LICENSE  platforms  samples

apps      CMakeLists.txt  data             include  modules  README.md

(py365) user@ubuntu:~/caffe_ssd/opencv-3.4.9$ mkdir release

(py365) user@ubuntu:~/caffe_ssd/opencv-3.4.9$ cd release/

(py365) user@ubuntu:~/caffe_ssd/opencv-3.4.9/release$

(py365) user@ubuntu:~/caffe_ssd/opencv-3.4.9/release$

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/user/anaconda3/envs/py365 -D BUILD_opencv_python3=ON -D BUILD_opencv_python2=OFF  -D PYTHON3_EXECUTABLE=$(which python3) -D BUILD_EXAMPLES=ON -D BUILD_SHARED_LIBS=ON ..

(CMAKE_INSTALL_PREFIX是安装路径,默认是/usr/local)

 

 

 

关于这一块我想还是用cmake-gui会好用点,参考试验的网上资料:【安装教程】Ubuntu16.04中用CMake-gui安装OpenCV3.2.0和OpenCV_contrib-