---
title: "semanticSegmentationMatte(for:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturephoto/semanticsegmentationmatte(for:)"
---

# semanticSegmentationMatte(for:)

Retrieves the semantic segmentation matte associated with this photo.

## Declaration

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

## Parameters

- `semanticSegmentationMatteType`: The type of semantic segmentation matte to retrieve from the photo.

## Return Value

Return Value An instance of AVSemanticSegmentationMatte, or nil of you didn’t request semantic segmentation matte delivery or if no mattes of the specified type were found.

## Discussion

Discussion If you requested one or more semantic segmentation mattes by calling enabledSemanticSegmentationMatteTypes with a nonempty array of types, this property offers access to the resulting AVSemanticSegmentationMatte objects. note: Semantic segmentation mattes are only embedded in the photo’s internal file format container if you set embedsSemanticSegmentationMattesInPhoto to true.
