Video Core Feature Interface Reference Manual  jpl-r3.13.15
vftr_fgd.h File Reference

Core feature-lib for foreground detection. More...

#include "mpi_base_types.h"
#include "mpi_iva.h"

Data Structures

struct  VFTR_FGD_PARAM_S
 Struct for foreground detection parameter. More...
 
struct  VFTR_FGD_STATUS_S
 Structure for the result of foreground detection. More...
 
struct  VFTR_FGD_INPUT_S
 Structure for the foreground detection video features. More...
 

Macros

#define VFTR_FGD_TIME_BUFFER_SIZE_MIN   16
 
#define VFTR_FGD_ROI_AREA_MIN   16
 
#define VFTR_FGD_PATH_LEN_MAX   128
 

Typedefs

typedef struct vftr_fgd_instance VFTR_FGD_INSTANCE_S
 Type alias.
 

Enumerations

enum  VFTR_FGD_DATA_CTRL_E { VFTR_FGD_DATA_NONE = 0, VFTR_FGD_DATA_SAVE, VFTR_FGD_DATA_LOAD, VFTR_FGD_DATA_CTRL_NUM }
 Enum for data control.
 
enum  VFTR_FGD_EVENT_TYPE_E { VFTR_FGD_OBJECT_MONITOR = 0, VFTR_FGD_EVENT_NUM }
 Enum for event type.
 
enum  VFTR_FGD_OBJECT_EVENT_E {
  VFTR_FGD_OBJECT_ABSENT = 0, VFTR_FGD_OBJECT_PRESENT, VFTR_FGD_OBJECT_BOUNDARY, VFTR_FGD_OBJECT_ENTERING,
  VFTR_FGD_OBJECT_LEAVING, VFTR_FGD_OBJECT_EVENT_NUM
}
 Enum for object monitor event.
 

Functions

VFTR_FGD_INSTANCE_SVFTR_FGD_newInstance (void)
 Construct new foreground detection instance. More...
 
int VFTR_FGD_deleteInstance (VFTR_FGD_INSTANCE_S **instance)
 Destruct target foreground detection instance. More...
 
int VFTR_FGD_checkParam (const VFTR_FGD_PARAM_S *param)
 Check whether the parameter is valid. More...
 
int VFTR_FGD_setParam (VFTR_FGD_INSTANCE_S *instance, const VFTR_FGD_PARAM_S *param)
 Set foreground detection parameters. More...
 
int VFTR_FGD_getParam (const VFTR_FGD_INSTANCE_S *instance, VFTR_FGD_PARAM_S *param)
 Get foreground detection parameters. More...
 
int VFTR_FGD_detect (VFTR_FGD_INSTANCE_S *instance, const VFTR_FGD_INPUT_S *input, VFTR_FGD_STATUS_S *status)
 Detect foreground object. More...
 
int VFTR_FGD_getStat (const VFTR_FGD_INSTANCE_S *instance, VFTR_FGD_STATUS_S *status)
 Get foreground detection status. More...
 
int VFTR_FGD_reset (VFTR_FGD_INSTANCE_S *instance)
 Reset foreground detection history. More...
 
int VFTR_FGD_saveModel (const VFTR_FGD_INSTANCE_S *instance, const char *fpath)
 
int VFTR_FGD_loadModel (VFTR_FGD_INSTANCE_S *instance, const char *fpath)
 

Detailed Description

Core feature-lib for foreground detection.

Note
Because the feature is still evolving, this module is experimental. No attempt will be made to maintain API and ABI backward compatibility.

Macro Definition Documentation

#define VFTR_FGD_ROI_AREA_MIN   16

Minimum area of RoI in unit square pixels.

#define VFTR_FGD_TIME_BUFFER_SIZE_MIN   16

Minimum size of time buffer.

Function Documentation

int VFTR_FGD_checkParam ( const VFTR_FGD_PARAM_S param)

Check whether the parameter is valid.

Parameters
[in]parampointer to parameter
Returns
Whether the parameter is valid.
Return values
0Valid input.
-EFAULTReceived NULL pointer as input.
-EINVALInvalid input.
See also
VFTR_FGD_setParam()
int VFTR_FGD_deleteInstance ( VFTR_FGD_INSTANCE_S **  instanceRef)

Destruct target foreground detection instance.

Parameters
[in]instanceRefaddress of pointer to instance
Returns
The execution result.
Return values
0success.
-EFAULTReceived NULL pointer as input.
See also
VFTR_FGD_newInstance()
int VFTR_FGD_detect ( VFTR_FGD_INSTANCE_S instance,
const VFTR_FGD_INPUT_S input,
VFTR_FGD_STATUS_S status 
)

Detect foreground object.

Parameters
[in]instancepointer to instance
[in]inputforeground detection input.
[out]statusforeground detection status.
Returns
The execution result.
Return values
0success.
-EINVALinvalid parameters, maybe algorithm parameters are not configured before.
-EFAULTreceived NULL pointer.
int VFTR_FGD_getParam ( const VFTR_FGD_INSTANCE_S instance,
VFTR_FGD_PARAM_S param 
)

Get foreground detection parameters.

Parameters
[in]instancepointer to instance
[out]paramforeground detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTreceived NULL pointer.
See also
VFTR_FGD_setParam()
int VFTR_FGD_getStat ( const VFTR_FGD_INSTANCE_S instance,
VFTR_FGD_STATUS_S status 
)

Get foreground detection status.

Parameters
[in]instancepointer to instance
[out]statusforeground detection status.
Returns
The execution result.
Return values
0success.
-EFAULTreceived NULL pointer.
VFTR_FGD_INSTANCE_S* VFTR_FGD_newInstance ( void  )

Construct new foreground detection instance.

Returns
Pointer to instance
Return values
NotNULL Pointer to instance.
NULLNot enough memory to create new instance.
See also
VFTR_FGD_deleteInstance()
int VFTR_FGD_reset ( VFTR_FGD_INSTANCE_S instance)

Reset foreground detection history.

Parameters
[in]instancepointer to instance
Returns
The execution result.
Return values
0success.
-EFAULTreceived NULL pointer.
int VFTR_FGD_setParam ( VFTR_FGD_INSTANCE_S instance,
const VFTR_FGD_PARAM_S param 
)

Set foreground detection parameters.

Parameters
[in]instancepointer to instance
[in]paramforeground detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTReceived NULL pointer as input.
-ENOMEMAllocated memory failure.
-EINVALInvalid FGD parameters.
See also
VFTR_FGD_getParam()