English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
1.Install dependencies
Compiling and installing opencv directly usually results in errors, and 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(Any of the two versions can be chosen)
$ 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 .. //Error will occur if the graphics card is not turned off (-D WITH_CUDA=OFF) $ make -j //Compiling with multi-core processors is faster than the default make that uses 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 article about ubuntu14.04Install opencv3The operation method of .0.0 is all the content shared by the editor, hoping to provide a reference for everyone, and also hope that everyone will support and cheer for the tutorial.
Statement: The content of this article is from the Internet, the copyright belongs to the original author, the content is contributed and uploaded by Internet users spontaneously, this website does not own the copyright, does not undergo artificial editing, and does not bear relevant legal liability. If you find any content suspected of copyright infringement, please send an email to: notice#oldtoolbag.com (When reporting, please replace # with @ and provide relevant evidence. Once verified, this site will immediately delete the infringing content.)