Based on ubuntu16.04 configuration opencv3.1+python3.5

Source: Internet
Author: User

Recently Run deep learning program, running TensorFlow and Keras in python3.5 environment. OPENCV provides a number of computer vision algorithms, want to call the OPENCV function, found that the original configuration OpenCV Python interpreter version is 2.7. What about that?

0. Install the CMake tool with GUI:
sudo Install Cmake-curses-gui
1. Ccmake

Enter the opencv-3.1.0/build/path and execute the Ccmake

Ccmake.

2. Add Python3 Path

Page DOWN to find Python3,:

To add your own Python3 path:

3. Generate the Make file

Press the C key to configure. If there is an error, for example, cannot find the XX library, adjust the corresponding option or install the corresponding library. After the configuration is successful, press the G key to generate the makefile.

4. Make a bit

Make a bit. Multicore processors have a lot of advantages and make them in a few minutes.

 Make-j12sudomakeinstall
5. Verification

Finally, run a light flow routine

Python3 opt_flow.py

Shown below:

So we can run the OPENCV in the PYTHON3 environment!

Based on ubuntu16.04 configuration opencv3.1+python3.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.