MLKitObjectDetectionCommon 框架参考

MLKObject


@interface MLKObject : NSObject

在图片中检测到对象。

  • 矩形,用于存放检测到的对象(相对于视图坐标系中的图片)。

    声明

    Objective-C

    @property (nonatomic, readonly) CGRect frame;
  • 描述检测器所返回对象的标签数组。如果检测器选项 shouldEnableClassification 设置为 NO,则此属性为空。

    声明

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKObjectLabel *> *_Nonnull labels;
  • 检测到的对象的跟踪标识符。该值为非负 integerValue。如果未提供跟踪 ID,则值为 nil

    声明

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *trackingID;
  • 不可用。

    声明

    Objective-C

    - (nonnull instancetype)init;