Easy installation of opencv2: conda install --channel https://conda.anaconda.org/menpo opencv or: sudo apt-get install libopencv-dev python-opencv Easy installation of opencv3: pip install opencv-python or: pip install opencv-python==3.1.0 The simple installation method is to install the compiled Opencv from the library. This installation method is simple and convenient. The disadvantage is that it is easy to have unknown bugs during use, such as not being able to imshow images, not being able to read video files, etc. (opencv3 seems to be better). It is recommended to compile and install from source code. Compile and install Opencv2 or Opencv3 from source code 1. Install dependency files 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 2. Download the source package Official website download address: https://opencv.org/opencv-3-2.html Here, choose to download the tar.gz file for all platforms on the GitHub source (download link: https://github.com/opencv/opencv/archive/3.2.0.tar.gz), opencv-3.2.0.tar.gz, file size 75MB 3. Unzip the source code and compile and install tar xvf opencv-3.2.0.tar.gz cd opencv-3.2.0 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. make sudo make install Note: When executing the cmake command, you need to download a ippicv_linux_20151201.tgz file. If the network is not good, it may get stuck at:
At this time, you can download the ippicv_linux_20151201.tgz file separately (file size 36.5MB, download link: https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_linux_20151201.tgz), put it in the '/opencv-3.2.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/' folder after downloading, and then re-cmake it. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: How to configure the My.ini file when installing MySQL5.6.17 database
>>: jQuery plugin to implement dashboard
Table of contents Project Creation Project Struct...
Copy code The code is as follows: <!DOCTYPE ht...
This article uses examples to describe advanced u...
Table of contents JSX environment construction Se...
Preface I believe most people have used MySQL and...
In this article, the blogger will take you to lea...
Preface This article mainly introduces the relati...
In Nginx, there are some advanced scenarios where...
Use of clip-path polygon The value is composed of...
This article uses examples to illustrate how to i...
Question: In index.html, iframe introduces son.htm...
1. Create a docker network card [root@i ~]# brctl...
1. Drop-down list example The code is as follows:...
Table of contents 1 Background 2 Create a contain...
describe Returns the time interval between two da...