GStreamer - ZED Camera Source

The ZED Camera Source, zedsrc GStreamer element, is the main plugin of the package, it allows injecting the ZED data in a GStreamer pipeline and getting the information provided by the ZED SDK.

Following a simple pipeline to display on screen color ZED images from the left camera:

gst-launch-1.0 zedsrc ! videoconvert ! ximagesink

Example pipelines

  • Display color stereo couple with VGA resolution at 100 FPS:
gst-launch-1.0 zedsrc resolution=3 framerate=100 stream-type=2 ! videoconvert ! ximagesink
  • Display depth map (not normalized) with HD720 resolution at 60 FPS:
gst-launch-1.0 zedsrc resolution=2 framerate=60 stream-type=3 ! videoconvert ! ximagesink
  • Acquire an HD720 at 30 FPS color stream, display in on screen and it on local network over UDP with H264 encoding:
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 ! \
 x264enc byte-stream=true tune=zerolatency speed-preset=ultrafast bitrate=3000 ! \
 h264parse ! rtph264pay config-interval=-1 pt=96 ! queue ! \
 udpsink clients=<dest_ip_address>:5000 max-bitrate=3000000 sync=false async=false

Parameters

  • resolution : Camera Resolution
    flags: readable, writable
    EnumGstZedsrcResolution” - Default: 1, “HD1080”
    (3): VGA - 672x376
    (2): HD720 - 1280x720
    (1): HD1080 - 1920x1080
    (0): HD2K - 2208x1242\

  • framerate : Camera frame rate
    flags: readable, writable
    EnumGstZedSrcFPS” - Default: 30, “30 FPS”
    (100): 100 FPS - only VGA resolution
    (60): 60 FPS - only VGA and HD720 resolutions
    (30): 30 FPS - only VGA, HD720 and HD1080 resolutions
    (15): 15 FPS - all resolutions\

  • stream-type : Image stream type
    flags: readable, writable
    EnumGstZedSrcCoordSys” - 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)

  • sdk-verbose : ZED SDK Verbose
    flags: readable, writable
    Boolean. - Default: false\

  • camera-image-flip : Use the camera in forced flip/no flip or automatic mode
    flags: readable, writable
    EnumGstZedSrcFlip” - Default: 2, “Auto”
    (0): No Flip - Force no flip
    (1): Flip - Force flip
    (2): Auto - Auto mode (ZED2/ZED-M only)

  • camera-id : Select camera from cameraID
    flags: readable, writable
    Integer. Range: 0 - 255 - Default: 0

  • camera-sn : Select camera from camera serial number
    flags: readable, writable
    Integer64. Range: 0 - 9223372036854775807 - Default: 0

  • svo-file-path : Input from SVO file
    flags: readable, writable
    String. - Default: "”

  • 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

  • depth-minimum-distance: Minimum depth value
    flags: readable, writable
    Float. Range: 100 - 3000 - Default: 300

  • depth-maximum-distance: Maximum depth value
    flags: readable, writable
    Float. Range: 500 - 40000 - Default: 20000

  • camera-disable-self-calib: Disable the self calibration processing when the camera is opened
    flags: readable, writable
    Boolean. - Default: false

  • enable-right-side-measure: Enable the MEASURE::DEPTH_RIGHT and other MEASURE::_RIGHT at the cost of additional computation time
    flags: readable, writable
    Boolean. - Default: false

  • depth-stabilization : Enable depth stabilization
    flags: readable, writable
    Boolean. - Default: true

  • enable-positional-tracking: Enable positional tracking
    flags: readable, writable
    Boolean. - Default: true

  • camera-is-static : Set to TRUE if the camera is static
    flags: readable, writable
    Boolean. - Default: false

  • coordinate-system : 3D Coordinate System
    flags: readable, writable
    EnumGstZedsrcStreamType” - 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).

  • od-enabled : Set to TRUE to enable Object Detection
    flags: readable, writable
    Boolean. - Default: false

  • object-detection-image-sync: Set to TRUE to enable Object Detection frame synchronization\
    flags: readable, writable
    Boolean. - Default: true

  • object-detection-tracking: Set to TRUE to enable tracking for the detected objects
    flags: readable, writable
    Boolean. - Default: true

  • od-detection-model : Object Detection Model
    flags: readable, writable
    EnumGstZedSrcOdModel” - Default: 0, “Object Detection Multi class”
    (0): Object Detection Multi class - Any objects, bounding box based
    (1): Object Detection Multi class ACCURATE - Any objects, bounding box based, state of the art accuracy, requires powerful GPU
    (2): Skeleton tracking FAST - Keypoints based, specific to human skeleton, real time performance even on Jetson or low end GPU cards
    (3): Skeleton tracking ACCURATE - Keypoints based, specific to human skeleton, state of the art accuracy, requires powerful GPU

  • object-detection-confidence: Minimum Detection Confidence
    flags: readable, writable
    Float. Range: 0 - 100 - Default: 50