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

left, right = split_stereo(frame)  # raw YUV422 halves
bgr = to_bgr(frame)                # combined side-by-side BGR 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.1.tar.gz (188.3 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.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (553.0 kB view details)

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

py_zed_open_capture-0.1.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (550.7 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: py_zed_open_capture-0.1.1.tar.gz
  • Upload date:
  • Size: 188.3 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.1.tar.gz
Algorithm Hash digest
SHA256 6c1a912e3b25bc939c8983571f6b679c987107834e0d8edfe01f2e62c465f928
MD5 6772cc3b2859c6db81baa0857f297bf4
BLAKE2b-256 ee5e5f3bcdd16a9ec4eb75b0c19fafa598539566d911ecee808f9f3ca573dbbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.1.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.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for py_zed_open_capture-0.1.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f16b5bf19cebfb133fcf259e4b82aefde584cb47fdcc90d04cdb8e004b51076d
MD5 e71c4e31cfc2bd2d7490e1e62ee1339a
BLAKE2b-256 21e5188d14ee7985d67b25907e79c11b3c2e6c1948fca7ce7c092c3eedda9a8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.1-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.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for py_zed_open_capture-0.1.1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4a5e1a0bcebf154cf7697a2bb5401bb322fd61a83a7c8ca8157dbe6f9716626d
MD5 783faf2df45ca64369aa22a78bd711b6
BLAKE2b-256 e386917758ec6a5475d0fd6357ba9e93a6322965202caf41c63ad60c50838689

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_zed_open_capture-0.1.1-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