Contents

ImageAnalysisInteraction.Subject

An area of interest in an image that the framework identifies as a primary focal point.

Declaration

struct Subject

Overview

A subject is a foreground object in an image. A single image can have multiple subjects. For example, in an image of three different coffee mugs, the framework may classify all three mugs as separate subjects. In cases where the framework can’t separate overlapping objects in a photo as individual subjects, a subject may consist of two or more objects.

VisionKit enables your app to extract, or lift, the image subjects individually, or together, with the background removed. For more information, see image.

An ImageAnalysisInteraction object contains an array of subjects (subjects) that activates when preferredInteractionTypes contains a subject-related option, such as automatic, or imageSubject.

Your app can also present a button that gives more information on an image’s subjects by enabling the visualLookUp interaction type.

Topics

Acquiring the subject image

Locating and sizing the subject

Serializing a subject

See Also

Accessing image subjects