AI-generated Key Takeaways
-
MLKObjectrepresents an object detected within an image, providing information about its location and characteristics. -
It includes properties like
framefor object's location,labelsfor descriptive information (if enabled), andtrackingIDfor identifying objects across frames. -
The
frameproperty defines a rectangle indicating the detected object's position relative to the image. -
labelsproperty provides an array of descriptive labels, but only when classification is enabled during detection. -
trackingIDoffers a unique identifier for tracking the object over time, which can be null if tracking wasn't set up.
MLKObject
@interface MLKObject : NSObjectAn object detected in an image.
-
The rectangle that holds the detected object relative to the image in the view’s coordinate system.
Declaration
Objective-C
@property (nonatomic, readonly) CGRect frame; -
An array of labels describing the object returned by the detector. The property is empty if the detector option
shouldEnableClassificationis set toNO.Declaration
Objective-C
@property (nonatomic, readonly) NSArray<MLKObjectLabel *> *_Nonnull labels; -
The tracking identifier of the detected object. The value is a non-negative
integerValue. The value isnilif no tracking ID was provided.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *trackingID; -
Unavailable.
Declaration
Objective-C
- (nonnull instancetype)init;