MLKitObjectDetectionCommon Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MLKObject
@interface MLKObject : NSObject
An 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 shouldEnableClassification
is set to NO
.
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 is nil
if no tracking ID was provided.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *trackingID;
-
Declaration
Objective-C
- (nonnull instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`MLKObject` represents an object detected within an image, providing information about its location and characteristics."],["It includes properties like `frame` for object's location, `labels` for descriptive information (if enabled), and `trackingID` for identifying objects across frames."],["The `frame` property defines a rectangle indicating the detected object's position relative to the image."],["`labels` property provides an array of descriptive labels, but only when classification is enabled during detection."],["`trackingID` offers a unique identifier for tracking the object over time, which can be null if tracking wasn't set up."]]],[]]