Video Core Feature Interface Reference Manual  jpl-r4.1.0-rc2
vftr_lod.h File Reference

Core feature-lib for left-object detection. More...

#include "mpi_base_types.h"
#include "mpi_iva.h"
#include "mpi_dev.h"
#include "vftr_dump.h"

Data Structures

struct  VFTR_LOD_REG_STAT_S
 
struct  VFTR_LOD_PARAM_S
 Struct for left-object detection parameter. More...
 
struct  VFTR_LOD_STATUS_S
 Structure for the result of left-object detection. More...
 
struct  VFTR_LOD_INPUT_S
 Structure for the left-object detection video features. More...
 

Macros

#define VFTR_LOD_ROI_AREA_MIN   16
 
#define VFTR_LOD_MAX_NOISE_LEVEL   7
 
#define VFTR_LOD_MAX_REG_NUM   10
 

Typedefs

typedef struct vftr_lod_instance VFTR_LOD_INSTANCE_S
 Type alias.
 

Enumerations

enum  VFTR_LOD_EVENT_TYPE_E { VFTR_LOD_OBJECT_MONITOR = 0, VFTR_LOD_EVENT_NUM }
 Enum for event type. More...
 
enum  VFTR_LOD_OBJECT_EVENT_E { VFTR_LOD_OBJECT_IDLE = 0, VFTR_LOD_OBJECT_IN, VFTR_LOD_OBJECT_OUT, VFTR_LOD_OBJECT_EVENT_NUM }
 Enum for object monitor event. More...
 

Functions

VFTR_LOD_INSTANCE_SVFTR_LOD_newInstance (void)
 Construct new left-object detection instance. More...
 
int VFTR_LOD_deleteInstance (VFTR_LOD_INSTANCE_S **instance)
 Destruct target left-object detection instance. More...
 
int VFTR_LOD_checkParam (const VFTR_LOD_PARAM_S *param)
 Check whether the parameter is valid. More...
 
int VFTR_LOD_setParam (VFTR_LOD_INSTANCE_S *instance, const VFTR_LOD_PARAM_S *param)
 Set left-object detection parameters. More...
 
int VFTR_LOD_getParam (const VFTR_LOD_INSTANCE_S *instance, VFTR_LOD_PARAM_S *param)
 Get left-object detection parameters. More...
 
int _VFTR_LOD_dump (VFTR_LOD_INSTANCE_S *instance, const VFTR_LOD_INPUT_S *input, VFTR_LOD_STATUS_S *status)
 Dump LOD debuging info. More...
 
int _VFTR_LOD_detect (VFTR_LOD_INSTANCE_S *instance, const VFTR_LOD_INPUT_S *input, VFTR_LOD_STATUS_S *status)
 Detect left object. More...
 
int VFTR_LOD_getStat (const VFTR_LOD_INSTANCE_S *instance, VFTR_LOD_STATUS_S *status)
 Get left-object detection status. More...
 
int VFTR_LOD_reset (VFTR_LOD_INSTANCE_S *instance)
 Reset left-object detection history. More...
 
FORCE_INLINE INT32 VFTR_LOD_detect (VFTR_LOD_INSTANCE_S *instance, const VFTR_LOD_INPUT_S *input, VFTR_LOD_STATUS_S *status)
 An inline function. If variable vftr_dump_en is true, then call dump function for debugging. More...
 

Detailed Description

Core feature-lib for left-object 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_LOD_ROI_AREA_MIN   16

Minimum area of RoI in unit square pixels.

Enumeration Type Documentation

Enum for event type.

Enumerator
VFTR_LOD_OBJECT_MONITOR 

Operating as an object monitor.

Enum for object monitor event.

See also
VFTR_LOD_EVENT_TYPE_E
Enumerator
VFTR_LOD_OBJECT_IDLE 

No left object detected.

VFTR_LOD_OBJECT_IN 

Left object detected.

VFTR_LOD_OBJECT_OUT 

Left object leaving.

VFTR_LOD_OBJECT_EVENT_NUM 

Number of events.

Function Documentation

int _VFTR_LOD_detect ( VFTR_LOD_INSTANCE_S instance,
const VFTR_LOD_INPUT_S input,
VFTR_LOD_STATUS_S status 
)

Detect left object.

Parameters
[in]instancepointer to instance
[in]inputleft-object detection input.
[out]statusleft-object detection status.
Returns
The execution result.
Return values
0success.
-EINVALinvalid parameters, maybe algorithm parameters are not configured before.
-EFAULTreceived NULL pointer.
int _VFTR_LOD_dump ( VFTR_LOD_INSTANCE_S instance,
const VFTR_LOD_INPUT_S input,
VFTR_LOD_STATUS_S status 
)

Dump LOD debuging info.

Parameters
[in]instancePointer to left-object detection instance.
[in]inputPointer to left-object detection input.
[out]statusPointer to left-object detection result.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
See also
none
int VFTR_LOD_checkParam ( const VFTR_LOD_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_LOD_setParam()
int VFTR_LOD_deleteInstance ( VFTR_LOD_INSTANCE_S **  instanceRef)

Destruct target left-object detection instance.

Parameters
[in]instanceRefaddress of pointer to instance
Returns
The execution result.
Return values
0success.
-EFAULTReceived NULL pointer as input.
See also
VFTR_LOD_newInstance()
FORCE_INLINE INT32 VFTR_LOD_detect ( VFTR_LOD_INSTANCE_S instance,
const VFTR_LOD_INPUT_S input,
VFTR_LOD_STATUS_S status 
)

An inline function. If variable vftr_dump_en is true, then call dump function for debugging.

See also
_VFTR_LOD_dump()
_VFTR_LOD_detect()
int VFTR_LOD_getParam ( const VFTR_LOD_INSTANCE_S instance,
VFTR_LOD_PARAM_S param 
)

Get left-object detection parameters.

Parameters
[in]instancepointer to instance
[out]paramleft-object detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTreceived NULL pointer.
See also
VFTR_LOD_setParam()
int VFTR_LOD_getStat ( const VFTR_LOD_INSTANCE_S instance,
VFTR_LOD_STATUS_S status 
)

Get left-object detection status.

Parameters
[in]instancepointer to instance
[out]statusleft-object detection status.
Returns
The execution result.
Return values
0success.
-EFAULTreceived NULL pointer.
VFTR_LOD_INSTANCE_S* VFTR_LOD_newInstance ( void  )

Construct new left-object detection instance.

Returns
Pointer to instance
Return values
NotNULL Pointer to instance.
NULLNot enough memory to create new instance.
See also
VFTR_LOD_deleteInstance()
int VFTR_LOD_reset ( VFTR_LOD_INSTANCE_S instance)

Reset left-object detection history.

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

Set left-object detection parameters.

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