Samples - Virtual Stereo
Samples - Virtual Stereo
This sample shows how to pair two ZED X One monocular cameras into a calibrated virtual stereo rig, letting the ZED SDK compute depth from two independent mono sensors as if they were a single stereo camera like the ZED 2i or ZED X. For background on why and how to build such a rig (baseline selection, hardware synchronization), see Dual Camera Stereo Vision.
Getting Started
- First, download the latest version of the ZED SDK.
- Download the Virtual Stereo sample code in C++.
Overview
The sample opens two ZED X One cameras — identified either by camera ID or by serial number — and combines them into a virtual stereo pair using a generated virtual serial number:
Once opened, the virtual stereo rig behaves like any other ZED camera: it exposes rectified left/right views and, if the rig has been calibrated, standard stereo depth. If the rig hasn’t been calibrated yet, only unrectified images (VIEW::LEFT_UNRECTIFIED / VIEW::RIGHT_UNRECTIFIED) and recording are available.
The two ZED X One cameras should be hardware-synchronized (via a ZED Link capture card, ZED Box Orin, or ZED Box Mini) for accurate depth perception.

