ScObjectTracker.h
Go to the documentation of this file.
1 
11 #ifndef SC_OBJECT_TRACKER_H_
12 #define SC_OBJECT_TRACKER_H_
13 
14 #include <Scandit/ScConfig.h>
15 
18 
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22 
28 typedef struct ScOpaqueObjectTracker ScObjectTracker;
30 
31 typedef void (*ScObjectTrackerEventFunc)(ScTrackedObject const *object, void *user_data);
32 typedef void (*ScObjectTrackerEventFuncLost)(ScTrackedObjectType type,
33  uint32_t tracking_id,
34  void *user_data);
35 typedef void (*ScObjectTrackerEventFuncPredicted)(uint32_t tracking_id,
36  ScQuadrilateral quadrilateral,
37  float dt,
38  void *user_data);
39 
43 typedef struct {
44  ScObjectTrackerEventFunc on_object_appeared;
45  ScObjectTrackerEventFunc on_object_updated;
46  ScObjectTrackerEventFuncLost on_object_lost;
47  ScObjectTrackerEventFuncPredicted on_object_predicted;
49 
63 SC_EXPORT
65  ScObjectTrackerCallbacks *callbacks,
66  void *callback_user_data);
73 SC_EXPORT
75 
82 SC_EXPORT
84 
92 SC_EXPORT
94 
102 SC_EXPORT
104 
105 #if defined(__cplusplus)
106 }
107 #endif
108 
109 #endif // SC_OBJECT_TRACKER_H_
Opaque recognition context data structure.
void sc_object_tracker_retain(ScObjectTracker *tracker)
Increase reference count of the object tracker.
void sc_object_tracker_set_enabled(ScObjectTracker *tracker, ScBool option)
Enable or disable tracking.
Recognition context interface.
API for tracking objects across frames.
A 2-dimensional polygon with 4 corners.
Definition: ScCommon.h:61
Callback storage structure. Set a callback to NULL to ignore it.
Definition: ScObjectTracker.h:43
ScObjectTracker * sc_object_tracker_new(ScRecognitionContext *context, ScObjectTrackerCallbacks *callbacks, void *callback_user_data)
Create a new object tracker.
ScBool sc_object_tracker_is_enabled(ScObjectTracker const *tracker)
Check if tracking is enabled or disabled.
ScTrackedObjectType
Type of the tracked object.
Definition: ScTrackedObject.h:27
Opaque pointer type for an object tracker.
Common definitions used throughout the ScanditSDK API.
Opaque pointer type for an object tracker.
void sc_object_tracker_release(ScObjectTracker *tracker)
Decrease reference count of tracker object.
int32_t ScBool
Boolean value, can be SC_TRUE or SC_FALSE.
Definition: ScConfig.h:127