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


@interface AVSemanticSegmentationMatte : NSObject


The matting image stores its pixel data as CVPixelBuffer objects in kCVPixelFormatType_OneComponent8 format. The image file contains the semantic segmentation matte as an auxiliary image, accessible using the ImageIO framework’s CGImageSourceCopyAuxiliaryDataInfoAtIndex function.


Creating a Segmentation Matte

+ semanticSegmentationMatteFromImageSourceAuxiliaryDataType:dictionaryRepresentation:error:

Returns a new semantic segmentation matte instance from auxiliary image information in an image file.

- semanticSegmentationMatteByReplacingSemanticSegmentationMatteWithPixelBuffer:error:

Returns a semantic segmentation matte instance that wraps the replacement pixel buffer.

- semanticSegmentationMatteByApplyingExifOrientation:

Returns a new semantic segmentation matte instance with the specified Exif orientation applied.

- dictionaryRepresentationForAuxiliaryDataType:

Returns a dictionary of primitive map information to use when writing an image file with a semantic segmentation matte.

Inspecting a Segmentation Matte


The semantic segmentation matte image type.


String constants defining the types of segmentation matte images that you can capture along with the primary image.


The semantic segmentation matte’s internal image.


The pixel format type for this object’s internal matting image.


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 capture output that records scene depth information on compatible camera devices.


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.