Code Samples

Open in ClaudeOpen in ChatGPT

The ZED SDK provides multiple code examples to facilitate your learning experience with spatial perception and AI. All of these samples can be found on the StereoLabs GitHub page.

If you need assistance with building the examples, you can refer to the API Language section of the documentation for detailed instructions on how to set up your development environment.

If you haven’t already, we recommend checking out our tutorials first. These resources can provide valuable information to help you get started with the ZED SDK.

SampleDescriptionLink
Camera ControlShows how camera settings like Exposure, Gain, Contrast, Sharpness, etc. can be modified and display the resulting image.GitHub
Camera StreamingShows how to stream the ZED stereo video on an IP network, decode the video and display its live 3D point cloud.GitHub
Depth SensingShows how to capture a 3D point cloud and display it in an OpenGL window.GitHub
Positional TrackingDisplays the live position and orientation of the camera in a 3D window.GitHub
Object DetectionDetect and track objects in the scene, and display their 3D bounding boxes over the live image.GitHub
Body TrackingShows how to detect and track 3D human bodies in space and display skeletons over the live image.GitHub
Spatial MappingCaptures a live 3D mesh of the environment and displays it as an overlay on the camera image.GitHub
Plane DetectionShows how to detect floor and planar areas in the scene and draw them on the image.GitHub
Video RecordingShows how to record a lossless or compressed video in SVO format.C++
Python
Video PlaybackShows how to playback a recorded SVO video.C++
Python
Video ExportOpens an SVO file and exports video and depth to PNG or AVI files.C++
Python
Multi CameraShows how to open and use multiple ZED cameras at the same time in a single application.C++
Python