-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathgstzedsrc.cpp
3226 lines (2862 loc) · 140 KB
/
gstzedsrc.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// /////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// /////////////////////////////////////////////////////////////////////////
#include <gst/base/gstpushsrc.h>
#include <gst/gst.h>
#include <gst/video/video.h>
#include "gst-zed-meta/gstzedmeta.h"
#include "gstzedsrc.h"
// AI Module
#define OD_INSTANCE_MODULE_ID 0
#define BT_INSTANCE_MODULE_ID 1
GST_DEBUG_CATEGORY_STATIC(gst_zedsrc_debug);
#define GST_CAT_DEFAULT gst_zedsrc_debug
/* prototypes */
static void gst_zedsrc_set_property(GObject *object, guint property_id, const GValue *value,
GParamSpec *pspec);
static void gst_zedsrc_get_property(GObject *object, guint property_id, GValue *value,
GParamSpec *pspec);
static void gst_zedsrc_dispose(GObject *object);
static void gst_zedsrc_finalize(GObject *object);
static gboolean gst_zedsrc_start(GstBaseSrc *src);
static gboolean gst_zedsrc_stop(GstBaseSrc *src);
static GstCaps *gst_zedsrc_get_caps(GstBaseSrc *src, GstCaps *filter);
static gboolean gst_zedsrc_set_caps(GstBaseSrc *src, GstCaps *caps);
static gboolean gst_zedsrc_unlock(GstBaseSrc *src);
static gboolean gst_zedsrc_unlock_stop(GstBaseSrc *src);
static GstFlowReturn gst_zedsrc_fill(GstPushSrc *src, GstBuffer *buf);
enum {
PROP_0,
PROP_CAM_RES,
PROP_CAM_FPS,
PROP_STREAM_TYPE,
PROP_SDK_VERBOSE,
PROP_CAM_FLIP,
PROP_CAM_ID,
PROP_CAM_SN,
PROP_SVO_FILE,
PROP_OPENCV_CALIB_FILE,
PROP_STREAM_IP,
PROP_STREAM_PORT,
PROP_DEPTH_MIN,
PROP_DEPTH_MAX,
PROP_DEPTH_MODE,
PROP_DIS_SELF_CALIB,
PROP_ROI,
PROP_ROI_X,
PROP_ROI_Y,
PROP_ROI_W,
PROP_ROI_H,
// PROP_RIGHT_DEPTH_ENABLE,
PROP_DEPTH_STAB,
PROP_CONFIDENCE_THRESH,
PROP_TEXTURE_CONF_THRESH,
PROP_3D_REF_FRAME,
PROP_FILL_MODE,
PROP_POS_TRACKING,
PROP_CAMERA_STATIC,
PROP_POS_AREA_FILE_PATH,
PROP_POS_ENABLE_AREA_MEMORY,
PROP_POS_ENABLE_IMU_FUSION,
PROP_POS_ENABLE_POSE_SMOOTHING,
PROP_POS_SET_FLOOR_AS_ORIGIN,
PROP_POS_SET_GRAVITY_AS_ORIGIN,
PROP_POS_DEPTH_MIN_RANGE,
PROP_POS_INIT_X,
PROP_POS_INIT_Y,
PROP_POS_INIT_Z,
PROP_POS_INIT_ROLL,
PROP_POS_INIT_PITCH,
PROP_POS_INIT_YAW,
PROP_POS_MODE,
PROP_COORD_SYS,
PROP_OD_ENABLE,
PROP_OD_TRACKING,
PROP_OD_SEGM,
PROP_OD_DET_MODEL,
PROP_OD_FILTER_MODE,
PROP_OD_CONFIDENCE,
PROP_OD_MAX_RANGE,
PROP_OD_BODY_FITTING,
PROP_OD_PREDICTION_TIMEOUT_S,
PROP_OD_ALLOW_REDUCED_PRECISION_INFERENCE,
PROP_OD_PERSON_CONF,
PROP_OD_VEHICLE_CONF,
PROP_OD_BAG_CONF,
PROP_OD_ANIMAL_CONF,
PROP_OD_ELECTRONICS_CONF,
PROP_OD_FRUIT_VEGETABLES_CONF,
PROP_OD_SPORT_CONF,
PROP_BT_ENABLE,
PROP_BT_SEGM,
PROP_BT_SYNC,
PROP_BT_MODEL,
PROP_BT_FORMAT,
PROP_BT_ALLOW_REDUCED_PRECISION_INFERENCE,
PROP_BT_MAX_RANGE,
PROP_BT_KP_SELECT,
PROP_BT_BODY_FITTING,
PROP_BT_TRACKING,
PROP_BT_PREDICTION_TIMEOUT_S,
PROP_BT_CONFIDENCE,
PROP_BT_MIN_KP_THRESH,
PROP_BT_SMOOTHING,
PROP_BRIGHTNESS,
PROP_CONTRAST,
PROP_HUE,
PROP_SATURATION,
PROP_SHARPNESS,
PROP_GAMMA,
PROP_GAIN,
PROP_EXPOSURE,
PROP_AEC_AGC,
PROP_AEC_AGC_ROI_X,
PROP_AEC_AGC_ROI_Y,
PROP_AEC_AGC_ROI_W,
PROP_AEC_AGC_ROI_H,
PROP_AEC_AGC_ROI_SIDE,
PROP_WHITEBALANCE,
PROP_WHITEBALANCE_AUTO,
PROP_LEDSTATUS,
N_PROPERTIES
};
typedef enum {
GST_ZEDSRC_HD2K = 0, // 2208x1242
GST_ZEDSRC_HD1080 = 1, // 1920x1080
GST_ZEDSRC_HD1200 = 2, // 1920x1200
GST_ZEDSRC_HD720 = 3, // 1280x720
GST_ZEDSRC_SVGA = 4, // 960x600
GST_ZEDSRC_VGA = 5, // 672x376
GST_ZEDSRC_AUTO_RES = 6, // Default value for the camera model
} GstZedSrcRes;
typedef enum {
GST_ZEDSRC_120FPS = 120,
GST_ZEDSRC_100FPS = 100,
GST_ZEDSRC_60FPS = 60,
GST_ZEDSRC_30FPS = 30,
GST_ZEDSRC_15FPS = 15
} GstZedSrcFPS;
typedef enum {
GST_ZEDSRC_NO_FLIP = 0,
GST_ZEDSRC_FLIP = 1,
GST_ZEDSRC_AUTO = 2,
} GstZedSrcFlip;
typedef enum {
GST_ZEDSRC_ONLY_LEFT = 0,
GST_ZEDSRC_ONLY_RIGHT = 1,
GST_ZEDSRC_LEFT_RIGHT = 2,
GST_ZEDSRC_DEPTH_16 = 3,
GST_ZEDSRC_LEFT_DEPTH = 4
} GstZedSrcStreamType;
typedef enum {
GST_ZEDSRC_COORD_IMAGE = 0,
GST_ZEDSRC_COORD_LEFT_HANDED_Y_UP = 1,
GST_ZEDSRC_COORD_RIGHT_HANDED_Y_UP = 2,
GST_ZEDSRC_COORD_RIGHT_HANDED_Z_UP = 3,
GST_ZEDSRC_COORD_LEFT_HANDED_Z_UP = 4,
GST_ZEDSRC_COORD_RIGHT_HANDED_Z_UP_X_FWD = 5
} GstZedSrcCoordSys;
typedef enum {
GST_ZEDSRC_OD_MULTI_CLASS_BOX_FAST = 0,
GST_ZEDSRC_OD_MULTI_CLASS_BOX_MEDIUM = 1,
GST_ZEDSRC_OD_MULTI_CLASS_BOX_ACCURATE = 2,
GST_ZEDSRC_OD_PERSON_HEAD_BOX_FAST = 3,
GST_ZEDSRC_OD_PERSON_HEAD_BOX_ACCURATE = 4
} GstZedSrcOdModel;
typedef enum {
GST_ZEDSRC_OD_FILTER_MODE_NONE,
GST_ZEDSRC_OD_FILTER_MODE_NMS3D,
GST_ZEDSRC_OD_FILTER_MODE_NMS3D_PER_CLASS
} GstZedSrcOdFilterMode;
typedef enum {
GST_ZEDSRC_BT_HUMAN_BODY_FAST = 0,
GST_ZEDSRC_BT_HUMAN_BODY_MEDIUM = 1,
GST_ZEDSRC_BT_HUMAN_BODY_ACCURATE = 2
} GstZedSrcBtModel;
typedef enum {
GST_ZEDSRC_BT_BODY_18 = 0,
GST_ZEDSRC_BT_BODY_34 = 1,
GST_ZEDSRC_BT_BODY_38 = 2
} GstZedSrcBtFormat;
typedef enum { GST_ZEDSRC_BT_KP_FULL = 0, GST_ZEDSRC_BT_KP_UPPER_BODY = 1 } GstZedSrcBtKpSelect;
typedef enum {
GST_ZEDSRC_SIDE_LEFT = 0,
GST_ZEDSRC_SIDE_RIGHT = 1,
GST_ZEDSRC_SIDE_BOTH = 2
} GstZedSrcSide;
typedef enum {
GST_ZEDSRC_PT_GEN_1 = 0,
GST_ZEDSRC_PT_GEN_2 = 1
} GstZedSrcPtMode;
//////////////// DEFAULT PARAMETERS
/////////////////////////////////////////////////////////////////////////////
// INITIALIZATION
#define DEFAULT_PROP_CAM_RES GST_ZEDSRC_AUTO_RES
#define DEFAULT_PROP_CAM_FPS GST_ZEDSRC_15FPS
#define DEFAULT_PROP_SDK_VERBOSE 0
#define DEFAULT_PROP_CAM_FLIP 2
#define DEFAULT_PROP_CAM_ID 0
#define DEFAULT_PROP_CAM_SN 0
#define DEFAULT_PROP_SVO_FILE ""
#define DEFAULT_PROP_OPENCV_CALIB_FILE ""
#define DEFAULT_PROP_STREAM_IP ""
#define DEFAULT_PROP_STREAM_PORT 30000
#define DEFAULT_PROP_STREAM_TYPE 0
#define DEFAULT_PROP_DEPTH_MIN 300.f
#define DEFAULT_PROP_DEPTH_MAX 20000.f
#define DEFAULT_PROP_DEPTH_MODE static_cast<gint>(sl::DEPTH_MODE::NONE)
#define DEFAULT_PROP_COORD_SYS static_cast<gint>(sl::COORDINATE_SYSTEM::IMAGE)
#define DEFAULT_PROP_DIS_SELF_CALIB FALSE
#define DEFAULT_PROP_DEPTH_STAB 1
//#define DEFAULT_PROP_RIGHT_DEPTH FALSE
#define DEFAULT_PROP_ROI FALSE
#define DEFAULT_PROP_ROI_X -1
#define DEFAULT_PROP_ROI_Y -1
#define DEFAULT_PROP_ROI_W -1
#define DEFAULT_PROP_ROI_H -1
// RUNTIME
#define DEFAULT_PROP_CONFIDENCE_THRESH 50
#define DEFAULT_PROP_TEXTURE_CONF_THRESH 100
#define DEFAULT_PROP_3D_REF_FRAME static_cast<gint>(sl::REFERENCE_FRAME::WORLD)
#define DEFAULT_PROP_FILL_MODE FALSE
// POSITIONAL TRACKING
#define DEFAULT_PROP_POS_TRACKING FALSE
#define DEFAULT_PROP_PT_MODE GST_ZEDSRC_PT_GEN_2
#define DEFAULT_PROP_CAMERA_STATIC FALSE
#define DEFAULT_PROP_POS_AREA_FILE_PATH ""
#define DEFAULT_PROP_POS_ENABLE_AREA_MEMORY TRUE
#define DEFAULT_PROP_POS_ENABLE_IMU_FUSION TRUE
#define DEFAULT_PROP_POS_ENABLE_POSE_SMOOTHING TRUE
#define DEFAULT_PROP_POS_SET_FLOOR_AS_ORIGIN FALSE
#define DEFAULT_PROP_POS_SET_GRAVITY_AS_ORIGIN TRUE
#define DEFAULT_PROP_POS_DEPTH_MIN_RANGE -1.0
#define DEFAULT_PROP_POS_INIT_X 0.0
#define DEFAULT_PROP_POS_INIT_Y 0.0
#define DEFAULT_PROP_POS_INIT_Z 0.0
#define DEFAULT_PROP_POS_INIT_ROLL 0.0
#define DEFAULT_PROP_POS_INIT_PITCH 0.0
#define DEFAULT_PROP_POS_INIT_YAW 0.0
// OBJECT DETECTION
#define DEFAULT_PROP_OD_ENABLE FALSE
#define DEFAULT_PROP_OD_SYNC TRUE
#define DEFAULT_PROP_OD_TRACKING TRUE
#define DEFAULT_PROP_OD_SEGM FALSE // NOTE(Walter) for the future
#define DEFAULT_PROP_OD_MODEL GST_ZEDSRC_OD_MULTI_CLASS_BOX_MEDIUM
#define DEFAULT_PROP_OD_FILTER_MODE GST_ZEDSRC_OD_FILTER_MODE_NMS3D_PER_CLASS
#define DEFAULT_PROP_OD_CONFIDENCE 50.0
#define DEFAULT_PROP_OD_MAX_RANGE DEFAULT_PROP_DEPTH_MAX
#define DEFAULT_PROP_OD_PREDICTION_TIMEOUT_S 0.2
#define DEFAULT_PROP_OD_ALLOW_REDUCED_PRECISION_INFERENCE FALSE
#define DEFAULT_PROP_OD_PEOPLE_CONF 35.0
#define DEFAULT_PROP_OD_VEHICLE_CONF 35.0
#define DEFAULT_PROP_OD_BAG_CONF 35.0
#define DEFAULT_PROP_OD_ANIMAL_CONF 35.0
#define DEFAULT_PROP_OD_ELECTRONICS_CONF 35.0
#define DEFAULT_PROP_OD_FRUIT_VEGETABLES_CONF 35.0
#define DEFAULT_PROP_OD_SPORT_CONF 35.0
// BODY TRACKING
#define DEFAULT_PROP_BT_ENABLE FALSE
#define DEFAULT_PROP_BT_SEGM FALSE // NOTE(Walter) for the future
#define DEFAULT_PROP_BT_SYNC TRUE
#define DEFAULT_PROP_BT_MODEL GST_ZEDSRC_BT_HUMAN_BODY_MEDIUM
#define DEFAULT_PROP_BT_FORMAT GST_ZEDSRC_BT_BODY_34
#define DEFAULT_PROP_BT_ALLOW_REDUCED_PRECISION_INFERENCE FALSE
#define DEFAULT_PROP_BT_MAX_RANGE DEFAULT_PROP_DEPTH_MAX
#define DEFAULT_PROP_BT_KP_SELECT GST_ZEDSRC_BT_KP_FULL
#define DEFAULT_PROP_BT_BODY_FITTING TRUE
#define DEFAULT_PROP_BT_TRACKING TRUE
#define DEFAULT_PROP_BT_PREDICTION_TIMEOUT_S 0.2
#define DEFAULT_PROP_BT_CONFIDENCE 20.0
#define DEFAULT_PROP_BT_MIN_KP_THRESH 5
#define DEFAULT_PROP_BT_SMOOTHING 0.0
// CAMERA CONTROLS
#define DEFAULT_PROP_BRIGHTNESS 4
#define DEFAULT_PROP_CONTRAST 4
#define DEFAULT_PROP_HUE 0
#define DEFAULT_PROP_SATURATION 4
#define DEFAULT_PROP_SHARPNESS 4
#define DEFAULT_PROP_GAMMA 8
#define DEFAULT_PROP_GAIN 60
#define DEFAULT_PROP_EXPOSURE 80
#define DEFAULT_PROP_AEG_AGC 1
#define DEFAULT_PROP_AEG_AGC_ROI_X -1
#define DEFAULT_PROP_AEG_AGC_ROI_Y -1
#define DEFAULT_PROP_AEG_AGC_ROI_W -1
#define DEFAULT_PROP_AEG_AGC_ROI_H -1
#define DEFAULT_PROP_AEG_AGC_ROI_SIDE GST_ZEDSRC_SIDE_BOTH
#define DEFAULT_PROP_WHITEBALANCE 4600
#define DEFAULT_PROP_WHITEBALANCE_AUTO 1
#define DEFAULT_PROP_LEDSTATUS 1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define GST_TYPE_ZED_SIDE (gst_zedsrc_side_get_type())
static GType gst_zedsrc_side_get_type(void) {
static GType zedsrc_side_type = 0;
if (!zedsrc_side_type) {
static GEnumValue pattern_types[] = {
{static_cast<gint>(sl::SIDE::LEFT), "Left side only", "LEFT"},
{static_cast<gint>(sl::SIDE::RIGHT), "Right side only", "RIGHT"},
{static_cast<gint>(sl::SIDE::BOTH), "Left and Right side", "BOTH"},
{0, NULL, NULL},
};
zedsrc_side_type = g_enum_register_static("GstZedsrcSide", pattern_types);
}
return zedsrc_side_type;
}
#define GST_TYPE_ZED_PT_MODE (gst_zedsrc_pt_mode_get_type())
static GType gst_zedsrc_pt_mode_get_type(void) {
static GType zedsrc_pt_mode_type = 0;
if (!zedsrc_pt_mode_type) {
static GEnumValue pattern_types[] = {
{static_cast<gint>(sl::POSITIONAL_TRACKING_MODE::GEN_1), "Generation 1", "GEN_1"},
{static_cast<gint>(sl::POSITIONAL_TRACKING_MODE::GEN_2), "Generation 2", "GEN_2"},
{0, NULL, NULL},
};
zedsrc_pt_mode_type = g_enum_register_static("GstZedsrcPtMode", pattern_types);
}
return zedsrc_pt_mode_type;
}
#define GST_TYPE_ZED_RESOL (gst_zedsrc_resol_get_type())
static GType gst_zedsrc_resol_get_type(void) {
static GType zedsrc_resol_type = 0;
if (!zedsrc_resol_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_HD2K, "2208x1242", "HD2K (USB3)"},
{GST_ZEDSRC_HD1080, "1920x1080", "HD1080 (USB3/GMSL2)"},
{GST_ZEDSRC_HD1200, "1920x1200", "HD1200 (GMSL2)"},
{GST_ZEDSRC_HD720, "1280x720", "HD720 (USB3)"},
{GST_ZEDSRC_SVGA, "960x600", "SVGA (GMSL2)"},
{GST_ZEDSRC_VGA, "672x376", "VGA (USB3)"},
{GST_ZEDSRC_AUTO_RES, "Automatic",
"Default value for the camera model"},
{0, NULL, NULL},
};
zedsrc_resol_type = g_enum_register_static("GstZedSrcRes", pattern_types);
}
return zedsrc_resol_type;
}
#define GST_TYPE_ZED_FPS (gst_zedsrc_fps_get_type())
static GType gst_zedsrc_fps_get_type(void) {
static GType zedsrc_fps_type = 0;
if (!zedsrc_fps_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_120FPS, "only SVGA (GMSL2) resolution", "120 FPS"},
{GST_ZEDSRC_100FPS, "only VGA (USB3) resolution", "100 FPS"},
{GST_ZEDSRC_60FPS, "VGA (USB3), HD720, HD1080 (GMSL2), and HD1200 (GMSL2) resolutions",
"60 FPS"},
{GST_ZEDSRC_30FPS, "VGA (USB3), HD720 (USB3) and HD1080 (USB3/GMSL2) resolutions",
"30 FPS"},
{GST_ZEDSRC_15FPS, "all resolutions (NO GMSL2)", "15 FPS"},
{0, NULL, NULL},
};
zedsrc_fps_type = g_enum_register_static("GstZedSrcFPS", pattern_types);
}
return zedsrc_fps_type;
}
#define GST_TYPE_ZED_FLIP (gst_zedsrc_flip_get_type())
static GType gst_zedsrc_flip_get_type(void) {
static GType zedsrc_flip_type = 0;
if (!zedsrc_flip_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_NO_FLIP, "Force no flip", "No Flip"},
{GST_ZEDSRC_FLIP, "Force flip", "Flip"},
{GST_ZEDSRC_AUTO, "Auto mode (ZED2/ZED2i/ZED-M only)", "Auto"},
{0, NULL, NULL},
};
zedsrc_flip_type = g_enum_register_static("GstZedSrcFlip", pattern_types);
}
return zedsrc_flip_type;
}
#define GST_TYPE_ZED_STREAM_TYPE (gst_zedsrc_stream_type_get_type())
static GType gst_zedsrc_stream_type_get_type(void) {
static GType zedsrc_stream_type_type = 0;
if (!zedsrc_stream_type_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_ONLY_LEFT, "8 bits- 4 channels Left image", "Left image [BGRA]"},
{GST_ZEDSRC_ONLY_RIGHT, "8 bits- 4 channels Right image", "Right image [BGRA]"},
{GST_ZEDSRC_LEFT_RIGHT, "8 bits- 4 channels bit Left and Right",
"Stereo couple up/down [BGRA]"},
{GST_ZEDSRC_DEPTH_16, "16 bits depth", "Depth image [GRAY16_LE]"},
{GST_ZEDSRC_LEFT_DEPTH, "8 bits- 4 channels Left and Depth(image)",
"Left and Depth up/down [BGRA]"},
{0, NULL, NULL},
};
zedsrc_stream_type_type = g_enum_register_static("GstZedSrcCoordSys", pattern_types);
}
return zedsrc_stream_type_type;
}
#define GST_TYPE_ZED_COORD_SYS (gst_zedsrc_coord_sys_get_type())
static GType gst_zedsrc_coord_sys_get_type(void) {
static GType zedsrc_coord_sys_type = 0;
if (!zedsrc_coord_sys_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_COORD_IMAGE,
"Standard coordinates system in computer vision. Used in OpenCV.", "Image"},
{GST_ZEDSRC_COORD_LEFT_HANDED_Y_UP,
"Left-Handed with Y up and Z forward. Used in Unity with DirectX.",
"Left handed, Y up"},
{GST_ZEDSRC_COORD_RIGHT_HANDED_Y_UP,
"Right-Handed with Y pointing up and Z backward. Used in OpenGL.",
"Right handed, Y up"},
{GST_ZEDSRC_COORD_RIGHT_HANDED_Z_UP,
"Right-Handed with Z pointing up and Y forward. Used in 3DSMax.",
"Right handed, Z up"},
{GST_ZEDSRC_COORD_LEFT_HANDED_Z_UP,
"Left-Handed with Z axis pointing up and X forward. Used in Unreal Engine.",
"Left handed, Z up"},
{GST_ZEDSRC_COORD_RIGHT_HANDED_Z_UP_X_FWD,
"Right-Handed with Z pointing up and X forward. Used in ROS (REP 103).",
"Right handed, Z up, X fwd"},
{0, NULL, NULL},
};
zedsrc_coord_sys_type = g_enum_register_static("GstZedsrcStreamType", pattern_types);
}
return zedsrc_coord_sys_type;
}
#define GST_TYPE_ZED_OD_MODEL_TYPE (gst_zedsrc_od_model_get_type())
static GType gst_zedsrc_od_model_get_type(void) {
static GType zedsrc_od_model_type = 0;
if (!zedsrc_od_model_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_OD_MULTI_CLASS_BOX_FAST, "Any objects, bounding box based",
"Object Detection Multi class FAST"},
{GST_ZEDSRC_OD_MULTI_CLASS_BOX_MEDIUM,
"Any objects, bounding box based, compromise between accuracy and speed",
"Object Detection Multi class MEDIUM"},
{GST_ZEDSRC_OD_MULTI_CLASS_BOX_ACCURATE,
"Any objects, bounding box based, more accurate but slower than the base model",
"Object Detection Multi class ACCURATE"},
{GST_ZEDSRC_OD_PERSON_HEAD_BOX_FAST,
"Bounding Box detector specialized in person heads, particularly well suited for "
"crowded environments, the person localization is also improved",
"Person Head FAST"},
{GST_ZEDSRC_OD_PERSON_HEAD_BOX_ACCURATE,
"Bounding Box detector specialized in person heads, particularly well suited for "
"crowded environments, the person localization is also improved, "
"more accurate but slower than the base model",
"Person Head ACCURATE"},
{0, NULL, NULL},
};
zedsrc_od_model_type = g_enum_register_static("GstZedSrcOdModel", pattern_types);
}
return zedsrc_od_model_type;
}
#define GST_TYPE_ZED_OD_FILTER_MODE_TYPE (gst_zedsrc_od_filter_mode_get_type())
static GType gst_zedsrc_od_filter_mode_get_type(void) {
static GType zedsrc_od_filter_mode_type = 0;
if (!zedsrc_od_filter_mode_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_OD_FILTER_MODE_NMS3D,
"SDK will not apply any preprocessing to the detected objects"},
{GST_ZEDSRC_OD_FILTER_MODE_NMS3D,
"SDK will remove objects that are in the same 3D position as an already tracked "
"object (independant of class ID)"},
{GST_ZEDSRC_OD_FILTER_MODE_NMS3D_PER_CLASS,
"SDK will remove objects that are in the same 3D position as an already tracked "
"object of the same class ID."},
{0, NULL, NULL},
};
zedsrc_od_filter_mode_type = g_enum_register_static("GstZedSrcOdFilterMode", pattern_types);
}
return zedsrc_od_filter_mode_type;
}
#define GST_TYPE_ZED_BT_MODEL_TYPE (gst_zedsrc_bt_model_get_type())
static GType gst_zedsrc_bt_model_get_type(void) {
static GType zedsrc_bt_model_type = 0;
if (!zedsrc_bt_model_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_BT_HUMAN_BODY_FAST,
"Keypoints based, specific to human skeleton, real time performance even on Jetson or "
"low end GPU cards",
"Body Tracking FAST"},
{GST_ZEDSRC_BT_HUMAN_BODY_MEDIUM,
"Keypoints based, specific to human skeleton, compromise between accuracy and speed",
"Body Tracking MEDIUM"},
{GST_ZEDSRC_BT_HUMAN_BODY_ACCURATE,
"Keypoints based, specific to human skeleton, state of the art accuracy, requires "
"powerful GPU",
"Body Tracking ACCURATE"},
{0, NULL, NULL},
};
zedsrc_bt_model_type = g_enum_register_static("GstZedSrcBtModel", pattern_types);
}
return zedsrc_bt_model_type;
}
#define GST_TYPE_ZED_BT_FORMAT_TYPE (gst_zedsrc_bt_format_get_type())
static GType gst_zedsrc_bt_format_get_type(void) {
static GType zedsrc_bt_format_type = 0;
if (!zedsrc_bt_format_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_BT_BODY_18, "18 keypoints format. Basic Body format", "Body 18 Key Points"},
{GST_ZEDSRC_BT_BODY_34,
"34 keypoints format. Body format, requires body fitting enabled",
"Body 34 Key Points"},
{GST_ZEDSRC_BT_BODY_38,
"38 keypoints format. Body format, including feet simplified face and hands",
"Body 38 Key Points"},
{0, NULL, NULL},
};
zedsrc_bt_format_type = g_enum_register_static("GstZedSrcBtFormat", pattern_types);
}
return zedsrc_bt_format_type;
}
#define GST_TYPE_ZED_BT_KP_SELECT_TYPE (gst_zedsrc_bt_kp_select_get_type())
static GType gst_zedsrc_bt_kp_select_get_type(void) {
static GType zedsrc_bt_kp_select_type = 0;
if (!zedsrc_bt_kp_select_type) {
static GEnumValue pattern_types[] = {
{GST_ZEDSRC_BT_KP_FULL, "Full keypoint model.", "Full keypoint model."},
{GST_ZEDSRC_BT_KP_UPPER_BODY,
"Upper body keypoint model. Only the upper body will be outputted (from hip)",
"Upper body keypoint model"},
{0, NULL, NULL},
};
zedsrc_bt_kp_select_type = g_enum_register_static("GstZedSrcBtKpSelect", pattern_types);
}
return zedsrc_bt_kp_select_type;
}
#define GST_TYPE_ZED_DEPTH_MODE (gst_zedsrc_depth_mode_get_type())
static GType gst_zedsrc_depth_mode_get_type(void) {
static GType zedsrc_depth_mode_type = 0;
if (!zedsrc_depth_mode_type) {
static GEnumValue pattern_types[] = {
{static_cast<gint>(sl::DEPTH_MODE::NEURAL_PLUS),
"More accurate Neural disparity estimation, Requires AI module.", "NEURAL_PLUS"},
{static_cast<gint>(sl::DEPTH_MODE::NEURAL),
"End to End Neural disparity estimation, requires AI module", "NEURAL"},
{static_cast<gint>(sl::DEPTH_MODE::ULTRA),
"Computation mode favorising edges and sharpness. Requires more GPU memory and "
"computation power.",
"ULTRA"},
{static_cast<gint>(sl::DEPTH_MODE::QUALITY),
"Computation mode designed for challenging areas with untextured surfaces.",
"QUALITY"},
{static_cast<gint>(sl::DEPTH_MODE::PERFORMANCE),
"Computation mode optimized for speed.", "PERFORMANCE"},
{static_cast<gint>(sl::DEPTH_MODE::NONE),
"This mode does not compute any depth map. Only rectified stereo images will be "
"available.",
"NONE"},
{0, NULL, NULL},
};
zedsrc_depth_mode_type = g_enum_register_static("GstZedsrcDepthMode", pattern_types);
}
return zedsrc_depth_mode_type;
}
#define GST_TYPE_ZED_3D_REF_FRAME (gst_zedsrc_3d_meas_ref_frame_get_type())
static GType gst_zedsrc_3d_meas_ref_frame_get_type(void) {
static GType zedsrc_3d_meas_ref_frame_type = 0;
if (!zedsrc_3d_meas_ref_frame_type) {
static GEnumValue pattern_types[] = {
{static_cast<gint>(sl::REFERENCE_FRAME::WORLD),
"The positional tracking pose transform will contains the motion with reference to "
"the world frame.",
"WORLD"},
{static_cast<gint>(sl::REFERENCE_FRAME::CAMERA),
"The pose transform will contains the motion with reference to the previous camera "
"frame.",
"CAMERA"},
{0, NULL, NULL},
};
zedsrc_3d_meas_ref_frame_type =
g_enum_register_static("GstZedsrc3dMeasRefFrame", pattern_types);
}
return zedsrc_3d_meas_ref_frame_type;
}
/* pad templates */
static GstStaticPadTemplate gst_zedsrc_src_template =
GST_STATIC_PAD_TEMPLATE("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS(("video/x-raw, " // Double stream VGA
"format = (string)BGRA, "
"width = (int)672, "
"height = (int)752 , "
"framerate = (fraction) { 15, 30, 60, 100 }"
";"
"video/x-raw, " // Double stream HD720
"format = (string)BGRA, "
"width = (int)1280, "
"height = (int)1440, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Double stream HD1080
"format = (string)BGRA, "
"width = (int)1920, "
"height = (int)2160, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Double stream HD2K
"format = (string)BGRA, "
"width = (int)2208, "
"height = (int)2484, "
"framerate = (fraction)15"
";"
"video/x-raw, " // Double stream HD1200 (GMSL2)
"format = (string)BGRA, "
"width = (int)1920, "
"height = (int)2400, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Double stream SVGA (GMSL2)
"format = (string)BGRA, "
"width = (int)960, "
"height = (int)1200, "
"framerate = (fraction) { 15, 30, 60, 120 }"
";"
"video/x-raw, " // Color VGA
"format = (string)BGRA, "
"width = (int)672, "
"height = (int)376, "
"framerate = (fraction) { 15, 30, 60, 100 }"
";"
"video/x-raw, " // Color HD720
"format = (string)BGRA, "
"width = (int)1280, "
"height = (int)720, "
"framerate = (fraction) { 15, 30, 60}"
";"
"video/x-raw, " // Color HD1080
"format = (string)BGRA, "
"width = (int)1920, "
"height = (int)1080, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Color HD2K
"format = (string)BGRA, "
"width = (int)2208, "
"height = (int)1242, "
"framerate = (fraction)15"
";"
"video/x-raw, " // Color HD1200 (GMSL2)
"format = (string)BGRA, "
"width = (int)1920, "
"height = (int)1200, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Color SVGA (GMSL2)
"format = (string)BGRA, "
"width = (int)960, "
"height = (int)600, "
"framerate = (fraction) { 15, 30, 60, 120 }"
";"
"video/x-raw, " // Depth VGA
"format = (string)GRAY16_LE, "
"width = (int)672, "
"height = (int)376, "
"framerate = (fraction) { 15, 30, 60, 100 }"
";"
"video/x-raw, " // Depth HD720
"format = (string)GRAY16_LE, "
"width = (int)1280, "
"height = (int)720, "
"framerate = (fraction) { 15, 30, 60}"
";"
"video/x-raw, " // Depth HD1080
"format = (string)GRAY16_LE, "
"width = (int)1920, "
"height = (int)1080, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Depth HD2K
"format = (string)GRAY16_LE, "
"width = (int)2208, "
"height = (int)1242, "
"framerate = (fraction)15"
";"
"video/x-raw, " // Depth HD1200 (GMSL2)
"format = (string)GRAY16_LE, "
"width = (int)1920, "
"height = (int)1200, "
"framerate = (fraction) { 15, 30, 60 }"
";"
"video/x-raw, " // Depth SVGA (GMSL2)
"format = (string)GRAY16_LE, "
"width = (int)960, "
"height = (int)600, "
"framerate = (fraction) { 15, 30, 60, 120 }")));
/* class initialization */
G_DEFINE_TYPE(GstZedSrc, gst_zedsrc, GST_TYPE_PUSH_SRC);
static void gst_zedsrc_class_init(GstZedSrcClass *klass) {
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS(klass);
GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS(klass);
GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS(klass);
gobject_class->set_property = gst_zedsrc_set_property;
gobject_class->get_property = gst_zedsrc_get_property;
gobject_class->dispose = gst_zedsrc_dispose;
gobject_class->finalize = gst_zedsrc_finalize;
gst_element_class_add_pad_template(gstelement_class,
gst_static_pad_template_get(&gst_zedsrc_src_template));
gst_element_class_set_static_metadata(gstelement_class, "ZED Camera Source", "Source/Video",
"Stereolabs ZED Camera source",
"Stereolabs <[email protected]>");
gstbasesrc_class->start = GST_DEBUG_FUNCPTR(gst_zedsrc_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR(gst_zedsrc_stop);
gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR(gst_zedsrc_get_caps);
gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR(gst_zedsrc_set_caps);
gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR(gst_zedsrc_unlock);
gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR(gst_zedsrc_unlock_stop);
gstpushsrc_class->fill = GST_DEBUG_FUNCPTR(gst_zedsrc_fill);
/* Install GObject properties */
g_object_class_install_property(
gobject_class, PROP_CAM_RES,
g_param_spec_enum("camera-resolution", "Camera Resolution", "Camera Resolution",
GST_TYPE_ZED_RESOL, DEFAULT_PROP_CAM_RES,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CAM_FPS,
g_param_spec_enum("camera-fps", "Camera frame rate", "Camera frame rate", GST_TYPE_ZED_FPS,
DEFAULT_PROP_CAM_FPS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_STREAM_TYPE,
g_param_spec_enum("stream-type", "Image stream type", "Image stream type",
GST_TYPE_ZED_STREAM_TYPE, DEFAULT_PROP_STREAM_TYPE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_SDK_VERBOSE,
g_param_spec_int("sdk-verbose", "ZED SDK Verbose", "ZED SDK Verbose level", 0, 1000,
DEFAULT_PROP_SDK_VERBOSE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CAM_FLIP,
g_param_spec_enum("camera-image-flip", "Camera image flip",
"Use the camera in forced flip/no flip or automatic mode",
GST_TYPE_ZED_FLIP, DEFAULT_PROP_CAM_FLIP,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CAM_ID,
g_param_spec_int("camera-id", "Camera ID", "Select camera from cameraID", 0, 255,
DEFAULT_PROP_CAM_ID,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CAM_SN,
g_param_spec_int64("camera-sn", "Camera Serial Number",
"Select camera from camera serial number", 0, G_MAXINT64,
DEFAULT_PROP_CAM_SN,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_SVO_FILE,
g_param_spec_string("svo-file-path", "SVO file", "Input from SVO file",
DEFAULT_PROP_SVO_FILE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_OPENCV_CALIB_FILE,
g_param_spec_string("opencv-calibration-file", "Optional OpenCV Calibration File", "Optional OpenCV Calibration File",
DEFAULT_PROP_OPENCV_CALIB_FILE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_STREAM_IP,
g_param_spec_string("input-stream-ip", "Input Stream IP",
"Specify IP adress when using streaming input", DEFAULT_PROP_SVO_FILE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_STREAM_PORT,
g_param_spec_int("input-stream-port", "Input Stream Port",
"Specify port when using streaming input", 1, G_MAXUINT16,
DEFAULT_PROP_STREAM_PORT,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_DEPTH_MIN,
g_param_spec_float("depth-minimum-distance", "Minimum depth value", "Minimum depth value",
100.f, 3000.f, DEFAULT_PROP_DEPTH_MIN,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_DEPTH_MAX,
g_param_spec_float("depth-maximum-distance", "Maximum depth value", "Maximum depth value",
500.f, 40000.f, DEFAULT_PROP_DEPTH_MAX,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_DEPTH_MODE,
g_param_spec_enum("depth-mode", "Depth Mode", "Depth Mode", GST_TYPE_ZED_DEPTH_MODE,
DEFAULT_PROP_DEPTH_MODE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_DIS_SELF_CALIB,
g_param_spec_boolean("camera-disable-self-calib", "Disable self calibration",
"Disable the self calibration processing when the camera is opened",
DEFAULT_PROP_DIS_SELF_CALIB,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
/*g_object_class_install_property( gobject_class, PROP_RIGHT_DEPTH_ENABLE,
g_param_spec_boolean("enable-right-side-measure", "Enable right
side measure", "Enable the MEASURE::DEPTH_RIGHT and other MEASURE::<XXX>_RIGHT at the cost of
additional computation time", DEFAULT_PROP_RIGHT_DEPTH, (GParamFlags) (G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));*/
g_object_class_install_property(
gobject_class, PROP_DEPTH_STAB,
g_param_spec_int("depth-stabilization", "Depth stabilization", "Enable depth stabilization",
0, 100, DEFAULT_PROP_DEPTH_STAB,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_COORD_SYS,
g_param_spec_enum("coordinate-system", "SDK Coordinate System", "3D Coordinate System",
GST_TYPE_ZED_COORD_SYS, DEFAULT_PROP_COORD_SYS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_ROI,
g_param_spec_boolean("roi", "Region of interest", "Enable region of interest filtering",
DEFAULT_PROP_ROI,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_ROI_X,
g_param_spec_int("roi-x", "Region of interest top left 'X' coordinate",
"Region of interest top left 'X' coordinate (-1 to not set ROI)", -1, 2208,
DEFAULT_PROP_ROI_X,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_ROI_Y,
g_param_spec_int("roi-y", "Region of interest top left 'Y' coordinate",
"Region of interest top left 'Y' coordinate (-1 to not set ROI)", -1, 1242,
DEFAULT_PROP_ROI_Y,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_ROI_W,
g_param_spec_int("roi-w", "Region of interest width",
"Region of intererst width (-1 to not set ROI)", -1, 2208,
DEFAULT_PROP_ROI_W,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_ROI_H,
g_param_spec_int("roi-h", "Region of interest height",
"Region of interest height (-1 to not set ROI)", -1, 1242,
DEFAULT_PROP_ROI_H,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CONFIDENCE_THRESH,
g_param_spec_int("confidence-threshold", "Depth Confidence Threshold",
"Specify the Depth Confidence Threshold", 0, 100,
DEFAULT_PROP_CONFIDENCE_THRESH,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_TEXTURE_CONF_THRESH,
g_param_spec_int("texture-confidence-threshold", "Texture Confidence Threshold",
"Specify the Texture Confidence Threshold", 0, 100,
DEFAULT_PROP_TEXTURE_CONF_THRESH,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_3D_REF_FRAME,
g_param_spec_enum("measure3D-reference-frame", "3D Measures Reference Frame",
"Specify the 3D Reference Frame", GST_TYPE_ZED_3D_REF_FRAME,
DEFAULT_PROP_3D_REF_FRAME,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_FILL_MODE,
g_param_spec_boolean("fill-mode", "Depth Fill Mode", "Specify the Depth Fill Mode",
DEFAULT_PROP_FILL_MODE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_POS_TRACKING,
g_param_spec_boolean("enable-positional-tracking", "Positional tracking",
"Enable positional tracking", DEFAULT_PROP_POS_TRACKING,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_POS_MODE,
g_param_spec_enum("positional-tracking-mode", "Positional tracking mode",
"Positional tracking mode", GST_TYPE_ZED_PT_MODE,
DEFAULT_PROP_PT_MODE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(
gobject_class, PROP_CAMERA_STATIC,
g_param_spec_boolean("set-as-static", "Camera static",
"Set to TRUE if the camera is static", DEFAULT_PROP_CAMERA_STATIC,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property(