I'm trying to get snapshots from the screen. I don't necessarily need the full hi-res stills, just the image from the viewport without the 3D models I've overlaid already.
Asked
Active
Viewed 1,541 times
1 Answers
3
If you mean the image that is captured by the camera, it's available under
sceneView.session.currentFrame?.capturedImage
https://developer.apple.com/documentation/arkit/arframe/2867984-capturedimage
The pixel buffer is in the YCbCr format so you might need to access the luma and chroma planes and convert them to RGB depending on what kind of image you're trying to produce. For a CGImage/UIimage I think it's pretty straightforward: How to turn a CVPixelBuffer into a UIImage?

Guig
- 9,891
- 7
- 64
- 126