> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# 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](https://github.com/stereolabs/zed-sdk).

> **Tip**
>
> If you need assistance with building the examples, you can refer to the [API Language section](/docs/development/api-languages) 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](/docs/tutorials) first. These resources can provide valuable information to help you get started with the ZED SDK.

| Sample                                                       | Description                                                                                                                                                                   | Link                                                                              |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [**Camera Control**](/docs/samples/camera-control)           | Adjust video settings (brightness, contrast, saturation, hue, sharpness, gamma, gain, exposure, white balance, LED) and display the resulting image.                          | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/camera%20control)      |
| [**Camera Streaming**](/docs/samples/camera-streaming)       | Stream ZED video over the network (single or multiple senders, a receiver, encoded passthrough, and H.264 record-while-send) for remote viewing or processing.                | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/camera%20streaming)    |
| [**Depth Sensing**](/docs/samples/depth-sensing)             | Extract and visualize depth maps and point clouds, with variants for multi-camera capture, region of interest, image refocus, custom depth ingestion, and fusion.             | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/depth%20sensing)       |
| [**Positional Tracking**](/docs/samples/positional-tracking) | Display the live position and orientation of the camera in a 3D window, and export tracking data to FBX.                                                                      | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/positional%20tracking) |
| [**Object Detection**](/docs/samples/object-detection)       | Detect and track objects in 3D: bird's-eye and image viewers, concurrent detection with body tracking, custom detectors (YOLO/Ultralytics), and multi-camera fusion.          | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/object%20detection)    |
| [**Body Tracking**](/docs/samples/body-tracking)             | Detect and track 3D human body skeletons, export the data to FBX/JSON, integrate with Unity/Unreal Engine, or fuse multiple cameras for whole-space tracking.                 | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/body%20tracking)       |
| [**Spatial Mapping**](/docs/samples/spatial-mapping)         | Capture a live 3D mesh or fused point cloud of the environment, with a multi-camera fusion variant for larger spaces.                                                         | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/spatial%20mapping)     |
| [**Plane Detection**](/docs/samples/plane-detection)         | Detect the floor plane and arbitrary planar surfaces in the scene, either automatically or via hit-testing.                                                                   | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/plane%20detection)     |
| [**Recording**](/docs/samples/recording)                     | Record and play back SVO files (single or multi-camera, with external/sensor data) and export SVO content to common video, image and sensor file formats.                     | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/recording)             |
| [**Global Localization**](/docs/samples/global-localization) | Fuse a real GNSS receiver with the camera's visual-inertial odometry for global-scale localization, with live, recording, playback and map-server samples.                    | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization) |
| [**Sensors API**](/docs/samples/sensors-api)                 | Manage multiple ZED cameras, ZED X One cameras and LiDARs through a single unified API, live or from recordings, with an interactive multi-sensor placement/calibration tool. | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/sensors_api)           |
| [**Virtual Stereo**](/docs/samples/virtual-stereo)           | Pair two ZED X One monocular cameras into a calibrated virtual stereo rig to compute depth from two independent mono sensors.                                                 | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/virtual%20stereo)      |
| [**ZED X One**](/docs/samples/zed-x-one)                     | Capture, stream, record and run AI inference with the ZED X One monocular camera.                                                                                             | [GitHub](https://github.com/stereolabs/zed-sdk/tree/master/zed%20one)             |