DSRecognizedTextLinesUnit
The DSRecognizedTextLinesUnit class represents an intermediate result unit containing recognized text lines. It inherits from the DSIntermediateResultUnit class.
Definition
Assembly: DynamsoftLabelRecognizer.xcframework
- Objective-C
- Swift
@interface DSRecognizedTextLinesUnit: DSIntermediateResultUnitclass RecognizedTextLinesUnit: IntermediateResultUnit
Inheritance: DSIntermediateResultUnit -> DSRecognizedTextLinesUnit
Methods
| Method | Description |
|---|---|
getRecognizedTextLines |
Get all the recognized text lines in an array of DSRecognizedTextLineElement. |
getCount |
Returns the number of text lines in this unit. |
getRecognizedTextLine |
Returns the text line at the specified index in a DSRecognizedTextLineElement object. |
removeAllRecognizedTextLines |
Removes all the recognized text lines from this unit. |
setRecognizedTextLine |
Sets the text line at the specified index. |
recognizedTextLines
All the recognized text lines of this unit in an array of DSRecognizedTextLineElement.
- Objective-C
- Swift
@property (nonatomic, nullable, copy) NSArray<DSRecognizedTextLineElement*>* recognizedTextLines;var recognizedTextLines: [RecognizedTextLineElement]? { get }
getRecognizedTextLines
Gets all the recognized text lines in an array of DSRecognizedTextLineElement.
- Objective-C
- Swift
- (NSArray<DSRecognizedTextLineElement*>*)getRecognizedTextLines;func getRecognizedTextLines() -> [RecognizedTextLineElement]?
Return value
All the recognized text lines in an array of DSRecognizedTextLineElement.
getCount
Returns the number of text lines in this unit.
- Objective-C
- Swift
- (NSInteger)getCount;func getCount() -> Int
Return value
The number of text lines in this unit.
getRecognizedTextLine
Returns the text line at the specified index in a DSRecognizedTextLineElement object.
- Objective-C
- Swift
- (nullable DSRecognizedTextLineElement*)getRecognizedTextLine:(NSInteger)index;func getRecognizedTextLine(_ index: Int) -> RecognizedTextLineElement?
Parameters
index: The index of the text line in this unit.
Return value
The text line at the specified index in a DSRecognizedTextLineElement object.
removeAllRecognizedTextLines
Removes all the recognized text lines from this unit.
- Objective-C
- Swift
- (void)removeAllRecognizedTextLines;func removeAllRecognizedTextLines()
setRecognizedTextLine
Sets the text line at the specified index in a DSRecognizedTextLineElement object.
- Objective-C
- Swift
- (NSInteger)setRecognizedTextLine:(DSRecognizedTextLineElement*)element matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setRecognizedTextLine(_ element: RecognizedTextLineElement, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
element: The DSRecognizedTextLineElement object to be set.
matrixToOriginalImage: The matrix to transform the original image.
Return value
Returns the ErrorCode if failed. Otherwise, returns 0.