Roughly equivalent to a space-separated "word" in most Latin languages, or a character in others. For instance, if a word is split between two lines by a hyphen, each part is encoded as a separate Element.
Public Method Summary
Rect |
getBoundingBox()
Axis-aligned bounding box containing the text.
|
List<? extends Text> |
getComponents()
This class is the bottom of the tree, so this function always returns an empty
list as it has no components.
|
Point[] |
getCornerPoints()
Four corner points in clockwise direction starting with top-left.
|
String |
getLanguage()
Prevailing language in the text, if any.
|
String |
getValue()
Retrieve the recognized text as a string.
|
Inherited Method Summary
Public Methods
public Rect getBoundingBox ()
Axis-aligned bounding box containing the text. The bounding box may extend past the image boundary.
public List<? extends Text> getComponents ()
This class is the bottom of the tree, so this function always returns an empty list as it has no components.
public Point[] getCornerPoints ()
Four corner points in clockwise direction starting with top-left. Due to the possible perspective distortions, this is not necessarily a rectangle. Parts of the region could be outside of the image.
public String getLanguage ()
Prevailing language in the text, if any. The format is in BCP47 (e.g. "en" or "sr-Latn-BA") or "und" if the language could not be determined.
public String getValue ()
Retrieve the recognized text as a string. Returned in reading order for the language. For Latin, this is top to bottom within a TextBlock, and left-to-right within Lines.