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