A capture output that records scene depth information on compatible camera devices.


@interface AVCaptureDepthDataOutput : AVCaptureOutput


This out captures AVDepthData objects containing per-pixel depth or disparity information, following a streaming delivery model similar to that used by AVCaptureVideoDataOutput. Alternatively, you can capture depth data alongside photos using AVCapturePhotoOutput (see the AVCapturePhotoSettings depthDataDeliveryEnabled property).

A depth data output always provides depth data in the format expressed by the source AVCaptureDevice object’s activeDepthDataFormat property. If you wish to receive depth data in another format, choose a new value for that property from those listed in the supportedDepthDataFormats array of the device's activeFormat object.


Creating a Depth Data Output

- init

Initializes a depth data output object.

+ new

Creates a depth data output object.

Configuring Depth Data Capture


A Boolean value that determines whether the capture output should discard any depth data that is not processed before the next depth data is captured.


A Boolean value that determines whether the depth data output should filter depth data to smooth out noise and fill invalid values.

Receiving Captured Depth Data

- setDelegate:callbackQueue:

Designates a delegate object to receive depth data and a dispatch queue for delivering that data.


A delegate object that receives depth data.


A dispatch queue for delivering depth data.


Methods for receiving depth data produced by a depth capture output.


Inherits From

See Also

Depth Data Capture

Capturing Photos with Depth

Get a depth map with a photo to create effects like the system camera’s Portrait mode (on compatible devices).

AVCamFilter: Applying Filters to a Capture Stream

Render a capture stream with rose-colored filtering and depth effects.

Streaming Depth Data from the TrueDepth Camera

Visualize depth data in 2D and 3D from the TrueDepth camera.


A container for per-pixel distance or disparity information captured by compatible camera devices.


An auxiliary image used to separate foreground from background with high resolution.


An object that wraps a matting image for a particular semantic segmentation.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software