MLKTextBlock
@interface MLKTextBlock : NSObject
在图片中识别出的文本块,由一组文本行组成。
-
识别出的文本块的字符串表示法。
声明
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull text;
-
构成块的一系列文本行。
声明
Objective-C
@property (nonatomic, readonly) NSArray<MLKTextLine *> *_Nonnull lines;
-
包含文本块的矩形(相对于默认坐标空间中的图片)。
声明
Objective-C
@property (nonatomic, readonly) CGRect frame;
-
文本块中已识别语言的数组。如果未识别出任何语言,则数组为 为空。
声明
Objective-C
@property (nonatomic, readonly) NSArray<MLKTextRecognizedLanguage *> *_Nonnull recognizedLanguages;
-
文本块的四个角点(按顺时针顺序,从左上角点开始) 相对于图像在默认坐标空间中的相对位置。
NSValue
对象是CGPoint
。声明
Objective-C
@property (nonatomic, readonly) NSArray<NSValue *> *_Nonnull cornerPoints;
-
不可用。
声明
Objective-C
- (nonnull instancetype)init;