Code Samples

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 corresponding development sections:

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.C++
Python
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.C++ Python
Positional TrackingDisplays the live position and orientation of the camera in a 3D window.C++
Python
Spatial Object Detection2D Display Detect and track objects in the scene, and display their 3D bounding boxes over the live image.C++ Python
Spatial Object Detection3D Display Detect and track objects in the scene, and display their 3D bounding boxes over the live point cloud.C++ Python
Body TrackingShows how to detect and track 3D human bodies in space and display skeletons over the live image.C++
Python
Spatial MappingCaptures a live 3D mesh of the environment and displays it as an overlay on the camera image.C++ Python
Plane DetectionShows how to detect floor and planar areas in the scene and draw them on the image.C++ Python
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