目录

class info
com.huawei.hms.mlsdk.imgseg.MLImageSegmentationSetting

Sets the image segmentation analyzer. Attributes of the analyzer MLImageSegmentationAnalyzer include: 

1. Detection mode. Two modes are supported: human body detection mode (default) and multiclass image detection mode.

2. Indicates whether fine detection is supported (for human body and multiclass image detection modes). This function is supported by default.

3. Supported results. By default, all results are returned.

Constant Summary

TypeNameDesc
intBODY_SEGDetection mode 0: detection based on the human body model
intIMAGE_SEGDetection mode 1: detection based on the multiclass image mode

Public Method Summary

Return typeMethod name
booleanequals(Object target)
intgetAnalyzerType()
intgetScene()
inthashCode()
booleanisExact()

Constants

Constant
public static final int BODY_SEG

Detection mode 0: detection based on the human body model.

Constant value: 0

Constant
public static final int IMAGE_SEG

Detection mode 1: detection based on the multiclass image mode.

Constant value: 1

Public Methods

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

Parameters

Parameter nameParameter desc
targetInstance to be compared.

Return

Typedesc
boolean

true: The instances are equal.

false: The instances are not equal.

Method
public int getAnalyzerType()
Obtains the detection mode.

Return

Typedesc
int

Returns the detection mode. 

0: BODE_SEG indicates the human body detection mode (supports distinguishing between the human body and background).

1: IMAGE_SEG indicates the multiclass image detection mode (supports classification of all objects in MLImageSegmentationClassification).

Method
public int getScene()
Obtains results to be returned. Choose only necessary results to be returned to reduce the processing time of unnecessary capabilities.

Return

Typedesc
int

0: all results.

1: pixel-level label information.

2: human body image with a transparent background.

Method
public int hashCode()
Obtains the hash value of the current instance.

Return

Typedesc
intHash value of the instance.
Method
public boolean isExact()
Checks whether fine detection is supported.

Return

Typedesc
booleanChecks whether fine detection is supported.true: yesfalse: no