This package provides a text recognition component that recognizes text in images.
It contains the following classes:
MLRemoteTextSetting: Provides APIs for setting on-cloud analyzer parameters.
MLLocalTextSetting: Provides APIs for setting on-device analyzer parameters.
MLText: Provides APIs for obtaining text information in images.
MLTextAnalyzer: Provides APIs for creating analyzers that detect text in images.
| Class name | Class description |
| MLLocalTextSetting | Sets the on-device detection attributes of the text analyzer (MLTextAnalyzer) to call the on-device algorithm API for detecting text in an image. |
| MLLocalTextSetting.Factory | Creates an instance of the on-device text analysis configurator to set on-device text detection attributes. |
| MLRemoteTextSetting | Sets the on-cloud detection attributes of the text analyzer (MLTextAnalyzer) to call the cloud API for detecting text in an image. |
| MLRemoteTextSetting.Factory | Creates an instance of the on-cloud text analysis configurator to set on-cloud text detection attributes. |
| MLText | Represents the text information detected in an image. |
| MLText.Base | Represents the parent class of text information, which is the basic information about text detected in an image. Five attributes are included: 1. Detected text content. 2. Text bounding box. 3. Corner points of the text bounding box. 4. Confidence of the detection result. 5. All detected languages. |
| MLText.Block | Represents a text block detected in an image. Five attributes inherited from Base and text lines are included: 1. getStringValue(): Detected text content. 2. getBorder(): Text block bounding box. 3. getVertexes(): Corner points of the text block bounding box. 4. getPossibility(): Confidence of the detection result. 5. getLanguageList(): All detected languages. 6. getContents(): Text lines that compose the text block. |
| MLText.TextLine | Represents a text line detected in an image. Five attributes inherited from Base and words are included: 1. getStringValue(): Detected text content. 2. getBorder(): Text line bounding box. 3. getVertexes(): Corner points of the text line bounding box. 4. getPossibility(): Confidence of the detection result. 5. getLanguageList(): All detected languages. 6. getContents(): Words that compose the text line. |
| MLText.Word | Words detected in an image. Five attributes inherited from Base are included: 1. getStringValue(): Detected text content. 2. getBorder(): Word bounding box. 3. getVertexes(): Corner points of the word bounding box. 4. getPossibility(): Confidence of the detection result. 5. getLanguageList(): All detected languages. |
| MLTextAnalyzer | Represents the text analyzer, which detects text (MLText) in an image. |
| MLTextAnalyzer.Factory | Creates a text analyzer instance to detect text. Only on-device detection is supported. On-cloud detection is not supported. |
| TextLanguage | Represents the languages detected in an image. |