FIRVisionTextLine


@interface FIRVisionTextLine : NSObject

A text line recognized in an image that consists of an array of elements.

  • String representation of the text line that was recognized.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull text;
  • An array of text elements that make up the line.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSArray<FIRVisionTextElement *> *_Nonnull elements;
  • The rectangle that contains the text line relative to the image in the default coordinate space.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGRect frame;
  • The four corner points of the text line in clockwise order starting with the top left point relative to the image in the default coordinate space. The NSValue objects are CGPoints.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSArray<NSValue *> *_Nonnull cornerPoints;
  • An array of recognized languages in the text line. On-device text recognizers only detect Latin-based languages, while cloud text recognizers can detect multiple languages. If no languages are recognized, the array is empty.

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    - (nonnull instancetype)init;