Skip to main content

Dora Node for capturing video with PyRealSense

This node is used to capture video from a camera using PyRealsense.

Installation

Make sure to use realsense udev config at https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

You can try, the following:

wget https://raw.githubusercontent.com/IntelRealSense/librealsense/refs/heads/master/scripts/setup_udev_rules.sh

mkdir config
cd config
wget https://raw.githubusercontent.com/IntelRealSense/librealsense/master/config/99-realsense-libusb.rules

cd ..

chmod +x setup_udev_rules.sh

YAML

- id: opencv-video-capture
  build: pip install ../../opencv-video-capture
  path: opencv-video-capture
  inputs:
    tick: dora/timer/millis/16 # try to capture at 60fps
  outputs:
    - image: # the captured image

  env:
    PATH: 0 # optional, default is 0

    IMAGE_WIDTH: 640 # optional, default is video capture width
    IMAGE_HEIGHT: 480 # optional, default is video capture height

Inputs

  • tick: empty Arrow array to trigger the capture

Outputs

  • image: an arrow array containing the captured image
## Image data
image_data: UInt8Array # Example: pa.array(img.ravel())
metadata = {
  "width": 640,
  "height": 480,
  "encoding": str, # bgr8, rgb8
}

## Example
node.send_output(
  image_data, {"width": 640, "height": 480, "encoding": "bgr8"}
  )

## Decoding
storage = event["value"]

metadata = event["metadata"]
encoding = metadata["encoding"]
width = metadata["width"]
height = metadata["height"]

if encoding == "bgr8":
    channels = 3
    storage_type = np.uint8

frame = (
    storage.to_numpy()
    .astype(storage_type)
    .reshape((height, width, channels))
)

Examples

Check example at examples/python-dataflow

License

This project is licensed under Apache-2.0. Check out NOTICE.md for more information.

Metadata

Release files for dora-pyrealsense 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dora-pyrealsense 0.5.0
File Size Uploaded Provenance Actions
dora_pyrealsense-0.5.0.tar.gz 4.2 kB Without provenance Details for dora_pyrealsense-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dora-pyrealsense 0.5.0
File Interpreter ABI Platform Actions
dora_pyrealsense-0.5.0-py3-none-any.whl Python 3 none any Details for dora_pyrealsense-0.5.0-py3-none-any.whl

Total release size: 8.6 kB

Release files / dora_pyrealsense-0.5.0.tar.gz

Download URL dora_pyrealsense-0.5.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fb7916dd7df9cce4493c3a5a18a05314a60fed30e2a522c1065d5c1a652c100c
BLAKE2b-256 checksum
How to use checksums
682636a1d1774aee49fbaaf5f93bca0909b177169aab78f107552fe969e2199f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dora_pyrealsense-0.5.0-py3-none-any.whl

Download URL dora_pyrealsense-0.5.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fca4008bc91e4c16cdde2a40124d95c3c39e641d565e1125dea1f9f0357be95
BLAKE2b-256 checksum
How to use checksums
a5823f651c1ec5509f105870060f826630452fbb41aa3d8c154a70efbcc02022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dora-pyrealsense 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page