Skip to main content

py-zed-open-capture

Python bindings for zed-open-capture

Allows raw video capture for the ZED, ZED-Mini, ZED-2 and ZED-2i stereo cameras without the official ZED SDK.

Why this exists

ZED cameras can send corrupt frames when opened as a plain UVC device (e.g. via cv2.VideoCapture). Fixing it requires a vendor-specific register write over a UVC extension unit that isn't exposed by standard V4L2/OpenCV. zed-open-capture implements that fix; this package wraps it so it can be called from Python without the full ZED SDK, and applies it automatically when you open the camera.

Install

pip install py-zed-open-capture

Prebuilt wheels are published for manylinux_x86_64 and manylinux_aarch64, Python

=3.12, via the stable ABI (one wheel per arch covers any 3.12+ interpreter). To build from source instead (e.g. for a different architecture):

sudo apt install build-essential cmake libusb-1.0-0-dev pkg-config
git clone --recurse-submodules https://github.com/ErykHalicki/py-zed-open-capture.git
pip install ./py-zed-open-capture

Usage

The API mirrors zed-open-capture's C++ VideoCapture/VideoParams/Frame directly (see third_party/zed-open-capture/include/videocapture.hpp), with snake_case names:

from py_zed_open_capture import VideoCapture, VideoParams, Resolution, Fps

params = VideoParams()
params.res = Resolution.HD720
params.fps = Fps.FPS_30

cap = VideoCapture(params)
cap.initialize_video(-1)         # -1 = auto-detect device

frame = cap.get_last_frame(500)  # timeout_msec; None on timeout
frame.data                       # numpy uint8 array, raw YUV 4:2:2, side-by-side stereo
frame.width, frame.height, frame.channels
frame.frame_id, frame.timestamp

Two standalone helpers are provided for the common post-processing steps (not part of the mirrored C++ API):

from py_zed_open_capture import split_stereo, to_bgr, to_rgb

left, right = split_stereo(frame)  # raw YUV422 halves
bgr = to_bgr(frame)                # combined side-by-side BGR image, requires opencv
rgb = to_rgb(frame)                # combined side-by-side RGB image, requires opencv

initialize_video() calls the C++ initializeVideo(), which resets the camera's AEC/AGC ISP registers, this is the step that avoids the corruption artifact. If it reappears mid-session, call cap.reset_aec_agc().

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_zed_open_capture-0.1.2.tar.gz (188.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (553.1 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (550.9 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

File details

Details for the file py_zed_open_capture-0.1.2.tar.gz.

File metadata

  • Download URL: py_zed_open_capture-0.1.2.tar.gz
  • Upload date:
  • Size: 188.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for py_zed_open_capture-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fa862cfcce8d70ea778de5ca7f662d587e6eb84ad173c144743b9023fa219d5b
MD5 d2724ab0001efaab7e58d5c16fa0b639
BLAKE2b-256 7b313e2dd7e08124ac3b59913be5dc22bbed73eb7a494c5be14299eb0edc3e12

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.2.tar.gz:

Publisher: wheels.yml on ErykHalicki/py-zed-open-capture

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4031eca1f91c952368826c15354843f4440d5304efb6be0ad14519333efab8fd
MD5 f9d343bb785b1a072a6ca736100fb758
BLAKE2b-256 051a641d61c596523056cbc4dc7a297eb872d16ba6c9114b2f66979a9e6a10ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ErykHalicki/py-zed-open-capture

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 73ab07ac21eba21d9bbae14199e58ac88981c47df57a6dc6ca7421ffed7aa008
MD5 cb9ab533ef882e5768630594269f0888
BLAKE2b-256 39f8f9d16f467929c1d111665a63dfa70b1c059340cf3e32e51e5e388afab13c

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ErykHalicki/py-zed-open-capture

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page