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)(const ScTrackedObject *object, void *user_data);
32 typedef void (*ScObjectTrackerEventFuncLost)(ScTrackedObjectType type, uint32_t tracking_id, void *user_data);
33 typedef void (*ScObjectTrackerEventFuncPredicted)(uint32_t tracking_id, ScQuadrilateral quadrilateral, float dt, void *user_data);
34 
38 typedef struct {
39  ScObjectTrackerEventFunc on_object_appeared;
40  ScObjectTrackerEventFunc on_object_updated;
41  ScObjectTrackerEventFuncLost on_object_lost;
42  ScObjectTrackerEventFuncPredicted on_object_predicted;
44 
57 SC_EXPORT ScObjectTracker*
58 sc_object_tracker_new(ScRecognitionContext *context, ScObjectTrackerCallbacks *callbacks, void *callback_user_data);
59 
66 SC_EXPORT void
68 
75 SC_EXPORT void
77 
85 SC_EXPORT ScBool
87 
95 SC_EXPORT void
97 
98 #if defined(__cplusplus)
99 }
100 #endif
101 
102 #endif // SC_OBJECT_TRACKER_H_
103 
104 
Opaque recognition context data structure.
void sc_object_tracker_retain(ScObjectTracker *tracker)
Increase reference count of the object tracker.
ScBool sc_object_tracker_is_enabled(const ScObjectTracker *tracker)
Check if tracking is enabled or disabled.
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:65
Callback storage structure. Set a callback to NULL to ignore it.
Definition: ScObjectTracker.h:38
ScObjectTracker * sc_object_tracker_new(ScRecognitionContext *context, ScObjectTrackerCallbacks *callbacks, void *callback_user_data)
Create a new object tracker.
ScTrackedObjectType
Type of the tracked object.
Definition: ScTrackedObject.h:25
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