Skip to content
Branch: master
Find file History
Latest commit 770d8bf Dec 20, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information. fix README Dec 20, 2018 Add python opencv sample and separate the repository into cpp/python … Dec 20, 2018

Stereolabs ZED - OpenCV Python

This sample is the perfect place to get started coding with the ZED and OpenCV. It shows how to:

  • Capture image, depth and point cloud from the ZED.
  • Convert image and depth map to compatible 32-bits float OpenCV matrix.
  • Display video and depth with OpenCV.
  • Adjust several depth parameters: depth sensing mode, quality, units, resolution.
  • Save side by side image, depth image and point cloud in various formats

Getting started


  • Windows 7 64bits or later, Ubuntu 16.04 or 18.04
  • ZED SDK and its dependencies (CUDA, OpenCV)
  • ZED Python API, check the README of the github to know how to install it

Run the program

Open a termial and simply execute the python script.


python [path to SVO file]


python3 [path to SVO file]

You can optionally provide an SVO file path (recorded stereo video of the ZED)

Keyboard shortcuts

This table lists keyboard shortcuts that you can use in the sample application.

Parameter Description Hotkey
Save Side by Side Save side by side image. 's'
Save Depth Save depth image. 'p'
Save Point Cloud Save 3D point cloud. 'd'
Switch cloud format Toggle between point cloud formats. 'm'
Switch depth format Toggle between depth image formats. 'n'
Exit Quit the application. 'q'
You can’t perform that action at this time.