目录

class info
com.huawei.hms.mlsdk.common.MLAnalyzer.Result
Represents a detection result,encapsulation class,including :

1.the detection results

2.image metadata
3.availability of the encapsulated data

Public Constructor Summary

Constructor name
Result(android.util.SparseArray<T> analyseList, MLFrame.Property frameProperty, boolean isAnalyzerAvailable)
Instantiates a class for encapsulating detection results.

Public Method Summary

Return typeMethod name
android.util.SparseArray<T>getAnalyseList()
MLFrame.PropertygetFrameProperty()
booleanisAnalyzerAvaliable()

Public Constructors

Method
public Result(android.util.SparseArray<T> analyseList, MLFrame.Property frameProperty, boolean isAnalyzerAvailable)
Instantiates a class for encapsulating detection results.

Parameters

Parameter nameParameter desc
analyseListOriginal detection result list obtained by an analyzer.
framePropertyImage metadata, including the image width and height.
isAnalyzerAvailableIndicates whether the encapsulated data is available.

Public Methods

Method
public android.util.SparseArray<T> getAnalyseList()
Obtains the detection result list.

Return

Typedesc
android.util.SparseArray<T>Detection result list, for example, SparseArray<MLFace>.
Method
public MLFrame.Property getFrameProperty()
Obtains image metadata.

Return

Typedesc
MLFrame.PropertyImage metadata, including the image width and height.
Method
public boolean isAnalyzerAvaliable()
Checks whether the encapsulated data is available.

Return

Typedesc
booleantrue: encapsulated data available
false: encapsulated data unavailable