-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera on android #75
Comments
There is no camera implementation in Kivy right now. And we never said than opencv was available on python-for-android too. The list of available recipes can be retrieved with ./distribute.sh -l The fix is... to do it. |
So if I only include "opencv" the process of compiling the camera will work? |
I disagree with this statement:
I agree with the statement:
Ok, no problem.
|
There is no camera implementation in Kivy "for android platform". :) You are on the python/android project, so the context was implies. The issue is not only to get opencv compiled for ARM/android, but also implement a provider for android. It seem that OpenCV have now a camera support for android, but it need a closer look to see how it need to be integrated into our java code, and if it's still possible to use their Python API. Or another way. |
WRT OpenCV for Android, I managed to compile it for Python and successfully imported it in Python. However camera functionality in OpenCV is somehow broken in Kitkat 4.4.2. |
Do you mean you compiled the OpenCV Python library for arm/android using python-for-android? If yes, would you mind sharing the recipe? |
Hi Bastian Venthur, I did compiled the OpenCV Python library for Android(ARM). However, I Regards, Peng 2014-05-23 6:21 GMT+08:00 Bastian Venthur [email protected]:
|
Hi barius, I am trying to do the same, wrap opencv with python for android. Regards, |
@ParokshaX @venthur The link: Regards, Peng |
@barius |
@ParokshaX |
@barius Is it possible that you could share the numpy-android which you built, so I can test run the opencv I built using cmake and verify its integrity? |
try put numpy in front of kivy first 😁
|
@barius |
@ParokshaX |
@barius currently I am creating a patch for numpy-1.8.1 to build for android. |
@ParokshaX |
@barius weird!, On 7/25/14, barius [email protected] wrote:
|
@ParokshaX |
I patched the numpy1.8.1 for python-for-android, now I have a working On 7/25/14, barius [email protected] wrote:
|
@ParokshaX |
I have a plan of writing a recipe for it, not now, currently I am On 7/25/14, barius [email protected] wrote:
|
Has there been any update on this? Would it be possible to get an official recipe for OpenCV in the near future? I would be extremely grateful! Coffees, all around! |
I created a recipe for OpenCV and submitted it as PR #327. The recipe patches OpenCV v2.4.10.1, builds a fully working Python module cv2.so, as well as installs native camera libraries. The Java library (libopencv_java.so) is actually not needed. I don't have the resource to test the camera functionality on many different devices. It works fine on one phone running Android 4.1, but failed on another phone running 4.4 (as @barius mentioned earlier). |
Hi again, Jason. Do you have any tips for using the Android camera feature of OpenCV within kivy? This seems to be uncharted territory. |
@jasonxunxu thank you very much for the recipe! Do you mind giving a small example on how one would use the camera? If it should be as simple as cap = cv2.VideoCapture(0) it might just not work on my nexus 5. This is the whole code i used to test: https://gist.github.com/cbenhagen/457af62752fba44fff47 |
oh never mind.. i just found your kivy fork and its camera-android branch |
@cbenhagen Thanks for digging out my branch, I just posted a PR for Kivy. Please let me know how it works for you. @gorgonaut04 I hope it does the trick for you too. |
@jasonxunxu it looks to me as if this code is good for streaming video data, but can it also be used to actually take full-resolution photo using the shutter? I apologize if I'm just completely missing this, but are there any usage examples for this code? Thanks! |
It is a standard camera provider so works transparently with the Camera widget on Android. In addition it has a |
Log error: http://pastebin.com/LwgjpMqQ
. / distribute.sh-m "pil Kivy pygame opencv"
error: Recipe opencv does not exit
opencv is not included in the "recipes dir".
How to fix it?
Thank you.
The text was updated successfully, but these errors were encountered: