MLKitObjectDetectionCommon 架構參考資料

MLKObject


@interface MLKObject : NSObject

在圖片中偵測到物件。

  • 這個矩形會將偵測到的物件與檢視畫面座標系統中的圖片相關。

    聲明

    Objective-C

    @property (nonatomic, readonly) CGRect frame;
  • 說明偵測工具傳回的物件的標籤陣列。如果偵測工具選項 shouldEnableClassification 設為 NO,則屬性為空白。

    聲明

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKObjectLabel *> *_Nonnull labels;
  • 偵測到物件的追蹤 ID。這個值是非負數的 integerValue。如果未提供追蹤 ID,則此值為 nil

    聲明

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *trackingID;
  • 無法使用,

    聲明

    Objective-C

    - (nonnull instancetype)init;