| class info |
| com.huawei.hms.mlsdk.document.MLDocument.Base |
Represents the parent class of document information, which is the basic document information detected in an image. Five attributes are included: 1. List of detected languages. 2. Text interval. 3. Corner points of the text bounding box. 4. Detected text content. 5. Confidence of the detection result. |
| Return type | Method name |
| android.graphics.Rect | getBorder() |
| MLDocument.Interval | getInterval() |
| List | getLanguageList() |
| Float | getPossibility() |
| String | getStringValue() |
| Method |
| public android.graphics.Rect getBorder() |
| Obtains the text block bounding box. |
Return
| Type | desc |
| android.graphics.Rect | Returns the axis-aligned rectangle bounding box of the text block. |
| Method |
| public MLDocument.Interval getInterval() |
| Obtains the detected text interval. |
Return
| Type | desc |
| MLDocument.Interval | Returns the text interval. |
| Method |
| public List<text.TextLanguage> getLanguageList() |
| Obtains all detected languages. |
Return
| Type | desc |
| List | Returns the language list. |
| Method |
| public Float getPossibility() |
| Obtains the detection result confidence. |
Return
| Type | desc |
| Float | Returns the confidence. The value range is 0.0–1.0. A higher confidence indicates a more accurate detection result. |
| Method |
| public String getStringValue() |
| Obtains the detected text content. |
Return
| Type | desc |
| String | Returns the text content. |