This package lets you use the ZED stereo camera in Python 3.
- First, download the latest version of the ZED SDK on stereolabs.com
- For more information, read the ZED API documentation
- ZED SDK and its dependencies (CUDA)
- Python 3.5+ (x64). (Windows installer)
- C++ compiler (VS2015 recommended)
- Cython 0.26
- Numpy 1.13.1
Cython and Numpy can be installed via pip.
python -m pip install cython numpy
python setup.py build
python setup.py install
If an error occurs during the compilation, make sure that you're using the latest ZED SDK and that you installed an x64 version of python. python -c "import platform; print(platform.architecture())"
The packages .pyd for Windows or .so for Linux will be generated and installed.
You can use python setup.py cleanall
to remove every cpp files generated and build directory.
Import the packages in your Python terminal or file like this:
import pyzed.camera as zcam
import pyzed.core as mat
import pyzed.defines as sl
import pyzed.types as types
import pyzed.mesh as mesh
import numpy as np
Vectors operations like norm, sum, square, dot, cross, distance but also simple operations can be done with Numpy package.
N.B.: *pyzed.camera is linked with pyzed.core and pyzed.mesh packages so you must import pyzed.camera before pyzed.core and pyzed.mesh to avoid import errors.
The tutorials provide simple projects to show how to use each module of the ZED SDK. For a similar version using the C++ API checkout the Cpp tutorials.
Please refer to the examples README for more informations.
This is a beta version of the wrapper. Feel free to open an issue if you find a bug, or a pull request for bug fixes, features or other improvements.