FirebaseVisionText.Element

public static class FirebaseVisionText.Element extends Object

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()
Returns the axis-aligned bounding rectangle of the detected text.
Point[]
getCornerPoints()
Gets the four corner points in clockwise direction starting with top-left.
String
getText()
Gets the recognized text as a string.

Inherited Method Summary

Public Methods

public Rect getBoundingBox ()

Returns the axis-aligned bounding rectangle of the detected text.

public Point[] getCornerPoints ()

Gets the 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 getText ()

Gets the recognized text as a string. Returned in reading order for the language. For Latin, this is top to bottom within a Block, and left-to-right within a Line.

Returns an empty string if nothing is found.

Send feedback about...

Need help? Visit our support page.