Page Summary
-
MLKTextBlockrepresents a recognized text block in an image, containing an array of text lines. -
It provides access to the recognized text, individual text lines, and the block's bounding box within the image.
-
Information about recognized languages and corner points of the text block are also available.
-
It's worth noting that the
MLKTextBlockinstance itself is not directly instantiable, likely created internally during text recognition.
TextBlock
class TextBlock : NSObjectA text block recognized in an image that consists of an array of text lines.
-
String representation of the text block that was recognized.
Declaration
Swift
var text: String { get } -
An array of text lines that make up the block.
Declaration
Swift
var lines: [MLKTextLine] { get } -
The rectangle that contains the text block relative to the image in the default coordinate space.
Declaration
Swift
var frame: CGRect { get } -
An array of recognized languages in the text block. If no languages were recognized, the array is empty.
Declaration
Swift
var recognizedLanguages: [MLKTextRecognizedLanguage] { get } -
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
NSValueobjects areCGPoints.Declaration
Swift
var cornerPoints: [NSValue] { get } -
Unavailable.