Debian Codegraph @

gst/tensordecoders/gstioutracker.h

raw
1 /*
2 * GStreamer gstreamer-ioutracker
3 * Copyright (C) 2025 Collabora Ltd
4 *
5 * gstioutracker.h
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23 #ifndef __GST_IOU_TRACKER_H__
24 #define __GST_IOU_TRACKER_H__
25
26 #include <gst/gst.h>
27 #include <gst/video/video.h>
28 #include <gst/video/gstvideofilter.h>
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_IOU_TRACKER (gst_iou_tracker_get_type())
33 G_DECLARE_FINAL_TYPE (GstIouTracker, gst_iou_tracker, GST, IOU_TRACKER, GstBaseTransform)
34
35 /*
36 * GstIouTracker:
37 *
38 * @basetransform: the parent class
39 * @min_frame_count_for_lost_track: Minimum no of consecutive frame where object is absent, before track is marked lost
40 * @iou_score_threshold: the threshold for Intersection over Union (IoU) score to consider a detection as a match
41 * @tracks: a list of current tracks being tracked
42 * @picked_odmtds: a hash table to keep track of picked object detection metadata
43 * @next_track_id: the next tracking id to assign to a new track
44 *
45 * Since: 1.28
46 */
47 struct _GstIouTracker
48 {
49 GstBaseTransform basetransform;
50 guint min_frame_count_for_lost_track;
51 gfloat iou_score_threshold;
52 GList *tracks;
53 GHashTable *picked_odmtds;
54 guint next_track_id; // Next tracking id to assign
55 };
56
57 /**
58 * GstIouTrackerClass:
59 *
60 * @parent_class base transform base class
61 *
62 * Since: 1.28
63 */
64 struct _GstIouTrackerClass
65 {
66 GstBaseTransformClass parent_class;
67 };
68
69 GST_ELEMENT_REGISTER_DECLARE (iou_tracker);
70
71 G_END_DECLS
72
73 #endif /* __GST_IOU_TRACKER_H__ */