Search code examples
avcapturesessionios11arkit

Depth data from ARKit


Is it possible to access the AVDepthData from ARKit? The ARFrame contains the camera's image, but not its depth information.

I tried to create a separate AVCaptureSession to receive the AVDepthData, but I am unable to run the AVCaptureSession at the same time as ARKit. Either the ARSCNView updates or the AVCaptureDepthDataOutputDelegate gets called, but never both.


Solution

  • As was answered in this thread and mentioned in this video, no, ARKit does not provide you with AVDepthData when you are in world tracking mode. The only time when you are provided with AVDepthData is when you are in face tracking mode using an iPhone X.