FIRVisionObject


@interface FIRVisionObject : NSObject

An object detected in an image.

  • The rectangle that holds the discovered object relative to the detected image in the view’s coordinate system.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGRect frame;
  • The category of the object returned by the classifier. The property returns .unknown if the detector option shouldEnableClassification is set to NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) FIRVisionObjectCategory classificationCategory;
  • The tracking identifier of the vision object. The value is a non-negative integerValue. The value is nil if no tracking ID was provided.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSNumber *trackingID;
  • Opaque entity ID used to query the Google Knowledge Graph Search API to get a localized description of the label. For example: /g/11g0srrsqr represents Fashion good. If the object is not classified, the value returned is a generic object category in the graph. The value is nil if the entity ID was not provided.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *entityID;
  • The label associated with the object, i.e. human readable string in American English. For example: Fashion good. The value is nil if the label was not provided.

    Note: this is not fit for display purposes, as it is not localized. Use entityID and query the Knowledge Graph to get a localized description of the label.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *label;
  • The probability confidence for the vision object in range from 0 to 1. The value is a floatValue. The value is nil if the object is detected, but a valid confidence was not provided.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSNumber *confidence;
  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;