Reputation: 1937
Is there a way to get a byte[] or ByteBuffer from the CameraX ImageAnalysis use case? Any insight is appreciated.
Upvotes: 0
Views: 946
Reputation: 11071
From CameraX test app:
byte[] bytes = new byte[image.getPlanes()[0].getBuffer().remaining()];
image.getPlanes()[0].getBuffer().get(bytes);
Upvotes: 2