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
Preface This article will share some docker-compo...
Table of contents 1. Introduction 2. Self-increme...
Prerequisite: Mac, zsh installed, mysql downloade...
The installation tutorial of mysql 5.7.19 winx64 ...
The fd command provides a simple and straightforw...
This article describes the MySQL data types and f...
Alibaba Cloud Server installs and configures Tomc...
1. Manually create and add my.ini file # CLIENT S...
Table of contents Proper use of indexes 1. Disadv...
This article mainly introduces the process of imp...
I have a server with multiple docker containers d...
Another important aspect of separating structure ...
Table of contents Docker deployment Always on clu...
This article shares the specific code for impleme...
Note: Since .NET FrameWork cannot be run in core ...