MeiCam SDK For Android  3.14.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
com.meicam.sdk.NvsSmartCutParser Class Reference

Face effect class. More...

Classes

class  NvsDetectData
 detect data class. More...
 
class  NvsInferenceScheme
 
interface  SmartCutParserCallback
 smart cut callback interface More...
 

Public Member Functions

boolean setMaxThreadCount (int threadCount)
 set max detect thread count More...
 
boolean detectMediaFiles (ArrayList< NvsDetectData > dataList)
 detect media files More...
 
void setSmartCutParserCallback (SmartCutParserCallback cb)
 Sets callback interface for smart cut. More...
 
void setSmartCutParserCallback (SmartCutParserCallback callback, Handler handler)
 Sets callback interface for smart cut. More...
 
void cancelTask (long taskId)
 cancel media detect task. More...
 
void cancelAllTasks ()
 cancel all detect tasks. More...
 
void suspend ()
 suspend all detect tasks. More...
 
void resume ()
 resume all detect tasks. More...
 

Static Public Member Functions

static ArrayList< NvsInferenceSchemeQuerySupportedSchemes ()
 query support schemes. More...
 
static NvsSmartCutParser init (NvsInferenceScheme scheme, String sceneModelPath, String placeModelPath, int flags)
 Initializes smart cut instance. More...
 
static NvsSmartCutParser init (NvsInferenceScheme scheme, String sceneModelPath, String placeModelPath)
 Initializes an instance of smart cut object. More...
 
static void close ()
 Destroys the smart cut object instance. note: it can be created again after destruction. More...
 
static boolean initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features)
 Initializes human detection. More...
 
static NvsSmartCutParser getInstance ()
 Gets the instance of smart cut object (only can use this after initialization) More...
 

Static Public Attributes

Smart context flags

static final int SMART_CUT_FLAG_NONE = 0
 

Protected Member Functions

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)
 

Detailed Description

Face effect class.

Warning
In the NvsSmartCutParser class, all public APIs can be used not only in the UI thread, but also across threads! ! !

Member Function Documentation

◆ cancelAllTasks()

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

cancel all detect tasks.

◆ cancelTask()

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

cancel media detect task.

Parameters
taskIdtask ID.

◆ close()

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

Destroys the smart cut object instance. note: it can be created again after destruction.

See also
init
getInstance

◆ detectMediaFiles()

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

detect media files

Parameters
dataListdata list
Returns
Returns a boolean value. true means successful and false means failure

◆ getInstance()

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

Gets the instance of smart cut object (only can use this after initialization)

Returns
Returns the smart cut object instance.
See also
init
close

◆ init() [1/2]

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

Initializes an instance of smart cut object.

Parameters
scheme.
sceneModelPathscene model.
placeModelPathplace model.
Returns
Returns the smart cut instance object.
See also
getInstance
close

◆ init() [2/2]

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

Initializes smart cut instance.

Parameters
scheme.
sceneModelPathscene model.
placeModelPathplace model.
flagsFlags, 0 if no special requirement, please refer to (SMART_CUT_FLAG).
Returns
Returns a smart cut instance object.
See also
getInstance
close

◆ initHumanDetection()

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

Initializes human detection.

Parameters
ctxThe context object from android.
modelFilePathThe path of face modle file.
licenseFilePathThe path of authorization file.
featuresHuman detection features field,0 if no special requirement.
Returns
Returns a value representing if it succeeded.
Since
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

query support schemes.

Returns
Returns sheme list.
See also
getInstance
close

◆ resume()

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

resume all detect tasks.

◆ setMaxThreadCount()

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

set max detect thread count

Parameters
threadCountthread count
Returns
Returns a boolean value. true means successful and false means failure

◆ setSmartCutParserCallback() [1/2]

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

Sets callback interface for smart cut.

Parameters
cbCallback interface for smart cut.
handlerCallback handler.

◆ setSmartCutParserCallback() [2/2]

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

Sets callback interface for smart cut.

Parameters
cbCallback interface for smart cut.

◆ suspend()

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

suspend all detect tasks.

Member Data Documentation

◆ SMART_CUT_FLAG_NONE

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

The documentation for this class was generated from the following file: