目录

class info
com.huawei.hms.mlsdk.text.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.

Public Method Summary

Return typeMethod name
List< MLText.Word >getContents()
floatgetRotatingDegree()
booleanisVertical()

Public Methods

Method
public synchronized List< MLText.Word > getContents()
Obtains the words in a text line.

Return

Typedesc
List< MLText.Word >Returns all words in a text line.
Method
public float getRotatingDegree()
Obtains the roll angle of the current text line relative to the horizontal position.
Using the upper-left corner of the text line bounding box as the origin,
a clockwise roll angle is positive and a counterclockwise roll angle is negative.

Return

Typedesc
floatReturns the angle.
Range: [–45°,45°]
Method
public boolean isVertical()
Determines whether the text in the current text line is in a vertical layout.

Return

Typedesc
booleantrue: vertical layout
false: horizontal layout