RecognizedTextLinesUnit
The RecognizedTextLinesUnit
class represents an intermediate result unit containing recognized text lines. It inherits from the IntermediateResultUnit class.
Definition
Namespace: com.dynamsoft.dlr.intermediate_results
Assembly: DynamsoftLabelRecognizer.aar
class RecognizedTextLinesUnit extends IntermediateResultUnit
Inheritance: IntermediateResultUnit -> RecognizedTextLinesUnit
Methods
Method | Description |
---|---|
addRecognizedTextLine |
Adds a recognized text line. |
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. |
removeRecognizedTextLine |
Removes the recognized text line at the specified index. |
setRecognizedTextLine(index, element, matrixToOriginalImage) |
Sets the recognized text line at the specified index. |
setRecognizedTextLine(element, matrixToOriginalImage) |
Sets the recognized text line at the specified index. |
AddRecognizedTextLine
Adds a recognized text line.
int addRecognizedTextLine(RecognizedTextLineElement element, Matrix matrixToOriginalImage);
Parameters
element
: The RecognizedTextLineElement
object to be added.
matrixToOriginalImage
: The matrix to transform the original image.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getRecognizedTextLines
Gets all the recognized text lines of this unit in an array of RecognizedTextLineElement
.
RecognizedTextLineElement[] getRecognizedTextLines();
Return value
An array of RecognizedTextLineElement
that contains all recognized text line of this unit.
getCount
Gets the number of recognized text lines in this unit.
int getCount();
Return value
The number of recognized text lines in this unit.
getRecognizedTextLine
Gets the recognized text line at the specified index in a RecognizedTextLineElement
object.
RecognizedTextLineElement getRecognizedTextLine(int index);
Parameters
index
: The index of the recognized text line in this unit.
Return value
The recognized text line at the specified index in a RecognizedTextLineElement
object.
removeAllRecognizedTextLines
Removes all the recognized text lines from the unit.
void removeAllRecognizedTextLines();
removeRecognizedTextLine
Removes the RecognizedTextLineElement
at the specified index.
int removeRecognizedTextLine(int index);
Parameters
index
: The index of the recognized text line to remove.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.
setRecognizedTextLine(index, element, matrixToOriginalImage)
Sets the recognized text line at the specified index in a RecognizedTextLineElement
object.
int setRecognizedTextLine(int index, RecognizedTextLineElement element, Matrix matrixToOriginalImage);
Parameters
index
: The index of the recognized text line to set.
element
: The RecognizedTextLineElement
object to be set.
matrixToOriginalImage
: The matrix to the original image.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.
setRecognizedTextLine(element, matrixToOriginalImage)
This method is deprecated.
Sets the recognized text line at the specified index in a RecognizedTextLineElement
object.
int setRecognizedTextLine(RecognizedTextLineElement element, Matrix matrixToOriginalImage);
Parameters
element
: The RecognizedTextLineElement
object to be set.
matrixToOriginalImage
: The matrix to the original image.
Return value
Returns the ErrorCode
if failed. Otherwise, returns 0.