Skip to content
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

Android camera provider #3236

Closed
wants to merge 11 commits into from
Closed

Android camera provider #3236

wants to merge 11 commits into from

Conversation

jxai
Copy link
Contributor

@jxai jxai commented Apr 5, 2015

This is a fully working camera provider for Android. It is efficient and can achieve pretty high frame rate by receiving frames through a SurfaceTexture (based on this snippet).

In addition, it provides an interface to obtain current frame data as a Numpy array (requiring OpenCV Python binding cv2), making it suitable for computer vision apps.

It fixes issue #2831.

@cbenhagen
Copy link
Contributor

Thank you so much for this! Could you please rebase and make a PR against kivy:master?

@tito
Copy link
Member

tito commented Apr 6, 2015

This is awesome! Finally someone get it right :)

Same as @cbenhagen, can you rebase your work on master first? We wont get PR merged first in stable without going to master first.

Thanks :)

@tito tito added Platform: Android Type: Feature Issue is a feature request Status: Has PR There's a PR available for the issue labels Apr 6, 2015
@tito tito added this to the 1.9.1 milestone Apr 6, 2015
@jxai
Copy link
Contributor Author

jxai commented Apr 7, 2015

Thanks for the suggestion, I rebased the branch against tag 1.8.0 on master, please let me know if it is good enough.

@tito
Copy link
Member

tito commented Apr 7, 2015

@jasonxunxu Your PR at the top still indicate a PR against stable-1.8.x, you need to move it to master as well :)

def _refresh_fbo(self):
self._fbo.clear()
with self._fbo:
#BindTexture(texture=self._camera_texture, index=1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no need to bind, how the samplerExternalOES is binded then? Please note that the BindTexture use standard GL_TEXTURE2D, but you can use a graphics Callback, and manually do opengl in it in the Fbo pipeline.

Also, _fbo.clear + recreate Rectangle every frame is not efficient, you can setup your fbo only once at the start, then call fbo.draw() every frame.

@jxai
Copy link
Contributor Author

jxai commented Apr 7, 2015

@tito How can I change the PR to be against master without recreating one? I just rebased the branch, is there something else I should have done? Thanks!

@tito
Copy link
Member

tito commented Apr 7, 2015

If you click on Edit, don't you see a way to change it at the top?
If not, close this one and resubmit against master :)

@matham
Copy link
Member

matham commented Apr 7, 2015

master...jasonxunxu:camera-android is what we want.

@jxai
Copy link
Contributor Author

jxai commented Apr 7, 2015

@tito The Edit button only allows me to revise the title, so I have to close this PR and submit another one.

Regarding the binding thing, it surprised me that everything works fine without even binding the texture, I don't actually know why and still am very curious.

I will try to improve efficiency as you pointed out, thanks a lot!

@jxai jxai closed this Apr 7, 2015
@jxai jxai mentioned this pull request Apr 7, 2015
@jxai
Copy link
Contributor Author

jxai commented Apr 7, 2015

The PR is resubmitted as #3250, sorry everyone for the inconvenience...

@tito We can carry on the discussion under the new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Status: Has PR There's a PR available for the issue Type: Feature Issue is a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants