Arcore-android-sdk: Accessing Camera Frame Bytes Directly Instead of Rendering it

Created on 1 Nov 2017  路  4Comments  路  Source: google-ar/arcore-android-sdk

Hi,

I want to access the camera capture frame bytes directly from ARCore instead of rendering it.

Some Context:
I'm trying to take the camera bytes, convert it into texture, apply some shaders, convert back to bitmap, apply CPU algorithms to that bitmap like flood fill (which can't be done on GPU), convert back to texture, apply additional shaders, render image.

What would be the best way to do this?

Is there a way to access camera frame bytes directly (instead of having it render on the screen)?

Most helpful comment

@nathanmartz Any help would be greatly appreciated

All 4 comments

@nathanmartz Any help would be greatly appreciated

  • 1 Would like to know this as well.

Sorry for the slow reply here. The best way to access the camera data is to use Session.setCameraTextureName() to access the camera data. Then write a bit of GL to blit that to a texture you can read from, render with, etc.

With Developer Preview 2, we've added computervision sample code that shows how to get CPU access to the pixel data.

Was this page helpful?
0 / 5 - 0 ratings