Prerequisition
- ZED SDK
- python3.6+
- cython 0.26+
- numpy 1.13+
- opencv python(optional)
- pyopengl (optional)
- cuda
zed sdk https://www.stereolabs.com/developers/release/
cuda toolkit https://developer.nvidia.com/cuda-toolkit-archive
python -m pip install cython numpy opencv-python pyopengl
zed sdk를 설치하고 나면
get_python_api.py 가 있다.
cmd 켜고 해당 폴더로 이동해서 python get_python_api.py를 입력하면 의존 패키지들을 설치 해주는 것 같다.
SDK랑 python cuda는 미리 설치가 되어있어야한다.
설치가 완료되면 python을 켜고 import pyzed.sl as sl 을 입력하고 실행해서 아무문제 없으면 zed python api가 설치 된 것으로 보면 된다.
자세한 내용은 아래 참조
https://www.stereolabs.com/docs/app-development/python/install/
Install the ZED Python API | Stereolabs
Install the ZED Python API This section explains how to use the ZED SDK in Python 3 on Windows and Linux platforms. Getting Started The Python API is a wrapper around the ZED SDK which is written in C++ optimized code. We make the ZED SDK accessible from e
www.stereolabs.com
아래 영상은 opencv로 그냥 띄워봤다. stereo image를 띄우는데에는 위에 sdk나 cuda의 설치가 필요없다.
import cv2
res=cv2.VideoCapture(1)
while(res.isOpened()):
ret,frame = res.read()
if ret:
cv2.imshow('video',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
res.release()
cv2.destroyAllWindows()
합쳐진 3d map
glutCreateWindow에서 오류가 발생할 수 있다.
'maengkyun > CV' 카테고리의 다른 글
[Computer Vision] 2D Convolution - python code (0) | 2021.12.12 |
---|---|
depth (0) | 2021.11.28 |
[Computer Vision] Sliding Window Algorithm (0) | 2021.11.12 |
끄적 (0) | 2021.08.25 |