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:
- C++: Linux / Windows
- Python: Install the API
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.
Sample | Description | Link |
---|---|---|
Camera Control | Shows how camera settings like Exposure, Gain, Contrast, Sharpness, etc. can be modified and display the resulting image. | C++ Python |
Camera Streaming | Shows how to stream the ZED stereo video on an IP network, decode the video and display its live 3D point cloud. | GitHub |
Depth Sensing | Shows how to capture a 3D point cloud and display it in an OpenGL window. | C++ Python |
Positional Tracking | Displays the live position and orientation of the camera in a 3D window. | C++ Python |
Spatial Object Detection | 2D Display Detect and track objects in the scene, and display their 3D bounding boxes over the live image. | C++ Python |
Spatial Object Detection | 3D Display Detect and track objects in the scene, and display their 3D bounding boxes over the live point cloud. | C++ Python |
Body Tracking | Shows how to detect and track 3D human bodies in space and display skeletons over the live image. | C++ Python |
Spatial Mapping | Captures a live 3D mesh of the environment and displays it as an overlay on the camera image. | C++ Python |
Plane Detection | Shows how to detect floor and planar areas in the scene and draw them on the image. | C++ Python |
Video Recording | Shows how to record a lossless or compressed video in SVO format. | C++ Python |
Video Playback | Shows how to playback a recorded SVO video. | C++ Python |
Video Export | Opens an SVO file and exports video and depth to PNG or AVI files. | C++ Python |
Multi Camera | Shows how to open and use multiple ZED cameras at the same time in a single application. | C++ Python |