Contents

generateMaskedImage(ofInstances:from:croppedToInstancesExtent:)

Creates a high-resolution image where everything becomes transparent black, except for the instances you specify.

Declaration

func generateMaskedImage(ofInstances instances: IndexSet, from requestHandler: VNImageRequestHandler, croppedToInstancesExtent cropResult: Bool) throws -> CVPixelBuffer

Parameters

  • instances:

    The collection of instances.

  • requestHandler:

    The image request callback.

  • cropResult:

    A Boolean value that indicates whether to crop the image to the smallest rectangle that contains all instances.

Return Value

The pixel buffer that contains the image.

See Also

Creating a Mask