Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 780 Bytes

File metadata and controls

26 lines (23 loc) · 780 Bytes

OpenCV

As in OpenCV 4 the method below is deprecated as OpenCV is available from PyPI. Itwould be compiled automatically for both Linux and Android.

Linux Camera support

In order to be able to use the camera on Linux, you need to compile OpenCV. Simply installing opencv-python from pypi is not enough. Currently only OpenCV2 works with Kivy on Linux (see kivy/kivy#5404). Download and extract the OpenCV2 archive:

wget https://github.com/opencv/opencv/archive/2.4.13.3.tar.gz -O opencv-2.4.13.3.tar.gz
tar -xvzf opencv-2.4.13.3.tar.gz

Prepare and build:

cd opencv-2.4.13.3/
mkdir build && cd build/
cmake ..
make -j4

Copy your compiled cv2.so to your virtualenv:

cp lib/cv2.so venv/lib/python2.7/site-packages/cv2.so