class Segmenter : NSObject
A detector that performs segmentation on input images.
Returns a segmenter with the given options.
class func segmenter(options: MLKCommonSegmenterOptions) -> Self
Options for configuring the segmenter.
A segmenter configured with the given options.
Unavailable. Use the class methods.
Processes the given image for segmentation.
func process(_ image: MLKVisionImage, completion: @escaping SegmentationCallback)
The image to process.
Handler to call back on the main thread with the segmentation mask or error.
Returns the segmentation mask in the given image or
nilif there was an error. The segmentation is performed synchronously on the calling thread.
It is advised to call this method off the main thread to avoid blocking the UI. As a result, an
NSExceptionis raised if this method is called on the main thread.
func results(in image: MLKVisionImage) throws -> MLKSegmentationMask
The image to get results in.
An optional error parameter populated when there is an error getting results.
The segmentation mask in the given image or
nilif there was an error.