Closed iBicha closed 6 years ago
Thanks for the feature request.
Getting CPU access to the underlying texture is a very highly asked for feature. We're looking into it.
Thanks!
@chaosemer just a small pointer, if the future implementation will be based on reading PBOs from previous frames, we might need a timestamp with each frame, just to know how old it is (one might choose to not get these pixel buffers every frame) Cheers
This use case is supported!
TextureReaderApi.SubmitFrame returns an integer that uniquely identifies that frame. You can store any associated data (pose, lighting estimation, etc.) that you want to preserve with that integer as a key and look it up when you get the frame back from AcquireFrame.
I thought it would return the buffer index where the frame would be stored (which would be 0 or 1 since the buffer count is 2) But I think I see what you mean, one could store a timestamp separately every time SubmitFrame is called, and return it when AcquireFrame is called.
Yeah, exactly what you said.
Also, you are correct that SubmitFrame will reuse IDs.
Hi, ARCore Unity SDK v1.1.0 supports CPU image access in its API via Frame.AcquireCameraImageBytes.
~~I was wondering why the texture reader in the computer vision example, why the buffer format is either
GL_RED
orGL_RGBA
, I think it should beGL_RED
orGL_RGB
, since alpha is not used at all. Another option is to pass the GL format from the C# script, keep it flexible (one could choose another format without having to recompile the texture reader utility)~~ Totally forgot about frame buffer formats, nevermind, but feel free to correct me if I'm wrong.=> Also, could the texture be part of the SDK instead of the example? I think that makes a bit more sense. Thanks.