introduction
By using zed step by step from installation on a laptop reinstalled with Windows system, the author hopes to complete a relatively perfect zed use column by taking a series of notes. While sorting out the ideas, the author can also give readers some reference.
Computer configuration description
At present, the notebook used by the author is equipped with win10 20h2 system, as well as its own NVIDIA geforce 940 MX GPU and i5-7200 CPU. Other environments are basically not installed. The basic environment required to install and configure zed from scratch.
1. Installation and configuration of zed under win10
For this part, the author refers to the blog:Zed camera learning note 1 – installation and configuration (win10 + Python)
The model of zed binocular camera is zed 2 stereo camera (zed2 stereo camera, stereolabs, San Francisco, USA), which also includes USB 3.0 data cable and a mini tripod.
1.1 installation of CUDA + cudnn
This part can refer to the author’s blog[windows10] install the graphics card driver + CUDA + cudnn
- Install the appropriate graphics card driver according to the graphics card model of the notebook
- Install the appropriate CUDA + cudnn according to the graphics card driver
If cudn + CUDA is successfully configured, it will be displayed in the terminal figure:
NVIDIA SMI # view graphics card driver information
Nvcc - V # view CUDA information
1.2 installing zed-sdk
Download the SDK corresponding to the computer operating system and CUDA version. The official download link is as follows:Zed-sdk download official website
The version information downloaded by the author is as follows:
Double click to install. The screenshot of the installation process is as follows:
Default installation address
Installation complete!
Add environment variable
C:\Program Files (x86)\ZED SDK\dependencies\freeglut_2.8\x64
C:\Program Files (x86)\ZED SDK\dependencies\glew-1.12.0\x64
C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0\x64
C:\Program Files (x86)\ZED SDK\bin
Enter the tools subfolder in the zed SDK folder and run zed explorer Exe and zed depth viewer Exe to check whether the zed camera can work normally
The opening interface is shown as follows:
1.3 installation of zed Python API (pyzed)
First, install opencv python. Refer to the blog:[Anaconda] install opencv
The terminal enters the zed SDK installation folder and runs get_ python_ api. Py file (this file can automatically detect the operating system, CUDA and python versions and download the corresponding precompiled Python API package (pyzed))
The instructions are as follows:
cd C:\Program Files (x86)\ZED SDK
python get_python_api.py
The following error occurred
Download the file manually and install it again. If it succeeds, the display is as shown in the figure below
#Download full path
pip install D:\TOOL\pyzed-3.5-cp39-cp39-win_amd64.whl -i https://pypi.douban.com/simple
Updated on February 22, 2022
------------------------------------------------------------------------------------------------------------------------
Download the following three files (supplementary)PyOpenGL、PyOpenGL_accelerate
)Put it under the SDK folder
Note: the version of the author’s screenshot is not necessarily the version that the reader can run. The specific version should be prompted when running the following instructions
python get_python_api.py
Execute code at the terminal for installation
pip install pyzed-3.6-cp37-cp37m-win_amd64.whl -i https://pypi.douban.com/simple
pip install PyOpenGL-3.1.5-cp37-cp37m-win_amd64.whl -i https://pypi.douban.com/simple
pip install PyOpenGL_accelerate-3.1.5-cp37-cp37m-win_amd64.whl -i https://pypi.douban.com/simple
Re execution
python get_python_api.py
The terminal displays as follows:
Full implementation of zed_ SDK environment setup!
------------------------------------------------------------------------------------------------------------------------
2 test installation
New file test Py, as follows:
import pyzed.sl as sl
def main():
# Create a Camera object
zed = sl.Camera()
# Create a InitParameters object and set configuration parameters
init_params = sl.InitParameters()
init_params.sdk_verbose = False
# Open the camera
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
exit(1)
# Get camera information (ZED serial number)
zed_serial = zed.get_camera_information().serial_number
print("Hello! This is my serial number: {0}".format(zed_serial))
# Close the camera
zed.close()
if __name__ == "__main__":
main()
Run the file on the terminal, and the terminal displays the following, indicating that zed configuration is completed!