Search code examples
javaopengl-esarcore

ARCore - reading superimposed image (screenshot of an AR scene)


I've been experimenting with ARCore for the past few months. I have read almost all the documentation. Talking in reference to the sample app, what I want to do is to extract the superimposed image from the app i.e a frame containing the camera texture and also the bots drawn by opengl (like a screenshot). In preview 2, they have provided TextureReader class which extracts just the camera texture. I've been trying a lot but haven't been able to succeed in getting the superimposed image. Is there a way to do it or is it just impossible?


Solution

  • Sample code specifically for the HelloAR sample to capture the image (and save it to the device) is in this answer: How to take picture with camera using ARCore