OpenCV Python安卓

2024-06-11 03:45:48 发布

您现在位置:Python中文网/ 问答频道 /正文

是否可以使用带有OpenCV API的Python编程语言编写Android应用程序?

我使用Python编写了一个Android应用程序,其中包含Android脚本层(SL4A)。这是SL4A的网站:https://code.google.com/p/android-scripting/

但是,在搜索互联网时,使用Python和OpenCV API和Android API并不是我做过或读过的事情。

Python比Java更令人兴奋,所以我宁愿使用Python。它更加令人兴奋,因为它更加开放源代码,并且隐式地促进了更多的自由。


Tags: https脚本comapi应用程序网站googlecode
1条回答
网友
1楼 · 发布于 2024-06-11 03:45:48

According to here:

there is sl4a / PythonForAndroid, unfortunately, it uses hardcoded java rmi invocations for anything os related. so - no opencv bindings there ;( i guess, you'll have to learn java.
-berak (Nov 20 '13)

另外,虽然已经过时,但是这个still open issue on github让我相信仍然没有Python Android OpenCV实现。

There is no camera implementation in Kivy right now. And we never said than opencv was available on python-for-android too.

但未来仍有希望:

I have a plan of writing a recipe for it, not now, currently I am quite overwhelmed by others ;-)
- ParokshaX (Jul 25, 2014)

快速编辑:

Lol,有一个开放问题的工作实现,它只是没有一个好的配方:

Here I attach the Eclipse project I have made to build libcv2.so for Python on Android. It is a little bit messy because I really had a headache working it out, and I'm short on time right now. Just import it into Eclipse (I use ADT 22.0 and NDK r9c) and it should compile. I took libopencv_java.so into the project so it shall be a dependency. Also libpython2.7.so is a dependency too. If anyone can make this into a Python for Android recipe then that would be awesome.

相关问题 更多 >