目录

class info
com.huawei.hms.mlsdk.common.MLProminentTransactor
Represents an abstract class of the processor for processing detection results of a specific object. The class implements the following functions:
1. Sets an object to be tracked and automatically adjusts the processing logic in the object tracker when the object status changes in consecutive frames.
2. Compares whether objects detected from consecutive frames are the same. The maximum area, width, and height can be set for comparison.

Public Constructor Summary

Constructor name
MLProminentTransactor(MLAnalyzer<T> analyzer, MLResultTrailer<T> trailer)
Instantiates a ConcentrateTransactor object.

Public Method Summary

Return typeMethod name
booleancompare(Object target1, Object target2)
voiddestroy()
intgetSpecificTarget(MLAnalyzer.Result<T> result)
voidtransactResult(MLAnalyzer.Result<T> result)

Protected Method Summary

Return typeMethod name
voidsetMaxFrameLostCount(int maxFrameLostCount)

Public Constructors

Method
public MLProminentTransactor(MLAnalyzer<T> analyzer, MLResultTrailer<T> trailer)
Instantiates a ConcentrateTransactor object.

Parameters

Parameter nameParameter desc
analyzerAnalyzer instance
trailerTracker instance

Public Methods

Method
public boolean compare(Object target1, Object target2)
Specifies the matching policy of consecutive frames for the same analysis object. The default value is false. Developers can reload this to implement their own matching policy.

Parameters

Parameter nameParameter desc
target1Detected object 1
target2Detected object 2


Return

Typedesc
booleantrue: same object
false: different objects
Method
public void destroy()
Releases resources used by a processor by calling the completeCallback() method of a trailer class.
Method
public abstract int getSpecificTarget(MLAnalyzer.Result<T> result)
Identifies objects with certain features among multiple detected objects.

Parameters

Parameter nameParameter desc
resultDetection results obtained by an analyzer.


Return

TypeDesc
intSequence of an object with specified features in the detection result list.
Method
public void transactResult(MLAnalyzer.Result<T> result)
Filters the results obtained by an analyzer, identifies the policy matching result, and sends the matching result to the corresponding method of the trailer class for further processing.

Parameters

Parameter nameParameter desc
resultDetection results obtained by an analyzer.

Protected Methods

Method
protected void setMaxFrameLostCount(int maxFrameLostCount)
Sets the maximum allowable gap of frames for determining object disappearance.

Parameters

Parameter nameParameter desc
maxFrameLostCountMaximum allowable gap of frames for determining object disappearance.