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 -> CVPixelBufferParameters
- 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.