目录

class info
com.huawei.hms.mlsdk.text.MLRemoteTextSetting
Sets the on-cloud detection attributes of the text analyzer (MLTextAnalyzer) to call the cloud API for detecting text in an image.The analyzer attributes include:
1. Preset languages. Set languages for the analyzer correctly to ensure fast and accurate detection.
2. On-cloud detection mode: sparse text detection or dense text detection. The analyzer calls the cloud API for text detection according to the detection mode.
3. Whether to enable certificate fingerprint verification. If this parameter is set to true, only registered apps that pass the verification are allowed to access the cloud API for text detection.
4. Type of the text bounding box. The value can be NGON or ARC.
NGON: Returns the coordinates of the four corner points of the text bounding box that is a quadrilateral.
ARC: Returns the coordinates of up to 72 corner points of the text bounding box that is a polygon for text in a curved layout.

Constant Summary

TypeNameDesc
StringARCText bounding box that is a polygon.
StringNGONText bounding box that is a quadrilateral.
intOCR_COMPACT_SCENEDense text type, such as user instructions.
intOCR_LOOSE_SCENESparse text type, such as business cards.

Public Method Summary

Return typeMethod name
booleanequals(Object object)
StringgetBorderType()
List<String>getLanguageList()
intgetTextDensityScene()
inthashCode()

Constants

Constant
public static final String ARC
Text bounding box that is a polygon.
Constant value: “ARC”
Constant
public static final String NGON
Text bounding box that is a quadrilateral.
Constant value: “NGON”
Constant
public static final int OCR_COMPACT_SCENE
Dense text type, such as user instructions.
Constant value: 2
Constant
public static final int OCR_LOOSE_SCENE
Sparse text type, such as business cards.
Constant value: 1

Public Methods

Method
public boolean equals(Object object)
Determines whether the input instance is equal to the current instance.

Parameters

Parameter nameParameter desc
objectInstance to be compared.


Return

Typedesc
booleantrue: The instances are equal.
false: The instances are not equal.
Method
public String getBorderType()
Obtains the type of the text bounding box.

Return

Typedesc
StringReturns the type of the text bounding box.
NGON: Returns the coordinates of the four corner points of the text bounding box that
is a quadrilateral.
ARC: Returns the coordinates of up to 72 corner points of the text bounding box that is
a polygon for text in a curved layout.
Method
public List<String> getLanguageList()
Obtains the preset languages.

Return

Typedesc
List<String>Returns a list of language codes.
Supported languages: en (English), zh (Chinese), ja (Japanese), ko (Korean), ru (Russian), de (German),
fr (French), it (Italian), pt (Portuguese), es (Spanish), pl (Polish), no (Norwegian), sv (Swedish),
da (Danish), tr (Turkish), fi (Finnish), th (Thai), ar (Arabic), and hi (Hindi)
Method
public int getTextDensityScene()
Obtains the detection mode.

Return

Typedesc
intReturns the detection mode.
1: OCR_LOOSE_SCENE, indicating the sparse text mode
2: OCR_COMPACT_SCENE, indicating the dense text mode
Method
public int hashCode()
Obtains the hash value of the current instance.

Return

Typedesc
intReturns the hash value of the instance.