Stay organized with collections
Save and categorize content based on your preferences.
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.
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.
The value is only valid for on-device text recognition.
Gets 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 a
Line.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-08-08 UTC."],[],[],null,["# FirebaseVisionText.Element\n\npublic static class **FirebaseVisionText.Element** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nRoughly equivalent to a space-separated \"word\" in most Latin languages, or a character in\nothers. For instance, if a word is split between two lines by a hyphen, each part is encoded\nas a separate Element. \n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Rect](//developer.android.com/reference/android/graphics/Rect.html) | [getBoundingBox](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionText.Element#getBoundingBox())() Returns the axis-aligned bounding rectangle of the detected text. |\n| [Float](//developer.android.com/reference/java/lang/Float.html) | [getConfidence](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionText.Element#getConfidence())() The confidence of the recognized text. |\n| [Point\\[\\]](//developer.android.com/reference/android/graphics/Point.html) | [getCornerPoints](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionText.Element#getCornerPoints())() Gets the four corner points in clockwise direction starting with top-left. |\n| [List](//developer.android.com/reference/java/util/List.html)\\\u003c[RecognizedLanguage](/docs/reference/android/com/google/firebase/ml/vision/text/RecognizedLanguage)\\\u003e | [getRecognizedLanguages](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionText.Element#getRecognizedLanguages())() Gets a list of recognized languages together with confidence. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getText](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionText.Element#getText())() Gets the recognized text as a string. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [Rect](//developer.android.com/reference/android/graphics/Rect.html) **getBoundingBox** ()\n\nReturns the axis-aligned bounding rectangle of the detected text. \n\n#### public [Float](//developer.android.com/reference/java/lang/Float.html) **getConfidence** ()\n\nThe confidence of the recognized text.\n\nThe value is returned only for cloud recognizers that are configured with\n[DENSE_MODEL](/docs/reference/android/com/google/firebase/ml/vision/text/FirebaseVisionCloudTextRecognizerOptions#DENSE_MODEL). \n\n#### public [Point\\[\\]](//developer.android.com/reference/android/graphics/Point.html)\n**getCornerPoints** ()\n\nGets the four corner points in clockwise direction starting with top-left. Due to\nthe possible perspective distortions, this is not necessarily a rectangle. Parts of the\nregion could be outside of the image.\n\nThe value is only valid for on-device text recognition. \n\n#### public [List](//developer.android.com/reference/java/util/List.html)\\\u003c[RecognizedLanguage](/docs/reference/android/com/google/firebase/ml/vision/text/RecognizedLanguage)\\\u003e\n**getRecognizedLanguages** ()\n\nGets a list of recognized languages together with confidence. (Cloud API only.) \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getText** ()\n\nGets the recognized text as a string. Returned in reading order for the language.\nFor Latin, this is top to bottom within a TextBlock, and left-to-right within a\nLine.\n\nReturns an empty string if nothing is found."]]