You need to set environment variable as this configuration is not ordinary.
Sample codes can be found at
http://docs.opencv.org/3.2.0/
or simply
/tmp/iit/usr/share/OpenCV/samples/python
http://docs.opencv.org/3.2.0/
Click: OpenCV-Python Tutorials
Click: GUI Features in OpenCV
Click: Getting Stated with Images
http://docs.opencv.org/3.2.0/dc/d2e/tutorial_py_image_display.html
Our OpenCV was made by python2, but our libirary should work with both python(2) and python3.
How can you know this kind of info? In which file? (remember cmake's output)
To enjoy sample programs, you should run them at the source tree, and need some setup.
(As the data files are there.)
Terminal: Shell |
# As the cv2 (computer vision library of OpenCV API 2.0?) is installed # in our special folder, we should tell python that. # For python2, PYTHONPATH=/tmp/iit/usr/lib/python2.7/dist-packages # For python3 # (PYTHONPATH=/tmp/iit/usr/lib/python3.5/dist-packages) # export export PYTHONPATH # You are ready! cd /tmp/iit/work/openv/samples/python # Try one by one, some works well, some are not. # for example, less lappr.py # and run (you need a USB camera before you run this) python lappr.py |