目录

class info
com.huawei.hms.mlsdk.classification.MLImageClassification

Represents the image classification detected by the image classification analyzer (MLImageClassificationAnalyzer). For details about the classification categories list, refer to HMS ML Kit Image Classification Categories.

Three attributes are included:

1. Classification ID
2. Classification name
3. Classification confidence

Public Method Summary

Return typeMethod name
booleanequals(Object object)
StringgetClassificationIdentity()
StringgetName()
floatgetPossibility()
inthashCode()

Public Methods

Method
public boolean equals(Object object)
Determines whether the input instance is equal to the current instance.
Parameter nameParameter desc
objectInstance to be compared.


Return

Typedesc
booleantrue: The instances are equal.
false: The instances are not equal.
Method
public String getClassificationIdentity()
Obtains the classification ID.

Return

Typedesc
StringReturns the classification ID, which is unique in an image.
Method
public String getName()
Obtains the classification name.

Return

Typedesc
StringReturns the classification name.
Method
public float getPossibility()
Obtains the classification confidence.

Return

Typedesc
floatReturns the classification confidence. Each classification detected has confidence. The value range is 0.0–1.0.
A higher confidence indicates a more accurate classification result.
Method
public int hashCode()
Obtains the hash value of the current instance.

Return

Typedesc
intHash value of the instance.