Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



41 Commits

Repository files navigation

Stereolabs ZED - OpenCV

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


OpenCV can be installed from source on Linux, please refer to this guide to proceed with the installation.


Read the guide to learn how to build and launch this sample in C++.


Read the guide to learn how to build and launch this sample in Python.

Installing OpenCV

Installing OpenCV on Windows

OpenCV provides already compiled binaries, it can be downloaded at

Installing OpenCV on Linux

Some sample can require OpenCV, here is a tutorial on how to install it.

OpenCV can be downloaded at this location :

For a more detailed OpenCV tutorial installation, refer to the opencv documention.

Installation steps

  • Install the required dependencies
sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
wget -O /tmp/
cd ~/
unzip /tmp/ ; rm /tmp/
  • Navigate to the extracted sources, create a temporary build directory and enter it. For example,
cd ~/opencv-*
mkdir build
cd build
  • Run cmake
  • Execute make. The compilation can take a while
make -j$(nproc)
  • Install the libraries
sudo make install


If you need assistance go to our Community site at