| 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. |
| Type | Name | Desc |
| String | ARC | Text bounding box that is a polygon. |
| String | NGON | Text bounding box that is a quadrilateral. |
| int | OCR_COMPACT_SCENE | Dense text type, such as user instructions. |
| int | OCR_LOOSE_SCENE | Sparse text type, such as business cards. |
| Return type | Method name |
| boolean | equals(Object object) |
| String | getBorderType() |
| List<String> | getLanguageList() |
| int | getTextDensityScene() |
| int | hashCode() |
| 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 |
| Method |
| public boolean equals(Object object) |
| Determines whether the input instance is equal to the current instance. |
Parameters
| Parameter name | Parameter desc |
| object | Instance to be compared. |
Return
| Type | desc |
| boolean | true: The instances are equal. false: The instances are not equal. |
| Method |
| public String getBorderType() |
| Obtains the type of the text bounding box. |
Return
| Type | desc |
| String | Returns 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
| Type | desc |
| 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
| Type | desc |
| int | Returns 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
| Type | desc |
| int | Returns the hash value of the instance. |