MLKitObjectDetectionCommon Framework Reference

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;
  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;