FIRVisionImageLabel.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import <CoreGraphics/CoreGraphics.h>
  2. #import <Foundation/Foundation.h>
  3. NS_ASSUME_NONNULL_BEGIN
  4. /**
  5. * Represents a label for an image.
  6. */
  7. NS_SWIFT_NAME(VisionImageLabel)
  8. @interface FIRVisionImageLabel : NSObject
  9. /**
  10. * The human readable label text in American English. For example: "Balloon".
  11. *
  12. * @discussion This string is not fit for display purposes, as it is not localized. Use the
  13. * `entityID` and query the Knowledge Graph to get a localized description of the label text.
  14. */
  15. @property(nonatomic, copy, readonly) NSString *text;
  16. /**
  17. * Confidence for the label in range [0, 1]. The value is a `floatValue`.
  18. */
  19. @property(nonatomic, readonly, nullable) NSNumber *confidence;
  20. /**
  21. * Opaque entity ID used to query the Knowledge Graph to get a localized description of the label
  22. * text. Some IDs may be available in [Google Knowledge Graph Search API]
  23. * (https://developers.google.com/knowledge-graph/).
  24. */
  25. @property(nonatomic, copy, readonly, nullable) NSString *entityID;
  26. /**
  27. * Unavailable.
  28. */
  29. - (instancetype)init NS_UNAVAILABLE;
  30. @end
  31. NS_ASSUME_NONNULL_END