This package lets you use the ZED stereo camera in Python 3.
Please check your python version with the following command. The result should be 3.5 or higer, check the tutorial here to manage multiple python versions on Linux.
python --version
Note: On Linux the version returned by python --version
and sudo python --version
might not be the same.
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。