| class info |
| com.huawei.hms.mlsdk.text.MLRemoteTextSetting.Factory |
| Creates an instance of the on-cloud text analysis configurator to set on-cloud text detection attributes. |
| Constructor name |
| Factory() Creates an instance of the text analysis configurator. |
| Return type | Method name |
| MLRemoteTextSetting | create() |
| MLRemoteTextSetting.Factory | setBorderType(String borderType) |
| MLRemoteTextSetting.Factory | setLanguageList(List<String>languageList) |
| MLRemoteTextSetting.Factory | setTextDensityScene(int textType) |
| Method |
| public Factory() |
| Creates an instance of the text analysis configurator. |
| Method |
| public MLRemoteTextSetting create() |
| Creates an instance of the text analysis configurator. |
Return
| Type | desc |
| MLRemoteTextSetting | Returns the instance of the text analysis configurator MLRemoteTextSetting. |
Parameters
| Parameter name | Parameter desc |
| borderType | 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. |
Return
| Type | desc |
| MLRemoteTextSetting.Factory | MLRemoteTextSetting.Factory |
Parameters
| Parameter name | Parameter desc |
| languageList | Language code list. 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) |
Return
| Type | desc |
| MLRemoteTextSetting.Factory | MLRemoteTextSetting.Factory |
| Method |
| public MLRemoteTextSetting.Factory setTextDensityScene(int textType) |
| Sets the type of text to be detected. The analyzer calls an appropriate cloud API for text detection based on the text type. |
Parameters
| Parameter name | Parameter desc |
| textType | Type of text to be detected. 1: OCR_LOOSE_SCENE, indicating sparse text 2: OCR_COMPACT_SCENE, indicating dense text |
Return
| Type | desc |
| MLRemoteTextSetting.Factory | MLRemoteTextSetting.Factory instance. |