Skip to content

stereolabs/zed-gstreamer

Repository files navigation

ZED GStreamer elements

GStreamer elements for the ZED stereo camera family

Key Features • Build • Elements properties • Metadata • Example pipelines • RTSP Server • Related • License


Key Features

GStreamer package for ZED Cameras. The package is composed of several elements:

  • zedsrc: acquires camera color image and depth map and pushes them in a GStreamer pipeline.
  • zedxonesrc: acquires camera color image from a ZED X One GS or ZED X One 4K camera and pushes them in a GStreamer pipeline. Note: this element does not use the ZED SDK, but a porting of the zedx-one-capture library.
  • zedmeta: GStreamer library to define and handle the ZED metadata (Positional Tracking data, Sensors data, Detected Object data, Detected Skeletons data).
  • zeddemux: receives a composite zedsrc stream (color left + color right data or color left + depth map + metadata), processes the eventual depth data and pushes them in two separated new streams named src_left and src_aux. A third source pad is created for metadata to be externally processed.
  • zeddatamux: receive a video stream compatible with ZED caps and a ZED Data Stream generated by the zeddemux and adds metadata to the video stream. This is useful if metadata are removed by a filter that does not automatically propagate metadata
  • zeddatacsvsink: example sink element that receives ZED metadata, extracts the Positional Tracking and the Sensors Data and save them in a CSV file.
  • zedodoverlay: example transform filter element that receives ZED combined stream with metadata, extracts Object Detection information and draws the overlays on the oncoming filter
  • RTSP Server: application for Linux that instantiates an RTSP server from a text launch pipeline "gst-launch" like.

Build

Prerequisites

Windows installation

  • Install the latest ZED SDK v4 from the official download page [Optional to compile the zedsrc element to acquire data from a ZED camera device]

  • Install Git or download a ZIP archive

  • Install CMake

  • Install a GStreamer distribution (both runtime and development installers).

  • The installer should set the installation path via the GSTREAMER_1_0_ROOT_X86_64 environment variable.

  • Add the path %GSTREAMER_1_0_ROOT_X86_64%\bin to the system variable PATH

  • Run the following commands from a terminal or command prompt, assuming CMake and Git are in your PATH.

    git clone https://github.com/stereolabs/zed-gstreamer.git
    cd zed-gstreamer
    mkdir build
    cd build
    cmake -G "Visual Studio 16 2019" ..
    cmake --build . --target INSTALL --config Release
    

Linux installation

Install prerequisites

  • Install the latest ZED SDK v4 from the official download page

  • Update list of apt available packages

    $ sudo apt update

  • Install GCC compiler and build tools

    $ sudo apt install build-essential

  • Install CMake build system

    $ sudo apt install cmake

  • Install GStreamer, the development packages and useful tools:

    $ sudo apt install libgstreamer1.0-0 gstreamer1.0-libav libgstrtspserver-1.0-0 gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libgstreamer1.0-dev libgstrtspserver-1.0-dev libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-0 libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-bad1.0-dev

  • [Optional] Install OpenCV to build the zedodverlay filter

    $ sudo apt install libopencv-dev libopencv-contrib-dev

Clone the repository

$ git clone https://github.com/stereolabs/zed-gstreamer.git
$ cd zed-gstreamer

Build

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make # Note: do not use the `-j` flag because parallel build is not supported
$ sudo make install

Installation test

  • Check ZED Video Source Element installation inspecting its properties:

    gst-inspect-1.0 zedsrc

  • Check ZED X One Video Source Element installation inspecting its properties:

    gst-inspect-1.0 zedxonesrc

  • Check ZED Video Demuxer installation inspecting its properties:

    gst-inspect-1.0 zeddemux

  • Check ZED Data Mux Element installation inspecting its properties:

    gst-inspect-1.0 zeddatamux

  • Check ZED CSV Sink Element installation inspecting its properties:

    gst-inspect-1.0 zeddatacsvsink

  • Check ZED Object Detection Overlay Element installation inspecting its properties:

    gst-inspect-1.0 zedodoverlay

Elements properties

ZED Video Source Element properties

