目录

  1. MLObjectAnalyzerSetting options = new MLObjectAnalyzerSetting
  2. .Factory()
  3. .allowClassification()
  4. .setAnalyzerType(MLObjectAnalyzerSetting.TYPE_VIDEO)
  5. .create();
class info
com.huawei.hms.mlsdk.objects.MLObjectAnalyzerSetting.Factory

Creates an instance of the object analysis configurator to set object detection attributes.

Sample Code

  1. MLObjectAnalyzerSetting options = new MLObjectAnalyzerSetting.Factory()
  2.    .allowClassification()
  3.    .setAnalyzerType(MLObjectAnalyzerSetting.TYPE_VIDEO)
  4.    .create();

Public Method Summary

Return typeMethod name
MLObjectAnalyzerSetting.FactoryallowClassification()
MLObjectAnalyzerSetting.FactoryallowMultiResults()
MLObjectAnalyzerSettingcreate()
MLObjectAnalyzerSetting.FactorysetAnalyzerType(int type)

Public Methods

Method
public MLObjectAnalyzerSetting.Factory allowClassification()
Sets whether to support detection result classification.

Return

Typedesc
MLObjectAnalyzerSetting.FactoryReturns the instance of MLObjectAnalyzerSetting.Factory.
Method
public MLObjectAnalyzerSetting.Factory allowMultiResults()
Sets whether to support multi-object detection.

Return

Typedesc
MLObjectAnalyzerSetting.FactoryReturns the instance of MLObjectAnalyzerSetting.Factory.
Method
public MLObjectAnalyzerSetting create()
Creates an instance of the object analysis configurator.

Return

Typedesc
MLObjectAnalyzerSettingReturns the instance of MLObjectAnalyzerSetting.
Method
public MLObjectAnalyzerSetting.Factory setAnalyzerType(int type)
Sets the object detection mode.

Parameters

Parameter nameParameter desc
typeDetection mode.
1: TYPE_VIDEO, indicating the video stream mode
0: TYPE_PICTURE, indicating the image mode


Return

Typedesc
MLObjectAnalyzerSetting.FactoryReturns the instance of MLObjectAnalyzerSetting.Factory.