Skip to content

Commit

Permalink
Merge pull request #10 from stereolabs/fix_scripts
Browse files Browse the repository at this point in the history
Fix scripts
  • Loading branch information
Myzhar authored Aug 31, 2020
2 parents 0e06d99 + 0cf0a28 commit e4240f3
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 24 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ GStreamer plugin package for ZED Cameras. The package is composed of several plu
* Check `ZED Video Source Plugin` installation inspecting its properties:
`gst-inspect-1.0 zedgst-inspect-1.0 zedsrc`
`gst-inspect-1.0 zedsrc`
* Check `ZED Video Demuxer` installation inspecting its properties:
Expand All @@ -123,23 +123,22 @@ Most of the parameters follow the same name as the C++ API. Except that `_` is r
* `resolution`: stream resolution - {VGA (3), HD270 (2), HD1080 (1), HD2K (0)}
* `framerate`: stream framerate - {15, 30, 60, 100}
* `stream-type`: type of video stream - {Left image (0), Right image (1), Stereo couple (2), 16 bit depth (3), Left+Depth (4)}
* `verbose`: SDK verbose mode - {TRUE, FALSE}
* `flip`: flip streams vertically - {TRUE, FALSE, AUTO}
* `camera-id`: camera ID - [0, 256]
* `camera-sn`: camera serial number
* `svo-file-path`: SVO file path for SVO input
* `in-stream-ip-addr`: device(sender) IP address when using streaming input from ZED SDK
* `in-stream-port `: IP port when using streaming input from ZED SDK
* `stream-type`: type of video stream - {Left image (0), Right image (1), Stereo couple (2), 16 bit depth (3), Left+Depth (4)}
* `min-depth`: Minimum depth value
* `max-depth`: Maximum depth value
* `enable-right-side-measure `: Enable right side measures - {TRUE, FALSE}
* `disable-self-calib`: Disable the self calibration processing when the camera is opened - {TRUE, FALSE}
* `depth-stability`: Enable depth stabilization - {TRUE, FALSE}
* `pos-tracking`: Enable positional tracking - {TRUE, FALSE}
* `cam-static `: Set to TRUE if the camera is static - {TRUE, FALSE}
* `coord-system`: ZED SDK Coordinate System - {Image (0) - Left handed, Y up (1) - Right handed, Y up (2) - Right handed, Z up (3) - Left handed, Z up (4) - Right handed, Z up, X fwd (5)}
* `coord-system `: Enable Object Detection - {TRUE, FALSE}
* `od-enabled`: Enable Object Detection - {TRUE, FALSE}
* `od-tracking`: Enable tracking for the detected objects - {TRUE, FALSE}
* `od-detection-model`: Object Detection Model - {Multi class (0), Human Body Tracking FAST (1), Human Body Tracking ACCURATE (2)}
* `od-confidence`: Minimum Detection Confidence - [0,100]
Expand All @@ -150,10 +149,12 @@ Most of the parameters follow the same name as the C++ API. Except that `_` is r
* `stream-data`: Enable binary data streaming on `src_data` pad - {TRUE, FALSE}
### `ZED Data CSV sink Plugin` parameters
* `location`: Location of the CSV file to write
* `append`: Append data to an already existing CSV file
## Metadata
The `zedsrc` plugin add metadata to the video stream containing information about the original frame size,
the camera position and orientatio, the sensors data and the object and skeleton detected by the Object Detection
module.
Expand All @@ -162,6 +163,7 @@ detected object data.
The `GstZedSrcMeta` structure is provided to handle the `zedmeta` metadata and it is available in the `gstzedmeta` library.
### GstZedSrcMeta structure
The GstZedSrcMeta is subdivided in four sub-structures:
* `ZedInfo`: info about camera model, stream type and original stream size
* `ZedPose`: position and orientation of the camera if positional tracking is enabled
Expand Down Expand Up @@ -249,7 +251,7 @@ More details about the sub-structures are available in the [`gstzedmeta.h` file]
```
gst-launch-1.0 \
zedsrc stream-type=2 od-enabled=true od-detection-model=1 resolution=0 camera-fps=15 ! queue ! \
zedsrc stream-type=2 od-enabled=true od-detection-model=1 resolution=0 framerate=15 ! queue ! \
zedodoverlay ! queue ! \
autovideoconvert ! fpsdisplaysink
```
Expand All @@ -261,7 +263,7 @@ More details about the sub-structures are available in the [`gstzedmeta.h` file]
```
gst-launch-1.0 \
zedsrc stream-type=0 od-enabled=true od-detection-model=2 resolution=0 camera-fps=15 ! queue ! \
zedsrc stream-type=0 od-enabled=true od-detection-model=2 resolution=0 framerate=15 ! queue ! \
zedodoverlay ! queue ! \
autovideoconvert ! fpsdisplaysink
```
Expand All @@ -273,7 +275,7 @@ More details about the sub-structures are available in the [`gstzedmeta.h` file]
```
gst-launch-1.0 \
zedsrc stream-type=4 resolution=2 camera-fps=30 od-enabled=true od-detection-model=1 ! \
zedsrc stream-type=4 resolution=2 framerate=30 od-enabled=true od-detection-model=1 ! \
zeddemux name=demux \
demux.src_left ! queue ! zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink \
demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink
Expand All @@ -287,7 +289,7 @@ More details about the sub-structures are available in the [`gstzedmeta.h` file]
```
gst-launch-1.0 \
zeddatamux name=mux \
zedsrc stream-type=4 resolution=0 camera-fps=15 od-enabled=true od-detection-model=1 ! \
zedsrc stream-type=4 resolution=0 framerate=15 od-enabled=true od-detection-model=1 ! \
zeddemux stream-data=true is-depth=true name=demux \
demux.src_aux ! queue ! autovideoconvert ! videoscale ! video/x-raw,width=672,height=376 ! queue ! fpsdisplaysink \
demux.src_data ! mux.sink_data \
Expand Down
8 changes: 4 additions & 4 deletions gst-zed-src/gstzedsrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,12 @@ static void gst_zedsrc_class_init (GstZedSrcClass * klass)

