MLKitTextRecognitionCommon Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MLKTextBlock
@interface MLKTextBlock : NSObject
A text block recognized in an image that consists of an array of text lines.
-
String representation of the text block that was recognized.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull text;
-
An array of text lines that make up the block.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<MLKTextLine *> *_Nonnull lines;
-
The rectangle that contains the text block 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 block. If no languages were recognized, the array is
empty.
-
The four corner points of the text block in clockwise order starting with the top left point
relative to the image in the default coordinate space. The NSValue
objects are CGPoint
s.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<NSValue *> *_Nonnull cornerPoints;
-
Declaration
Objective-C
- (nonnull instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`MLKTextBlock` represents a recognized text block from an image, containing an array of text lines."],["It provides access to the text content, individual lines, bounding box, recognized languages, and corner points of the block."],["The `frame` property defines the block's location and size within the image's coordinate space."],["`recognizedLanguages` offers information about the detected languages within the text block."],["Corner points of the text block are accessible via the `cornerPoints` property, useful for spatial understanding."]]],["`MLKTextBlock` represents a text block within an image. It provides a string representation (`text`) of the recognized text and an array of constituent text lines (`lines`). It also defines the bounding rectangle (`frame`) and corner points (`cornerPoints`) of the block within the image's coordinate space. Furthermore, it lists any detected languages (`recognizedLanguages`) present in the text. It has an unavailable init method.\n"]]