本条微博地址
黄茅潭
In this tutorial We will learn to setup OpenCV-Python in Ubuntu System. Below steps are tested for Ubuntu 16.04 and 18.04 (both 64-bit).
penCV-Python can be installed in Ubuntu in two ways:
Install from pre-built binaries available in Ubuntu repositories
Compile from the source. In this section, we will see both.
Another important thing is the additional libraries required. OpenCV-Python requires only Numpy (in addition to other dependencies, which we will see later). But in this tutorials, we also use Matplotlib for some easy and nice plotting purposes (which I feel much better compared to OpenCV). Matplotlib is optional, but highly recommended. Similarly we will also see IPython, an Interactive Python Terminal, which is also highly recommended.
nstalling OpenCV-Python from Pre-built Binaries
This method serves best when using just for programming and developing OpenCV applications.
Install package python3-opencv with following command in terminal (as root user).
$ sudo apt-get install python3-opencv