1. Install dependencies
Compiling and installing opencv directly will generally report an error, and the dependent tools need to be installed first.
$ sudo apt-get install build-essential cmake libopencv-dev libgtk2.0-dev pkg-config python-dev python-numpy
2. Download opencv3 (choose one of the two versions)
$ mkdir ~/opencv
$ cd ~/opencv
$ wget https://github.com/Itseez/opencv/archive/3.0.0-alpha.zip -O opencv-3.0.0-alpha.zip
$ unzip opencv-3.0.0-alpha.zip
$ cd opencv-3.0.0-alpha
//$ wget https://github.com/Itseez/opencv/archive/3.0.0-beta.zip//$ unzip opencv-3.0.0-beta.zip//$ cd opencv-3.0.0-beta
$ mkdir release
$ cd release
3. Compile and install
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUDA=OFF ..//Do not turn off the graphics card will report an error (-D WITH_CUDA=OFF)
$ make -j //Compiling with multi-core processors is faster than the default make using only one core
$ sudo make install
4. Configure environment variables
$ sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
$ sudo ldconfig
The above operation method for installing opencv3.0.0 on ubuntu14.04 is all the content shared by the editor. I hope to give you a reference.
Recommended Posts