目录

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.

Public Method Summary

Return typeMethod name
android.graphics.RectgetBorder()
MLDocument.IntervalgetInterval()
ListgetLanguageList()
FloatgetPossibility()
StringgetStringValue()

Public Methods

Method
public android.graphics.Rect getBorder()
Obtains the text block bounding box.

Return

Typedesc
android.graphics.RectReturns the axis-aligned rectangle bounding box of the text block.
Method
public MLDocument.Interval getInterval()
Obtains the detected text interval.

Return

Typedesc
MLDocument.IntervalReturns the text interval.
Method
public List<text.TextLanguage> getLanguageList()
Obtains all detected languages.

Return

Typedesc
ListReturns the language list.
Method
public Float getPossibility()
Obtains the detection result confidence.

Return

Typedesc
FloatReturns 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

Typedesc
StringReturns the text content.