FirebaseMLVision Framework Reference

FIRVisionTextElement


@interface FIRVisionTextElement : NSObject

A text element recognized in an image. A text element is roughly equivalent to a space-separated word in most Latin-script languages.

  • String representation of the text element that was recognized.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull text;
  • The rectangle that contains the text element relative to the image in the default coordinate space.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGRect frame;
  • An array of recognized languages in the text element. (Cloud API only.)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<FIRVisionTextRecognizedLanguage *> *_Nonnull recognizedLanguages;
  • The four corner points of the text element in clockwise order starting with the top left point relative to the image in the default coordinate space. The NSValue objects are CGPoints. For cloud text recognizers, the array is nil.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray<NSValue *> *cornerPoints;
  • The confidence of the recognized text element. The value is nil for all text recognizers except for cloud text recognizers with model type VisionCloudTextModelType.dense.

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    - (nonnull instancetype)init;