<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCapturePhoto/semanticSegmentationMatte(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCapturePhoto(im)semanticSegmentationMatteForType:"
  },
  "title" : "semanticSegmentationMatte(for:)"
}
-->

# semanticSegmentationMatte(for:)

Retrieves the semantic segmentation matte associated with this photo.

```
func semanticSegmentationMatte(for semanticSegmentationMatteType: AVSemanticSegmentationMatte.MatteType) -> AVSemanticSegmentationMatte?
```

## Parameters

`semanticSegmentationMatteType`

The type of semantic segmentation matte to retrieve from the photo.

## Return Value

An instance of [`AVSemanticSegmentationMatte`](/documentation/AVFoundation/AVSemanticSegmentationMatte), or `nil` of you didn’t request semantic segmentation matte delivery or if no mattes of the specified type were found.

## Discussion

If you requested one or more semantic segmentation mattes by calling [`enabledSemanticSegmentationMatteTypes`](/documentation/AVFoundation/AVCapturePhotoSettings/enabledSemanticSegmentationMatteTypes) with a nonempty array of types, this property offers access to the resulting [`AVSemanticSegmentationMatte`](/documentation/AVFoundation/AVSemanticSegmentationMatte) objects.

> Note:
> Semantic segmentation mattes are only embedded in the photo’s internal file format container if you set ``doc://com.apple.avfoundation/documentation/AVFoundation/AVCapturePhotoSettings/embedsSemanticSegmentationMattesInPhoto`` to <doc://com.apple.documentation/documentation/Swift/true>.

---

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)