Skip to content

cinder/Cinder-StereolabsZed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stereolabs ZED Cinderblock

A CinderBlock for integrating Stereolabs ZED 2i cameras with the Cinder. This block provides easy access to ZED camera features including depth sensing, body tracking, object detection, multi-camera fusion, and network streaming.

image

Features

  • GPU Acceleration: CUDA-GL interop for efficient texture updates
  • Cross-Platform: Supports Windows and Linux

Requirements

Common Requirements

  • ZED SDK: Version 5.1 or later
  • Cinder: Latest version (0.9.4dev) from GitHub
  • CUDA: Version 11.0 or later (included with ZED SDK)
  • ZED Camera: ZED, ZED Mini, ZED 2, ZED 2i, or ZED X

Windows-Specific Requirements

  • Visual Studio 2022 or later: With C++ desktop development tools
  • The samples are configured to build with a CUDA_PATH environment variable
  • Build Type: Release or RelWithDebInfo recommended (the ZED SDK itself is not compatible with Debug builds)

Linux-Specific Requirements

  • Build Type: Release or RelWithDebInfo recommended (the ZED SDK itself is not compatible with Debug builds)

Getting Started

This cinderblock is designed to be cloned into the /blocks/ directory of your Cinder installation (e.g., Cinder/blocks/Cinder-StereolabsZed). This allows the samples to build unmodified without additional path configuration.

Windows

  1. Install ZED SDK:

    • Download ZED SDK 5.1+ from Stereolabs website
    • Run the installer (installs to C:\Program Files (x86)\ZED SDK\ by default)
    • Set CUDA_PATH environment variable to your CUDA installation (required by the samples) e.g. C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1
  2. Important: Build Configuration

    The ZED SDK libraries are built in Release mode. Mixing Debug and Release builds in C++ can cause crashes and memory corruption. You must build samples using Release or RelWithDebInfo configuration, not Debug.

Linux

  1. Install ZED SDK:

    • Download ZED SDK 5.1+ from Stereolabs website
    • Choose the appropriate version for your Ubuntu/CUDA combination
    • Run the installer (installs to /usr/local/zed by default)
    chmod +x <downloaded_installer>.run
    ./<downloaded_installer>.run
  2. Important: Build Configuration

    Like on Windows, the ZED SDK is built in Release mode. You must use RelWithDebInfo (or Release) when building samples to avoid crashes.

    The samples are pre-configured to default to RelWithDebInfo to match the ZED SDK's build configuration. If you're creating your own projects, always use:

    cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
  3. Build and Run a Sample:

    cd Cinder/blocks/Cinder-StereolabsZed/samples/ImageCapture/proj/cmake
    mkdir build && cd build
    cmake ..  # Uses RelWithDebInfo by default
    make
    ./RelWithDebInfo/ImageCapture/ImageCapture

Building Samples

Windows-Specific Build Notes

  • Use RelWithDebInfo or Release build configuration
  • Visual Studio project files available in samples/<SampleName>/vc2022/ directories

Linux-Specific Build Notes

  • Use -s flag with make for quiet builds: make -s
  • Executables built to Release/<SampleName>/ or RelWithDebInfo/<SampleName>/
  • You may need to run with sudo for camera access: sudo ./Release/<SampleName>/<SampleName>

Samples Overview

Sample Category Description Key Features
Controls Basic Camera controls and parameter adjustment Resolution, FPS, depth modes, exposure, gain
ImageCapture Basic Capture and display camera images Left/right RGB, CPU-based texture updates
ImageCaptureGPU Basic GPU-accelerated image capture CUDA-GL interop, GPU-direct texture updates
DepthView Depth Visualize depth maps Depth sensing, CPU-based depth texture
DepthViewGPU Depth GPU-accelerated depth visualization CUDA-GL interop for point clouds
Body2D Body Tracking 2D body tracking visualization BODY_18/34/38 formats, 2D keypoints
Body3D Body Tracking 3D body tracking with depth 3D keypoints, depth-based tracking
Object2D Object Detection 2D object detection and tracking Object bounding boxes, classification
Object3D Object Detection 3D object detection with depth 3D bounding boxes, position tracking, segmentation masks
BodyStreamingSend Network Streaming Publish body tracking over network TCP/IP streaming, Fusion API publisher
BodyStreamingReceive Network Streaming Receive body tracking from network TCP/IP subscriber, 3D visualization
StreamingVideoSend Network Streaming Stream compressed video over network H.264/H.265 encoding, video streaming
StreamingVideoReceive Network Streaming Receive and decode network video H.264/H.265 decoding
MultiCamViewer Multi-Camera View multiple cameras simultaneously Multi-camera display, camera selection
MultiCamDepthView Multi-Camera Multi-camera depth visualization Multiple depth streams, point clouds
MultiCamRegistration Multi-Camera Camera registration and calibration Multi-camera calibration, coordinate alignment
BodyFusion Multi-Camera Fusion Fuse body tracking from multiple cameras Body tracking fusion, multi-view
ObjectFusion Multi-Camera Fusion Fuse object detection from multiple cameras Object tracking fusion, multi-view

Resources

About

CinderBlock for the Stereolabs Zed2i depth camera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published