| class info |
| com.huawei.hms.mlsdk.imgseg.MLImageSegmentationSetting.Factory |
| Creates an instance of the image segmentation configurator to set image segmentation attributes. |
- MLImageSegmentationSetting settingoptions = new MLImageSegmentationSetting
- .Factory()
- .setExact(true)
- .setAnalyzerType(MLObjectAnalyzerSetting.BODY_SEGIMAGE_SEG)
- .setScene(MLImageSegmentationScene.ALL)
- .create();
| Return type | Method name |
| mlsdk.imgseg.MLImageSegmentationSetting | create() |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | setAnalyzerType(int analyzerType) |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | setExact(boolean isExact) |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | setScene(int scene) |
| Method |
| public mlsdk.imgseg.MLImageSegmentationSetting create() |
| Creates an instance of the image segmentation configurator. |
Return
| Type | desc |
| mlsdk.imgseg.MLImageSegmentationSetting | Returns an instance of the image segmentation configurator MLImageSegmentationSetting. |
Parameters
| Parameter name | Parameter desc |
| analyzerType | Classification mode.MLImageSegmentationSetting.BODY_SEG(0): human body segmentationMLImageSegmentationSetting.IMAGE_SEG(1): multiclass image segmentation |
Return
| Type | desc |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | Returns the image segmentation analyzer of a specified classification mode. |
| Method |
| public mlsdk.imgseg.MLImageSegmentationSetting.Factory setExact(boolean isExact) |
| Determines whether to support fine detection. |
Parameters
| Parameter name | Parameter desc |
| isExact | Indicates whether to support fine segmentation. true: yes false: no (fast segmentation) |
Return
| Type | desc |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | Returns the image segmentation analyzer of the specified fine detection setting. |
Parameters
| Parameter name | Parameter desc |
| scene | Type of the returned result.MLImageSegmentationScene.ALL(0): all segmentation results, including the pixel-level label information, human body image with a transparent background, and gray-scale image with a white human body and black backgroundMLImageSegmentationScene.MASK_ONLY(1): pixel-level label informationMLImageSegmentationScene.FOREGROUND_ONLY(2): human body image with a transparent backgroundMLImageSegmentationScene.GRAYSCALE_ONLY(3): gray-scale image with a white human body and black background |
Return
| Type | desc |
| mlsdk.imgseg.MLImageSegmentationSetting.Factory | Returns the image segmentation analyzer of a specified scenario. |