美摄SDK For Android  3.14.0
| Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | 所有成员列表
com.meicam.sdk.NvsSmartCutParser类 参考

智能检测类 更多...

class  NvsDetectData
 智能检测数据类 更多...
 
class  NvsInferenceScheme
 
interface  SmartCutParserCallback
 智能检测回调接口 更多...
 

Public 成员函数

boolean setMaxThreadCount (int threadCount)
 设置最大检测线程数目 更多...
 
boolean detectMediaFiles (ArrayList< NvsDetectData > dataList)
 检测资源 更多...
 
void setSmartCutParserCallback (SmartCutParserCallback cb)
 设置智能检测回调接口 更多...
 
void setSmartCutParserCallback (SmartCutParserCallback callback, Handler handler)
 设置智能检测回调接口 更多...
 
void cancelTask (long taskId)
 取消检测任务 更多...
 
void cancelAllTasks ()
 取消所有检测任务 更多...
 
void suspend ()
 挂起检测任务 更多...
 
void resume ()
 恢复所有检测任务 更多...
 

静态 Public 成员函数

static ArrayList< NvsInferenceSchemeQuerySupportedSchemes ()
 获取支持的推理方案 更多...
 
static NvsSmartCutParser init (NvsInferenceScheme scheme, String sceneModelPath, String placeModelPath, int flags)
 对智能检测类的单例实例进行初始化 更多...
 
static NvsSmartCutParser init (NvsInferenceScheme scheme, String sceneModelPath, String placeModelPath)
 对智能检测类的单例实例进行初始化 更多...
 
static void close ()
 销毁智能检测类实例。注意: 销毁之后可以再次创建及获取 更多...
 
static boolean initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features)
 初始化人体检测机制 更多...
 
static NvsSmartCutParser getInstance ()
 获取智能检测类的单例实例(必须进行初始化后才能使用) 更多...
 

静态 Public 属性

智能检测标志

static final int SMART_CUT_FLAG_NONE = 0
 

Protected 成员函数

void notifyDetectStarted (final String mediaPath, final long taskId)
 
void notifyDetectFinished (final String mediaPath, final String scdPath)
 
void notifyDetectError (final int errorType)
 
void notifyDetectProgress (final String mediaPath, final float progress)
 

详细描述

智能检测类

警告
NvsSmartCutParser类中,所有public API不仅可以在UI线程使用,也可以跨线程使用!!!

成员函数说明

◆ cancelAllTasks()

void com.meicam.sdk.NvsSmartCutParser.cancelAllTasks ( )
inline

取消所有检测任务

◆ cancelTask()

void com.meicam.sdk.NvsSmartCutParser.cancelTask ( long  taskId)
inline

取消检测任务

参数
taskId任务序号

◆ close()

static void com.meicam.sdk.NvsSmartCutParser.close ( )
inlinestatic

销毁智能检测类实例。注意: 销毁之后可以再次创建及获取

参见
init
getInstance

◆ detectMediaFiles()

boolean com.meicam.sdk.NvsSmartCutParser.detectMediaFiles ( ArrayList< NvsDetectData dataList)
inline

检测资源

参数
dataList资源队列
返回
返回布尔值。值为true则成功,false则失败。

◆ getInstance()

static NvsSmartCutParser com.meicam.sdk.NvsSmartCutParser.getInstance ( )
inlinestatic

获取智能检测类的单例实例(必须进行初始化后才能使用)

返回
返回智能检测类的单例实例对象
参见
init
close

◆ init() [1/2]

static NvsSmartCutParser com.meicam.sdk.NvsSmartCutParser.init ( NvsInferenceScheme  scheme,
String  sceneModelPath,
String  placeModelPath 
)
inlinestatic

对智能检测类的单例实例进行初始化

参数
scheme方案.
sceneModelPath景别模型文件.
placeModelPath场景模型文件.
返回
返回智能检测类的单例实例对象
参见
getInstance
close

◆ init() [2/2]

static NvsSmartCutParser com.meicam.sdk.NvsSmartCutParser.init ( NvsInferenceScheme  scheme,
String  sceneModelPath,
String  placeModelPath,
int  flags 
)
inlinestatic

对智能检测类的单例实例进行初始化

参数
scheme方案.
sceneModelPath景别模型文件.
placeModelPath场景模型文件.
flags标志字段,如果无特殊需求请填写0。请参见智能检测标志
返回
返回智能检测类的单例实例对象
参见
getInstance
close

◆ initHumanDetection()

static boolean com.meicam.sdk.NvsSmartCutParser.initHumanDetection ( Context  ctx,
String  modelFilePath,
String  licenseFilePath,
int  features 
)
inlinestatic

初始化人体检测机制

参数
ctx安卓Context对象
modelFilePath人脸模型文件路径
licenseFilePath授权文件路径
features人体检测特征标志字段。如无特殊需求写0)
返回
返回值表示是否成功
自从
2.15.0

◆ notifyDetectError()

void com.meicam.sdk.NvsSmartCutParser.notifyDetectError ( final int  errorType)
inlineprotected

◆ notifyDetectFinished()

void com.meicam.sdk.NvsSmartCutParser.notifyDetectFinished ( final String  mediaPath,
final String  scdPath 
)
inlineprotected

◆ notifyDetectProgress()

void com.meicam.sdk.NvsSmartCutParser.notifyDetectProgress ( final String  mediaPath,
final float  progress 
)
inlineprotected

◆ notifyDetectStarted()

void com.meicam.sdk.NvsSmartCutParser.notifyDetectStarted ( final String  mediaPath,
final long  taskId 
)
inlineprotected

◆ QuerySupportedSchemes()

static ArrayList<NvsInferenceScheme> com.meicam.sdk.NvsSmartCutParser.QuerySupportedSchemes ( )
inlinestatic

获取支持的推理方案

返回
返回支持的方案列表
参见
getInstance
close

◆ resume()

void com.meicam.sdk.NvsSmartCutParser.resume ( )
inline

恢复所有检测任务

◆ setMaxThreadCount()

boolean com.meicam.sdk.NvsSmartCutParser.setMaxThreadCount ( int  threadCount)
inline

设置最大检测线程数目

参数
threadCount线程数目
返回
返回布尔值。值为true则成功,false则失败。

◆ setSmartCutParserCallback() [1/2]

void com.meicam.sdk.NvsSmartCutParser.setSmartCutParserCallback ( SmartCutParserCallback  callback,
Handler  handler 
)
inline

设置智能检测回调接口

参数
cb智能检测回调接口
handler回调线程

◆ setSmartCutParserCallback() [2/2]

void com.meicam.sdk.NvsSmartCutParser.setSmartCutParserCallback ( SmartCutParserCallback  cb)
inline

设置智能检测回调接口

参数
cb智能检测回调接口

◆ suspend()

void com.meicam.sdk.NvsSmartCutParser.suspend ( )
inline

挂起检测任务

类成员变量说明

◆ SMART_CUT_FLAG_NONE

final int com.meicam.sdk.NvsSmartCutParser.SMART_CUT_FLAG_NONE = 0
static

该类的文档由以下文件生成: