MLKitObjectDetectionCommon Framework Reference

  • 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, and trackingID for identification across frames.

  • The labels property might be empty if object classification is disabled during detection.

  • trackingID is optional and could be nil if tracking was not enabled or not possible for the object.

Object

class Object : 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

    Swift

    var frame: CGRect { get }
  • 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

    Swift

    var labels: [MLKObjectLabel] { get }
  • 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

    Swift

    var trackingID: NSNumber? { get }
  • Unavailable.