Depth Data Question

Hi,
Curious if anyone knows an easy way to grab the ‘AVDepthData’ stream of the front facing camera on an ios device in openframeworks? I looked through ofxARKit but I don’t see a way to retrieve this data specifically within that addon.

Like in the image below:

You should be able to grab the depth data from an ARFrame, there’s a capturedDepthData property.

https://developer.apple.com/documentation/arkit/arframe
https://developer.apple.com/documentation/arkit/arframe/2928208-captureddepthdata

The session object will always have a currentFrame property which references the current ARFrame

If you need need it for shading, the tricky part will be converting that to something OpenGL compatible which may need more native code; I haven’t tried but I would imagine it’s something along the lines of what I had to do for the MetalCam class.