| class info |
| com.huawei.hms.mlsdk.text.MLLocalTextSetting |
| Sets the on-device detection attributes of the text analyzer (MLTextAnalyzer) to call the on-device algorithm 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-device detection mode: independent detection mode or tracking mode |
| Type | Name | Desc |
| int | OCR_DETECT_MODE | Independent detection mode. Each supplied image is detected independently. This mode applies to single image detection. |
| int | OCR_TRACKING_MODE | Tracking mode. The detection result of the preceding frame is used as the basis to quickly detect the text position in the image. This mode applies to video stream text detection. |
| Return type | Method name |
| boolean | equals(Object object) |
| String | getLanguage() |
| int | getOCRMode() |
| int | hashCode() |
| Constant |
| public static final int OCR_DETECT_MODE |
| Independent detection mode. Each supplied image is detected independently. This mode applies to single image detection. |
| 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 getLanguage() |
| Obtains the languages preset in the text analyzer. |
Return
| Type | desc |
| 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), and es (Spanish) |
| Method |
| public int getOCRMode() |
| Obtains the detection mode. |
Return
| Type | desc |
| int | Returns the detection mode. 1: OCR_DETECT_MODE, indicating the independent detection mode 2: OCR_TRACKING_MODE, indicating the tracking mode |
| Method |
| public int hashCode() |
| Obtains the hash value of the current instance. |
Return
| Type | desc |
| int | Returns the hash value of the instance. |