/* Install GObject properties */
g_object_class_install_property( gobject_class, PROP_CAM_RES,
g_param_spec_enum("camera-resolution", "Camera Resolution",
g_param_spec_enum("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",
g_param_spec_enum("framerate", "Camera frame rate",
"Camera frame rate", GST_TYPE_ZED_FPS, DEFAULT_PROP_CAM_FPS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));

Expand Down Expand Up @@ -522,7 +522,7 @@ static void gst_zedsrc_class_init (GstZedSrcClass * klass)
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));

g_object_class_install_property( gobject_class, PROP_OD_ENABLE,
g_param_spec_boolean("enable-object-detection", "Object Detection enable",
g_param_spec_boolean("od-enabled", "Object Detection enable",
"Set to TRUE to enable Object Detection",
DEFAULT_PROP_OD_ENABLE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
Expand All @@ -548,7 +548,7 @@ static void gst_zedsrc_class_init (GstZedSrcClass * klass)


g_object_class_install_property( gobject_class, PROP_OD_DET_MODEL,
g_param_spec_enum("object-detection-model", "Object detection model",
g_param_spec_enum("od-detection-model", "Object detection model",
"Object Detection Model", GST_TYPE_ZED_OD_MODEL_TYPE,
DEFAULT_PROP_OD_MODEL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/local-od-fps_overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 4) Display the depth stream with FPS info using the `fpsdisplaysink` sink plugin.

gst-launch-1.0 \
zedsrc stream-type=4 camera-resolution=2 camera-fps=30 enable-object-detection=true object-detection-model=1 ! \
zedsrc stream-type=4 resolution=2 framerate=30 od-enabled=true od-detection-model=1 ! \
zeddemux name=demux \
demux.src_left ! queue ! zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink \
demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink
2 changes: 1 addition & 1 deletion scripts/linux/local-rgb-rescale-od-overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

gst-launch-1.0 \
zeddatamux name=mux \
zedsrc stream-type=4 camera-resolution=0 camera-fps=30 object-detection-model=1 enable-object-detection=true ! \
zedsrc stream-type=4 resolution=0 framerate=30 od-detection-model=1 od-enabled=true ! \
zeddemux stream-data=true is-depth=true name=demux \
demux.src_aux ! queue ! autovideoconvert ! videoscale ! video/x-raw,width=672,height=376 ! queue ! fpsdisplaysink \
demux.src_data ! mux.sink_data \
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/local-rgb-skel_accurate-overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
# 3) Convert the stream and display it with FPS information

gst-launch-1.0 \
zedsrc stream-type=0 enable-object-detection=true object-detection-model=2 camera-resolution=2 camera-fps=15 ! queue ! \
zedsrc stream-type=0 od-enabled=true od-detection-model=2 resolution=2 framerate=15 ! queue ! \
zedodoverlay ! queue ! \
autovideoconvert ! fpsdisplaysink
2 changes: 1 addition & 1 deletion scripts/linux/local-rgb-skel_fast-overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
# 3) Convert the stream and display it with FPS information

gst-launch-1.0 \
zedsrc stream-type=2 enable-object-detection=true object-detection-model=1 camera-resolution=2 camera-fps=30 ! queue ! \
zedsrc stream-type=2 od-enabled=true od-detection-model=1 resolution=2 framerate=30 ! queue ! \
zedodoverlay ! queue ! \
autovideoconvert ! fpsdisplaysink
4 changes: 2 additions & 2 deletions scripts/linux/network-rgb-h264-sender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# install x264enc: `sudo apt-get install gstreamer1.0-libav x264 gstreamer1.0-plugins-ugly`

gst-launch-1.0 zedsrc camera-resolution=2 camera-fps=30 ! timeoverlay ! tee name=split has-chain=true ! \
gst-launch-1.0 zedsrc resolution=2 framerate=30 ! timeoverlay ! tee name=split has-chain=true ! \
queue ! autovideoconvert ! fpsdisplaysink \
split. ! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ! autovideoconvert ! \
split. ! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ! autovideoconvert ! \
x264enc byte-stream=true tune=zerolatency speed-preset=ultrafast bitrate=3000 ! \
h264parse ! rtph264pay config-interval=-1 pt=96 ! queue ! \
udpsink clients=127.0.0.1:5000 max-bitrate=3000000 sync=false async=false
2 changes: 1 addition & 1 deletion scripts/linux/rtsp-rgb-h264-sender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export SERVER_IP=${HOST_IPS[0]}


gst-zed-rtsp-launch -a ${SERVER_IP} \
zedsrc camera-resolution=2 camera-fps=30 stream-type=0 ! identity silent=false ! \
zedsrc resolution=2 framerate=30 stream-type=0 ! identity silent=false ! \
videoconvert ! video/x-raw, format=I420 ! \
x264enc tune=zerolatency bitrate=500000 speed-preset=ultrafast key-int-max=30 qp-min=8 qp-max=51 qp-step=1 ! \
rtph264pay config-interval=-1 mtu=1500 pt=96 name=pay0
2 changes: 1 addition & 1 deletion scripts/windows/local-od-fps_overlay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:: 4) Display the depth stream with FPS info using the `fpsdisplaysink` sink plugin.

gst-launch-1.0 ^
zedsrc stream-type=4 camera-resolution=2 camera-fps=30 enable-object-detection=true object-detection-model=1 ! ^
zedsrc stream-type=4 resolution=2 framerate=30 od-enabled=true od-detection-model=1 ! ^
zeddemux name=demux ^
demux.src_left ! queue ! zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink ^
demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink
2 changes: 1 addition & 1 deletion scripts/windows/local-rgb-od_multi-overlay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
:: 3) Convert the stream and display it with FPS information

gst-launch-1.0 ^
zedsrc stream-type=0 enable-object-detection=true object-detection-model=0 camera-resolution=2 camera-fps=30 ! queue ! ^
zedsrc stream-type=0 od-enabled=true od-detection-model=0 resolution=2 framerate=30 ! queue ! ^
zedodoverlay ! queue ! ^
autovideoconvert ! fpsdisplaysink
2 changes: 1 addition & 1 deletion scripts/windows/local-rgb-rescale-od-overlay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

gst-launch-1.0 ^
zeddatamux name=mux ^
zedsrc stream-type=4 camera-resolution=0 camera-fps=30 object-detection-model=1 enable-object-detection=true ! ^
zedsrc stream-type=4 resolution=0 framerate=30 od-detection-model=1 od-enabled=true ! ^
zeddemux stream-data=true is-depth=true name=demux ^
demux.src_aux ! queue ! autovideoconvert ! videoscale ! video/x-raw,width=672,height=376 ! queue ! fpsdisplaysink ^
demux.src_data ! mux.sink_data ^
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/local-rgb-skel_accurate-overlay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
:: 3) Convert the stream and display it with FPS information

gst-launch-1.0 ^
zedsrc stream-type=0 enable-object-detection=true object-detection-model=2 camera-resolution=2 camera-fps=15 ! queue ! ^
zedsrc stream-type=0 od-enabled=true od-detection-model=2 resolution=2 framerate=15 ! queue ! ^
zedodoverlay ! queue ! ^
autovideoconvert ! fpsdisplaysink
2 changes: 1 addition & 1 deletion scripts/windows/local-rgb-skel_fast-overlay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
:: 3) Convert the stream and display it with FPS information

gst-launch-1.0 ^
zedsrc stream-type=0 enable-object-detection=true object-detection-model=1 camera-resolution=2 camera-fps=30 ! queue ! ^
zedsrc stream-type=0 od-enabled=true od-detection-model=1 resolution=2 framerate=30 ! queue ! ^
zedodoverlay ! queue ! ^
autovideoconvert ! fpsdisplaysink

0 comments on commit e4240f3

Please sign in to comment.