Contents

generateScaledMask(for:scaledToImageFrom:)

Creates a high-resolution mask representing a combination of the instances you specify.

Declaration

func generateScaledMask(for instances: IndexSet, scaledToImageFrom requestHandler: ImageRequestHandler) throws -> CVPixelBuffer

Parameters

  • instances:

    An indexed set of selected instances, where 0 is the background.

  • requestHandler:

    A request handler containing an image to be masked.

Return Value

The pixel buffer that contains the mask.

See Also

Generating a mask