-1

I have no idea how to get bitmap stream using CameraX. Please provide me some information. I have no idea how to do that.

Hello World
  • 740
  • 5
  • 18

1 Answers1

1

You can use the ImageAnalysis to get a stream of ImageProxy objects, then decode the bytes into Bitmap. See: How to convert android.media.Image to bitmap object?

Are you analyzing the camera feed? Note that this conversion is not cheap. For the best performance, you should run the analysis directly against on ImageProxy's original format which is YUV_420_888.

Xi 张熹
  • 10,492
  • 18
  • 58
  • 86
  • Can you please share some reference. I tried implementing this solution for `camerax-beta-01`, but I am getting green disturbing image. – Rajat Sangrame Mar 22 '20 at 12:59