ScObjectTracker.h File Reference

Go to the source code of this file.

Data Structures

struct  ScObjectTrackerCallbacks
 
typedef struct ScOpaqueObjectTracker ScObjectTracker
 
typedef void(* ScObjectTrackerEventFunc) (const ScTrackedObject *object, void *user_data)
 
typedef void(* ScObjectTrackerEventFuncLost) (ScTrackedObjectType type, uint32_t tracking_id, void *user_data)
 
typedef void(* ScObjectTrackerEventFuncPredicted) (uint32_t tracking_id, ScQuadrilateral quadrilateral, float dt, void *user_data)
 
ScObjectTrackersc_object_tracker_new (ScRecognitionContext *context, ScObjectTrackerCallbacks *callbacks, void *callback_user_data)
 
void sc_object_tracker_retain (ScObjectTracker *tracker)
 
void sc_object_tracker_release (ScObjectTracker *tracker)
 
ScBool sc_object_tracker_is_enabled (const ScObjectTracker *tracker)
 
void sc_object_tracker_set_enabled (ScObjectTracker *tracker, ScBool option)
 

Detailed Description

API for tracking objects across frames.


Data Structure Documentation

struct ScObjectTrackerCallbacks

Callback storage structure. Set a callback to NULL to ignore it.

Examples:
CommandLineMatrixScanCameraSample.c.
Data Fields
ScObjectTrackerEventFunc on_object_appeared
ScObjectTrackerEventFunc on_object_updated
ScObjectTrackerEventFuncLost on_object_lost
ScObjectTrackerEventFuncPredicted on_object_predicted

Function Documentation

ScObjectTracker* sc_object_tracker_new ( ScRecognitionContext context,
ScObjectTrackerCallbacks callbacks,
void *  callback_user_data 
)

Create a new object tracker.

Parameters
contextThe recognition context. Must not be null.
callbacksSet of callbacks to be invoked when a new objects are found, their position is updated, or they are lost. Must not be null, however, each of the callbacks may be null, if the user is not interested in receiving these events.
callback_user_dataOptional pointer to user data which will be passed to the event functions as the second argument.
Returns
The new tracker object.
Since
5.8.0
Examples:
CommandLineMatrixScanCameraSample.c.
void sc_object_tracker_retain ( ScObjectTracker tracker)

Increase reference count of the object tracker.

Parameters
trackerReference to the tracker. Must not be null
Since
5.8.0
void sc_object_tracker_release ( ScObjectTracker tracker)

Decrease reference count of tracker object.

Parameters
trackerReference to the tracker. May be null.
Since
5.8.0
Examples:
CommandLineMatrixScanCameraSample.c.
ScBool sc_object_tracker_is_enabled ( const ScObjectTracker tracker)

Check if tracking is enabled or disabled.

Parameters
trackerReference to the tracker. Must not be null
Returns
True when tracking is enabled, false if not
Since
5.8.0
void sc_object_tracker_set_enabled ( ScObjectTracker tracker,
ScBool  option 
)

Enable or disable tracking.

Parameters
optionTrue when tracking should be enabled, false if not
trackerReference to the tracker. Must not be null
Since
5.8.0