This sample shows how to use multiple ZED cameras in a single application. Currently available on Linux only.
- First, download the latest version of the ZED SDK on stereolabs.com.
- For more information, read the ZED API documentation.
- Ubuntu 16.04
- ZED SDK and its dependencies (CUDA,OpenCV 3.1)
Download the sample. In the sample directory, open a terminal and execute the following command:
mkdir build
cd build
cmake ..
make
Open a terminal in the 'build' directory and execute the following command:
./ZED\ Multi\ Input
- Video capture for each camera is done in a separate thread for optimal performance. You can specify the number of ZED used by changing the
NUM_CAMERAS
parameter. - Each camera has its own timestamp (uncomment a line to display it). These timestamps can be used for device synchronization.
- OpenCV is used to display the images and depth maps. To stop the application, simply press 'q'.
- This sample works on Linux only.
- USB bandwidth: The ZED in 1080p30 mode generates around 250MB/s of image data. USB 3.0 maximum bandwidth is around 400MB/s, so the number of cameras, resolutions and framerates you can use on a single machine will be limited by the USB 3.0 controller on the motherboard. When bandwidth limit is exceeded, corrupted frames (green or purple frames, tearing) can appear.
- Using a single USB 3.0 controller, here are configurations that we tested:
- 2 ZEDs in HD1080 @ 15fps and HD720 @ 30fps
- 3 ZEDs in HD720 @ 15fps
- 4 ZEDs in VGA @ 30fps
- To use multiple ZED at full speed on a single computer, we recommend adding USB3.0 PCIe expansion cards.
- You can also use multiple GPUs to load-balance computations (use
param.device
to select a GPU for a ZED) and improve performance.