1

If I use camera2 API to capture some image I will get "final" image after image processing, so after noise reduction, color correction, some vendor algorithms and etc. I should also be able to get raw camera image following this. The question is can I get intermediate stages of image as well? For example let's say that raw image is stage 0, then noise reduction is stage 1 color correction stage 2 and etc. I would like to get all of those stages and present them to user in an app.

LLL
  • 1,777
  • 1
  • 15
  • 31

1 Answers1

1

In general, no. The actual hardware processing pipelines vary a great deal between different chip manufacturers and chip versions even from the same manufacturer. Plus each Android device maker then adds their own software on top of that.
And often, it's not possible to dump outputs from every step of the process, only some of them.

So making a consistent API for fetching this isn't very feasible, and the camera2 API doesn't have support for it.

You can somewhat simulate it by turning things like noise reduction entirely off (if supported by the device) and capturing multiple images, but that of course isn't as good as multiple versions of a single capture.

Eddy Talvala
  • 17,243
  • 2
  • 42
  • 47
  • Thank you for response, do you think it would be somehow possible to capture raw image and pass the same raw image to that pipeline? Once without noise reduction, another time without color correction and etc? Or is this pipeline hidden from app developers? – LLL Oct 20 '20 at 08:42
  • 1
    The camera2 API doesn't support reprocessing RAW buffers (though it does support reprocessing YUV to JPEG), because different hardware pipelines have different processing steps done in RAW and RGB domains, so the API wouldn't be able to guarantee which controls work each time. – Eddy Talvala Oct 22 '20 at 18:38