Most of the properties follow the same name as the C++ API. Except that _ is replaced by - to follow gstreamer common formatting.

  area-file-path      : Area localization file that describes the surroundings, saved from a previous tracking session.
                        flags: readable, writable
                        String. Default: ""
  bt-allow-red-prec   : Set to TRUE to enable Body Tracking reduced inference precision 
                        flags: readable, writable
                        Boolean. Default: false
  bt-body-fitting     : Set to TRUE to enable Body Tracking model fitting 
                        flags: readable, writable
                        Boolean. Default: true
  bt-body-tracking    : Set to TRUE to enable body tracking across images flow 
                        flags: readable, writable
                        Boolean. Default: true
  bt-confidence       : Minimum Detection Confidence
                        flags: readable, writable
                        Float. Range:               0 -             100 Default:              20 
  bt-detection-model  : Body Tracking Model
                        flags: readable, writable
                        Enum "GstZedSrcBtModel" Default: 1, "Body Tracking MEDIUM"
                           (0): Body Tracking FAST - Keypoints based, specific to human skeleton, real time performance even on Jetson or low end GPU cards
                           (1): Body Tracking MEDIUM - Keypoints based, specific to human skeleton, compromise between accuracy and speed
                           (2): Body Tracking ACCURATE - Keypoints based, specific to human skeleton, state of the art accuracy, requires powerful GPU
  bt-enabled          : Set to TRUE to enable Body Tracking
                        flags: readable, writable
                        Boolean. Default: false
  bt-format           : Body Tracking format
                        flags: readable, writable
                        Enum "GstZedSrcBtFormat" Default: 1, "Body 34 Key Points"
                           (0): Body 18 Key Points - 18 keypoints format. Basic Body format
                           (1): Body 34 Key Points - 34 keypoints format. Body format, requires body fitting enabled
                           (2): Body 38 Key Points - 38 keypoints format. Body format, including feet simplified face and hands
  bt-max-range        : Maximum Detection Range
                        flags: readable, writable
                        Float. Range:              -1 -           20000 Default:           20000 
  bt-min-keypoints    : Specify the Minimum keypoints threshold.
                        flags: readable, writable
                        Integer. Range: 0 - 70 Default: 5 
  bt-prediction-timeout-s: Body Tracking prediction timeout (sec)
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:             0.2 
  bt-smoothing        : Smoothing of the fitted fused skeleton
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:               0 
  camera-disable-self-calib: Disable the self calibration processing when the camera is opened
                        flags: readable, writable
                        Boolean. Default: false
  camera-fps          : Camera frame rate
                        flags: readable, writable
                        Enum "GstZedSrcFPS" Default: 15, "15  FPS"
                           (120): 120 FPS          - only SVGA (GMSL2) resolution
                           (100): 100 FPS          - only VGA (USB3) resolution
                           (60): 60  FPS          - VGA (USB3), HD720, HD1080 (GMSL2), and HD1200 (GMSL2) resolutions
                           (30): 30  FPS          - VGA (USB3), HD720 (USB3) and HD1080 (USB3/GMSL2) resolutions
                           (15): 15  FPS          - all resolutions (NO GMSL2)
  camera-id           : Select camera from cameraID
                        flags: readable, writable
                        Integer. Range: 0 - 255 Default: 0 
  camera-image-flip   : Use the camera in forced flip/no flip or automatic mode
                        flags: readable, writable
                        Enum "GstZedSrcFlip" Default: 2, "Auto"
                           (0): No Flip          - Force no flip
                           (1): Flip             - Force flip
                           (2): Auto             - Auto mode (ZED2/ZED2i/ZED-M only)
  camera-resolution   : Camera Resolution
                        flags: readable, writable
                        Enum "GstZedsrcResolution" Default: 6, "Default value for the camera model"
                           (0): HD2K (USB3)      - 2208x1242
                           (2): HD1200 (GMSL2)   - 1920x1200
                           (1): HD1080 (USB3/GMSL2) - 1920x1080
                           (3): HD720 (USB3)     - 1280x720
                           (4): SVGA (GMSL2)     - 960x600
                           (5): VGA (USB3)       - 672x376
                           (6): Default value for the camera model - Automatic
  camera-sn           : Select camera from camera serial number
                        flags: readable, writable
                        Integer64. Range: 0 - 9223372036854775807 Default: 0 
  confidence-threshold: Specify the Depth Confidence Threshold
                        flags: readable, writable
                        Integer. Range: 0 - 100 Default: 50 
  coordinate-system   : 3D Coordinate System
                        flags: readable, writable
                        Enum "GstZedsrcStreamType" Default: 0, "Image"
                           (0): Image            - Standard coordinates system in computer vision. Used in OpenCV.
                           (1): Left handed, Y up - Left-Handed with Y up and Z forward. Used in Unity with DirectX.
                           (2): Right handed, Y up - Right-Handed with Y pointing up and Z backward. Used in OpenGL.
                           (3): Right handed, Z up - Right-Handed with Z pointing up and Y forward. Used in 3DSMax.
                           (4): Left handed, Z up - Left-Handed with Z axis pointing up and X forward. Used in Unreal Engine.
                           (5): Right handed, Z up, X fwd - Right-Handed with Z pointing up and X forward. Used in ROS (REP 103).
  ctrl-aec-agc        : Camera automatic gain and exposure
                        flags: readable, writable
                        Boolean. Default: true
  ctrl-aec-agc-roi-h  : Auto gain/exposure ROI height (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 1242 Default: -1 
  ctrl-aec-agc-roi-side: Auto gain/exposure ROI side
                        flags: readable, writable
                        Enum "GstZedsrcSide" Default: 2, "BOTH"
                           (0): LEFT             - Left side only
                           (1): RIGHT            - Right side only
                           (2): BOTH             - Left and Right side
  ctrl-aec-agc-roi-w  : Auto gain/exposure ROI width (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2208 Default: -1 
  ctrl-aec-agc-roi-x  : Auto gain/exposure ROI top left 'X' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2208 Default: -1 
  ctrl-aec-agc-roi-y  : Auto gain/exposure ROI top left 'Y' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 1242 Default: -1 
  ctrl-brightness     : Image brightness
                        flags: readable, writable
                        Integer. Range: 0 - 8 Default: 4 
  ctrl-contrast       : Image contrast
                        flags: readable, writable
                        Integer. Range: 0 - 8 Default: 4 
  ctrl-exposure       : Camera exposure
                        flags: readable, writable
                        Integer. Range: 0 - 100 Default: 80 
  ctrl-gain           : Camera gain
                        flags: readable, writable
                        Integer. Range: 0 - 100 Default: 60 
  ctrl-gamma          : Image gamma
                        flags: readable, writable
                        Integer. Range: 1 - 9 Default: 8 
  ctrl-hue            : Image hue
                        flags: readable, writable
                        Integer. Range: 0 - 11 Default: 0 
  ctrl-led-status     : Camera LED on/off
                        flags: readable, writable
                        Boolean. Default: true
  ctrl-saturation     : Image saturation
                        flags: readable, writable
                        Integer. Range: 0 - 8 Default: 4 
  ctrl-sharpness      : Image sharpness
                        flags: readable, writable
                        Integer. Range: 0 - 8 Default: 4 
  ctrl-whitebalance-auto: Image automatic white balance
                        flags: readable, writable
                        Boolean. Default: true
  ctrl-whitebalance-temperature: Image white balance temperature
                        flags: readable, writable
                        Integer. Range: 2800 - 6500 Default: 4600 
  depth-maximum-distance: Maximum depth value
                        flags: readable, writable
                        Float. Range:             500 -           40000 Default:           20000 
  depth-minimum-distance: Minimum depth value
                        flags: readable, writable
                        Float. Range:             100 -            3000 Default:             300 
  depth-mode          : Depth Mode
                        flags: readable, writable
                        Enum "GstZedsrcDepthMode" Default: 0, "NONE"
                           (5): NEURAL_PLUS      - More accurate Neural disparity estimation, Requires AI module.
                           (4): NEURAL           - End to End Neural disparity estimation, requires AI module
                           (3): ULTRA            - Computation mode favorising edges and sharpness. Requires more GPU memory and computation power.
                           (2): QUALITY          - Computation mode designed for challenging areas with untextured surfaces.
                           (1): PERFORMANCE      - Computation mode optimized for speed.
                           (0): NONE             - This mode does not compute any depth map. Only rectified stereo images will be available.
  depth-stabilization : Enable depth stabilization
                        flags: readable, writable
                        Integer. Range: 0 - 100 Default: 1 
  do-timestamp        : Apply current stream time to buffers
                        flags: readable, writable
                        Boolean. Default: false
  enable-area-memory  : This mode enables the camera to remember its surroundings. This helps correct positional tracking drift, and can be helpful for positioning different cameras relative to one other in space.
                        flags: readable, writable
                        Boolean. Default: true
  enable-imu-fusion   : This setting allows you to enable or disable IMU fusion. When set to false, only the optical odometry will be used.
                        flags: readable, writable
                        Boolean. Default: true
  enable-pose-smoothing: This mode enables smooth pose correction for small drift correction.
                        flags: readable, writable
                        Boolean. Default: true
  enable-positional-tracking: Enable positional tracking
                        flags: readable, writable
                        Boolean. Default: false
  fill-mode           : Specify the Depth Fill Mode
                        flags: readable, writable
                        Boolean. Default: false
  initial-world-transform-pitch: Pitch orientation of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:               0 -             360 Default:               0 
  initial-world-transform-roll: Roll orientation of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:               0 -             360 Default:               0 
  initial-world-transform-x: X position of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:   -3.402823e+38 -    3.402823e+38 Default:               0 
  initial-world-transform-y: Y position of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:   -3.402823e+38 -    3.402823e+38 Default:               0 
  initial-world-transform-yaw: Yaw orientation of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:               0 -             360 Default:               0 
  initial-world-transform-z: Z position of the camera in the world frame when the camera is started
                        flags: readable, writable
                        Float. Range:   -3.402823e+38 -    3.402823e+38 Default:               0 
  input-stream-ip     : Specify IP adress when using streaming input
                        flags: readable, writable
                        String. Default: ""
  input-stream-port   : Specify port when using streaming input
                        flags: readable, writable
                        Integer. Range: 1 - 65535 Default: 30000 
  measure3D-reference-frame: Specify the 3D Reference Frame
                        flags: readable, writable
                        Enum "GstZedsrc3dMeasRefFrame" Default: 0, "WORLD"
                           (0): WORLD            - The positional tracking pose transform will contains the motion with reference to the world frame.
                           (1): CAMERA           - The  pose transform will contains the motion with reference to the previous camera frame.
  name                : The name of the object
                        flags: readable, writable, 0x2000
                        String. Default: "zedsrc0"
  num-buffers         : Number of buffers to output before sending EOS (-1 = unlimited)
                        flags: readable, writable
                        Integer. Range: -1 - 2147483647 Default: -1 
  od-allow-reduced-precision-inference: Set to TRUE to allow inference to run at a lower precision to improve runtime
                        flags: readable, writable
                        Boolean. Default: false
  od-conf-animal      : Animal Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-bag         : Bag Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-electronics : Electronics Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-fruit-vegetables: Fruit/Vegetables Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-people      : People Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-sport       : Sport Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-conf-vehicle     : Vehicle Detection Confidence Threshold
                        flags: readable, writable
                        Float. Range:              -1 -             100 Default:              35 
  od-confidence       : Minimum Detection Confidence
                        flags: readable, writable
                        Float. Range:               0 -             100 Default:              50 
  od-detection-filter-mode: Object Detection Filter Mode
                        flags: readable, writable
                        Enum "GstZedSrcOdFilterMode" Default: 2, "(null)"
                           (1): (null)           - SDK will not apply any preprocessing to the detected objects
                           (1): (null)           - SDK will remove objects that are in the same 3D position as an already tracked object (independant of class ID)
                           (2): (null)           - SDK will remove objects that are in the same 3D position as an already tracked object of the same class ID.
  od-detection-model  : Object Detection Model
                        flags: readable, writable
                        Enum "GstZedSrcOdModel" Default: 1, "Object Detection Multi class MEDIUM"
                           (0): Object Detection Multi class FAST - Any objects, bounding box based
                           (1): Object Detection Multi class MEDIUM - Any objects, bounding box based, compromise between accuracy and speed
                           (2): Object Detection Multi class ACCURATE - Any objects, bounding box based, more accurate but slower than the base model
                           (3): Person Head FAST - Bounding Box detector specialized in person heads, particularly well suited for crowded environments, the person localization is also improved
                           (4): Person Head 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
  od-enable-tracking  : Set to TRUE to enable tracking for the detected objects
                        flags: readable, writable
                        Boolean. Default: true
  od-enabled          : Set to TRUE to enable Object Detection
                        flags: readable, writable
                        Boolean. Default: false
  od-max-range        : Maximum Detection Range
                        flags: readable, writable
                        Float. Range:              -1 -           20000 Default:           20000 
  od-prediction-timeout-s: Object prediction timeout (sec)
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:             0.2 
  parent              : The parent of the object
                        flags: readable, writable, 0x2000
                        Object of type "GstObject"
  pos-depth-min-range : This setting allows you to change the minmum depth used by the SDK for Positional Tracking.
                        flags: readable, writable
                        Float. Range:              -1 -           65535 Default:              -1 
  positional-tracking-mode: Positional tracking mode
                        flags: readable, writable
                        Enum "GstZedsrcPtMode" Default: 1, "GEN_2"
                           (0): GEN_1            - Generation 1
                           (1): GEN_2            - Generation 2
  roi                 : Enable region of interest filtering
                        flags: readable, writable
                        Boolean. Default: false
  roi-h               : Region of interest height (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 1242 Default: -1 
  roi-w               : Region of intererst width (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2208 Default: -1 
  roi-x               : Region of interest top left 'X' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2208 Default: -1 
  roi-y               : Region of interest top left 'Y' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 1242 Default: -1 
  sdk-verbose         : ZED SDK Verbose level
                        flags: readable, writable
                        Integer. Range: 0 - 1000 Default: 0 
  set-as-static       : Set to TRUE if the camera is static
                        flags: readable, writable
                        Boolean. Default: false
  set-floor-as-origin : This mode initializes the tracking to be aligned with the floor plane to better position the camera in space.
                        flags: readable, writable
                        Boolean. Default: false
  set-gravity-as-origin: This setting allows you to override of 2 of the 3 rotations from initial-world-transform using the IMU gravity default: true
                        flags: readable, writable
                        Boolean. Default: true
  stream-type         : Image stream type
                        flags: readable, writable
                        Enum "GstZedSrcCoordSys" Default: 0, "Left image [BGRA]"
                           (0): Left image [BGRA] - 8 bits- 4 channels Left image
                           (1): Right image [BGRA] - 8 bits- 4 channels Right image
                           (2): Stereo couple up/down [BGRA] - 8 bits- 4 channels bit Left and Right
                           (3): Depth image [GRAY16_LE] - 16 bits depth
                           (4): Left and Depth up/down [BGRA] - 8 bits- 4 channels Left and Depth(image)
  svo-file-path       : Input from SVO file
                        flags: readable, writable
                        String. Default: ""
  texture-confidence-threshold: Specify the Texture Confidence Threshold
                        flags: readable, writable
                        Integer. Range: 0 - 100 Default: 100

ZED X One Video Source Element properties

  analog-gain         : Analog Gain value in dB
                        flags: readable, writable
                        Float. Range:             0.1 -              30 Default:               1 
  anti-banding        : AE Anti Banding
                        flags: readable, writable
                        Enum "GstZedXOneSrcAntiBanding" Default: 1, "Automatic"
                           (0): Disabled         - Anti Banding disabled
                           (1): Automatic        - Automatic Anti Banding
                           (2): 50 Hz            - 50 Hz Anti Banding
                           (3): 60 Hz            - 60 Hz Anti Banding
  auto-analog-gain    : Enable Automatic Analog Gain
                        flags: readable, writable
                        Boolean. Default: true
  auto-analog-gain-range-max: Maximum Analog Gain in dB for the automatic analog gain setting
                        flags: readable, writable
                        Float. Range:             0.1 -              30 Default:              30 
  auto-analog-gain-range-min: Minimum Analog Gain in dB for the automatic analog gain setting
                        flags: readable, writable
                        Float. Range:             0.1 -              30 Default:               0 
  auto-digital-gain   : Enable Automatic Digital Gain
                        flags: readable, writable
                        Boolean. Default: true
  auto-digital-gain-range-max: Maximum Digital Gain for the automatic digital gain setting
                        flags: readable, writable
                        Float. Range:               1 -             256 Default:             256 
  auto-digital-gain-range-min: Minimum Digital Gain for the automatic digital gain setting
                        flags: readable, writable
                        Float. Range:               1 -             256 Default:               1 
  auto-exposure       : Enable Automatic Exposure
                        flags: readable, writable
                        Boolean. Default: true
  auto-exposure-range-max: Maximum exposure time in microseconds for the automatic exposure setting
                        flags: readable, writable
                        Integer. Range: 28 - 66000 Default: 66000 
  auto-exposure-range-min: Minimum exposure time in microseconds for the automatic exposure setting
                        flags: readable, writable
                        Integer. Range: 28 - 66000 Default: 28 
  auto-wb             : Enable Automatic White Balance
                        flags: readable, writable
                        Boolean. Default: true
  blocksize           : Size in bytes to read per buffer (-1 = default)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4096 
  camera-fps          : Camera frame rate
                        flags: readable, writable
                        Enum "GstZedXOneSrcFPS" Default: 15, "15  FPS"
                           (120): 120 FPS          - Only with SVGA. Not available with 4K mode
                           (60): 60  FPS          - Not available with 4K mode
                           (30): 30  FPS          - Not available with 4K mode
                           (15): 15  FPS          - all resolutions (NO GMSL2)
  camera-id           : Select camera from cameraID
                        flags: readable, writable
                        Integer. Range: 0 - 255 Default: 0 
  camera-resolution   : Camera Resolution
                        flags: readable, writable
                        Enum "GstZedXOneSrcResol" Default: 2, "HD1200"
                           (3): 4K               - 3840x2160
                           (2): HD1200           - 1920x1200
                           (1): HD1080           - 1920x1080
                           (0): SVGA             - 960x600
  camera-timeout      : Connection timeout in milliseconds
                        flags: readable, writable
                        Integer. Range: 100 - 100000000 Default: 1000 
  ctrl-aec-agc-roi-h  : Auto gain/exposure ROI height (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2160 Default: -1 
  ctrl-aec-agc-roi-w  : Auto gain/exposure ROI width (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 3810 Default: -1 
  ctrl-aec-agc-roi-x  : Auto gain/exposure ROI top left 'X' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 3810 Default: -1 
  ctrl-aec-agc-roi-y  : Auto gain/exposure ROI top left 'Y' coordinate (-1 to not set ROI)
                        flags: readable, writable
                        Integer. Range: -1 - 2160 Default: -1 
  denoising           : Denoising factor
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:             0.5 
  digital-gain        : Digital Gain value
                        flags: readable, writable
                        Integer. Range: 1 - 256 Default: 128 
  do-timestamp        : Apply current stream time to buffers
                        flags: readable, writable
                        Boolean. Default: false
  exposure-compensation: Exposure Compensation
                        flags: readable, writable
                        Float. Range:              -2 -               2 Default:               0 
  exposure-time       : Exposure time in microseconds
                        flags: readable, writable
                        Integer. Range: 28 - 66000 Default: 2000 
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "zedxonesrc0"
  num-buffers         : Number of buffers to output before sending EOS (-1 = unlimited)
                        flags: readable, writable
                        Integer. Range: -1 - 2147483647 Default: -1 
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  saturation          : Color Saturation
                        flags: readable, writable
                        Float. Range:               0 -               2 Default:               1 
  sharpening          : Image Sharpening
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:               1 
  swap-rb             : Swap Red and Blue color channels
                        flags: readable, writable
                        Boolean. Default: false
  tone-map-gamma-b    : Set the tone mapping curve from a gamma value (Channel B)
                        flags: readable, writable
                        Float. Range:             1.5 -             3.5 Default:               2 
  tone-map-gamma-g    : Set the tone mapping curve from a gamma value (Channel G)
                        flags: readable, writable
                        Float. Range:             1.5 -             3.5 Default:               2 
  tone-map-gamma-r    : Set the tone mapping curve from a gamma value (Channel R)
                        flags: readable, writable
                        Float. Range:             1.5 -             3.5 Default:               2 
  typefind            : Run typefind before negotiating (deprecated, non-functional)
                        flags: readable, writable, deprecated
                        Boolean. Default: false
  verbose-level       : Capture Library Verbose level
                        flags: readable, writable
                        Integer. Range: 0 - 4 Default: 0 
  white-balance-temp  : White Balance Temperature [°]
                        flags: readable, writable
                        Integer. Range: 2800 - 12000 Default: 5000

ZED Video Demuxer Element properties

  is-depth            : Aux source is GRAY16 depth
                        flags: readable, writable
                        Boolean. Default: true
  stream-data         : Enable binary data streaming on `src_data` pad
                        flags: readable, writable
                        Boolean. Default: false

ZED Data CSV sink Element properties

  append              : Append to an already existing CSV file
                        flags: readable, writable
                        Boolean. Default: false
  async               : Go asynchronously to PAUSED
                        flags: readable, writable
                        Boolean. Default: true
  blocksize           : Size in bytes to pull per buffer (0 = default)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4096 
  enable-last-sample  : Enable the last-sample property
                        flags: readable, writable
                        Boolean. Default: true
  last-sample         : The last sample received in the sink
                        flags: readable
                        Boxed pointer of type "GstSample"
  location            : Location of the CSV file to write
                        flags: readable, writable
                        String. Default: ""
  max-bitrate         : The maximum bits per second to render (0 = disabled)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 
  max-lateness        : Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited)
                        flags: readable, writable
                        Integer64. Range: -1 - 9223372036854775807 Default: -1 
  processing-deadline : Maximum processing time for a buffer in nanoseconds
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 20000000 
  qos                 : Generate Quality-of-Service events upstream
                        flags: readable, writable
                        Boolean. Default: false
  render-delay        : Additional render delay of the sink in nanoseconds
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 
  stats               : Sink Statistics
                        flags: readable
                        Boxed pointer of type "GstStructure"
                                                        average-rate: 0
                                                             dropped: 0
                                                            rendered: 0

  sync                : Sync on the clock
                        flags: readable, writable
                        Boolean. Default: false
  throttle-time       : The time to keep between rendered buffers (0 = disabled)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 

Metadata

The zedsrc element 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. The zeddatacsvsink and zedodoverlay elements demonstrate how to handle, respectively, the sensors data and the 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
  • ZedSensors: sensors data (only ZED-Mini and ZED2)
  • ZedObjectData: detected object information (only ZED2)

More details about the sub-structures are available in the gstzedmeta.h file

Pipeline examples

Local RGB stream + RGB rendering

    gst-launch-1.0 zedsrc ! queue ! autovideoconvert ! queue ! fpsdisplaysink

Local 16 bit Depth stream + Depth rendering

    gst-launch-1.0 zedsrc stream-type=3 ! queue ! autovideoconvert ! queue ! fpsdisplaysink

Local Left/Right stream + demux + double RGB rendering

    gst-launch-1.0 \
    zedsrc stream-type=2 ! queue ! \
    zeddemux is-depth=false name=demux \
    demux.src_left ! queue ! autovideoconvert ! fpsdisplaysink \
    demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink

Local Left/Depth stream + demux + double streams rendering

    gst-launch-1.0 \
    zedsrc stream-type=4 ! queue ! \
    zeddemux name=demux \
    demux.src_left ! queue ! autovideoconvert ! fpsdisplaysink \
    demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink

Local Left/Depth stream + demux + double streams rendering + data saving on CSV file

    gst-launch-1.0 \
    zedsrc stream-type=4 ! \
    zeddemux stream-data=TRUE name=demux \
    demux.src_left ! queue ! autovideoconvert ! fpsdisplaysink \
    demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink \
    demux.src_data ! queue ! zeddatacsvsink location="${HOME}/test_csv.csv" append=FALSE

Local Left/Right stream + Multiclass Object Detection result displaying

    gst-launch-1.0 \
    zedsrc stream-type=0 od-enabled=true od-detection-model=0 ! queue ! \
    zedodoverlay ! queue ! \
    autovideoconvert ! fpsdisplaysink

Local Left/Right stream + Fast Skeleton Tracking result displaying

    gst-launch-1.0 \
    zedsrc stream-type=2 bt-enabled=true bt-detection-model=0 ! queue ! \
    zedodoverlay ! queue ! \
    autovideoconvert ! fpsdisplaysink

Local Left RGB stream + Accurate Skeleton Tracking result displaying

    gst-launch-1.0 \
    zedsrc stream-type=0 bt-enabled=true bt-detection-model=2 ! queue ! \
    zedodoverlay ! queue ! \
    autovideoconvert ! fpsdisplaysink

Local Left/Depth stream + Fast Skeleton Tracking result displaying + demux + Skeleton Tracking result displaying + Depth displaying with FPS

    gst-launch-1.0 \
    zedsrc stream-type=4 bt-enabled=true bt-detection-model=0 ! \
    zeddemux name=demux \
    demux.src_left ! queue ! zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink \
    demux.src_aux ! queue ! autovideoconvert ! fpsdisplaysink

Local Left/Depth stream + Fast Skeleton Tracking result displaying + demux + rescaling + remux + Skeleton Tracking result displaying + Depth displaying with FPS

    gst-launch-1.0 \
    zeddatamux name=mux \
    zedsrc stream-type=4 bt-enabled=true bt-detection-model=0 ! \
    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 \
    demux.src_left ! queue ! videoscale ! video/x-raw,width=672,height=376 ! mux.sink_video \
    mux.src ! queue ! zedodoverlay ! queue ! \
    autovideoconvert ! fpsdisplaysink

Local ZED X One RGB stream + RGB rendering with FPS information (default settings)

    gst-launch-1.0 zedxonesrc ! queue ! autovideoconvert ! queue ! fpsdisplaysink

Local ZED X One 4K RGB stream at 15 FPS + RGB rendering with FPS information

    gst-launch-1.0 zedxonesrc camera-resolution=3 camera-fps=15 ! queue ! autovideoconvert ! queue ! fpsdisplaysink

Local ZED X One GS 1200p RGB stream at 60 FPS + RGB rendering with FPS information

    gst-launch-1.0 zedxonesrc camera-resolution=2 camera-fps=60 ! queue ! autovideoconvert ! queue ! fpsdisplaysink

RTSP Server

Available only for Linux

An application to start an RTSP server from a text pipeline (using the same sintax of the CLI command gst-launch-1.0) is provided.

Usage:

   gst-zed-rtsp-launch [OPTION?] PIPELINE-DESCRIPTION

Help Options:

  • -h, --help -> Show help options.
  • --help-all -> Show all help options.
  • --help-gst -> Show GStreamer Options.

Application Options:

  • -p, --port=PORT -> Port to listen on (default: 8554).
  • -a, --address=HOST -> Host address (default: 127.0.0.1).

Example:

   gst-zed-rtsp-launch zedsrc ! videoconvert ! 'video/x-raw, format=(string)I420' ! x264enc ! rtph264pay pt=96 name=pay0

It is mandatory to define at least one payload named pay0; it is possible to define multiple payloads using an increasing index (i.e. pay1, pay2, ...).

Ready-To-Use scripts

Ready to use scripts are available in the scripts folder for Windows, Desktop Linux, and Jetson

  • local-od-fps_overlay : Left and Depth image rendering with object detection (FAST HUMAN BODY TRACKING) data (overlay).

  • local-rgb-depth-sens-csv : Left and Depth image rendering and sensors data saved in csv file.

  • local-rgb_left_depth-fps_rendering : Left and Depth image rendering.

  • local-rgb_left_right-fps_rendering : Left and Right image rendering.

  • local-rgb-od_multi-overlay : Left image rendering with object detection on overlay (MULTI_CLASS)

  • local-rgb-rescale-od-overlay : Left and Depth image rendering with object detection with rescaling filter

  • local-rgb-skel_accurate-overlay : Left image rendering with human body pose ACCURATE overlay

  • local-rgb-skel_fast-overlay : Left/Right in top/bottom image rendering with human body pose FAST overlay

  • [Linux only] udp and rtsp sender/receiver.

Related

License

This library is licensed under the LGPL License.

Support

If you need assistance go to our Community site at https://community.stereolabs.com/