0

I would like to handle the frame from YUV to RGB using the ScriptIntrinsecYUVtoRGB in the method ImageReader.OnImageAvailableListener().

It can be done? Until now I have done so:

I remaining with image white and the preview does not start anymore.

Suggestions?

Enda Azi
  • 49
  • 10

1 Answers1

1

You're not adding your TextureView surface to the capture session or the capture request anymore. Only the ImageReader Surface is being added to the outputSurfaces list and to captureRequestBuilder.addTarget().

So the camera is not drawing anything to the TextureView. Add it back in to both.

Eddy Talvala
  • 17,243
  • 2
  • 42
  • 47
  • I did not understand where I should add it. – Enda Azi Dec 17 '17 at 18:27
  • Below captureRequestBuilder.addTarget(imageReader.getSurface()) add captureRequestBuilder.addTarget(surface). Below outputSurfaces.add(imageReader.getSurface()) add outputSurfaces.add(surface). – Eddy Talvala Dec 18 '17 at 17:58