Ask Your Question

Revision history [back]

You can try to build Python support for Android yourself :D It's not difficult. OpenCV invokes Python to automatically wrap its features for Python during build time. However, its cmake script prohibits building Python support against Android.

To short-circuit this mechanism, simply grab the auto-generated header files when you normally build OpenCV with Python support on desktop platform (I used Ubuntu), e.g. pyopencv_generated_types.h, generated0.i, put them together with /src2/cv2.cpp and cv2.cv.hpp, write a simple Android.mk (Application.mk is also used to add C++ support), and invoke ndk-build to build a dynamic library. Then you can use Python to do "import cv2"