Class

ARMatteGenerator

An object that creates matte textures you use to occlude your app's virtual content with people, that ARKit recognizes in the camera feed.

Declaration

@interface ARMatteGenerator : NSObject

Overview

Use this class when you want full control over occluding your app's virtual content, based on people ARKit recognizes in the camera feed.

To assist your custom renderer with people occlusion, matte generator processes alpha and depth information in a frame's segmentationBuffer and estimatedDepthData to provide you with matte and depth textures. You use these textures to layer people on top of your app's virtual content.

Topics

Creating a Matte Generator

- initWithDevice:matteResolution:

Creates an AR matte generator.

Creating an Alpha Matte Texture

- generateMatteFromFrame:commandBuffer:

Generates alpha matte at either full resolution or half the resolution of the captured image.

Creating a Depth Texture

- generateDilatedDepthFromFrame:commandBuffer:

Generates dilated depth at the resolution of the segmentation stencil.

Controlling Resolution

ARMatteResolution

A resolution for a matte texture.

Relationships

Inherits From

See Also

Custom Display

Displaying an AR Experience with Metal

Control rendering of your app's virtual content on top of a camera feed.

Effecting People Occlusion in Custom Renderers

Occlude your app’s virtual content where ARKit recognizes people in the camera feed by using matte generator.