<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSemanticSegmentationMatte",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSemanticSegmentationMatte"
  },
  "title" : "AVSemanticSegmentationMatte"
}
-->

# AVSemanticSegmentationMatte

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

```
class AVSemanticSegmentationMatte
```

## Overview

The matting image stores its pixel data as <doc://com.apple.documentation/documentation/CoreVideo/cvpixelbuffer-q2e> objects in <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_OneComponent8> format. The image file contains the semantic segmentation matte as an auxiliary image, accessible using the ImageIO framework’s <doc://com.apple.documentation/documentation/ImageIO/CGImageSourceCopyAuxiliaryDataInfoAtIndex(_:_:_:)> function.

## Topics

### Creating a segmentation matte

[`init(fromImageSourceAuxiliaryDataType:dictionaryRepresentation:)`](/documentation/AVFoundation/AVSemanticSegmentationMatte/init(fromImageSourceAuxiliaryDataType:dictionaryRepresentation:))

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

[`replacingSemanticSegmentationMatte(with:)`](/documentation/AVFoundation/AVSemanticSegmentationMatte/replacingSemanticSegmentationMatte(with:))

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

[`applyingExifOrientation(_:)`](/documentation/AVFoundation/AVSemanticSegmentationMatte/applyingExifOrientation(_:))

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

[`dictionaryRepresentation(forAuxiliaryDataType:)`](/documentation/AVFoundation/AVSemanticSegmentationMatte/dictionaryRepresentation(forAuxiliaryDataType:))

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

### Inspecting a segmentation matte

[`matteType`](/documentation/AVFoundation/AVSemanticSegmentationMatte/matteType-swift.property)

The semantic segmentation matte image type.

[`AVSemanticSegmentationMatte.MatteType`](/documentation/AVFoundation/AVSemanticSegmentationMatte/MatteType-swift.struct)

A structure that defines the types of segmentation matte images that you can capture along with the primary image.

[`mattingImage`](/documentation/AVFoundation/AVSemanticSegmentationMatte/mattingImage)

The semantic segmentation matte’s internal image.

[`pixelFormatType`](/documentation/AVFoundation/AVSemanticSegmentationMatte/pixelFormatType)

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)