hub-camera

star 7

Use for camera and video capture nodes in dora. Triggers on: opencv-video-capture, dora-pyrealsense, dora-pyorbbecksdk, realsense, orbbeck, camera, webcam, video capture, RGB, depth camera, image capture, 摄像头, 视频捕获, 深度相机, 图像采集

ZhangHanDong By ZhangHanDong schedule Updated 1/21/2026

name: hub-camera description: "Use for camera and video capture nodes in dora. Triggers on: opencv-video-capture, dora-pyrealsense, dora-pyorbbecksdk, realsense, orbbeck, camera, webcam, video capture, RGB, depth camera, image capture, 摄像头, 视频捕获, 深度相机, 图像采集" globs: ["/dataflow.yml", "/dataflow.yaml"] source: "https://github.com/dora-rs/dora-hub"

Camera & Video Capture Nodes

Capture video frames from cameras and depth sensors

Available Camera Nodes

Node Install Description Platform
opencv-video-capture pip install opencv-video-capture OpenCV camera/video All
dora-pyrealsense pip install dora-pyrealsense Intel RealSense depth Linux
dora-pyorbbecksdk pip install dora-pyorbbecksdk Orbbeck depth camera All

opencv-video-capture

OpenCV-based video capture from webcam or video file.

YAML Configuration

- id: camera
  build: pip install opencv-video-capture
  path: opencv-video-capture
  inputs:
    tick: dora/timer/millis/16  # ~60fps
  outputs:
    - image
  env:
    PATH: "0"           # Camera index (0, 1, ...) or video file path
    IMAGE_WIDTH: 640    # Optional: output width
    IMAGE_HEIGHT: 480   # Optional: output height

Outputs

image - UInt8Array with metadata:

metadata = {
    "width": 640,
    "height": 480,
    "encoding": "bgr8",  # or "rgb8"
    "primitive": "image"  # for dora-rerun
}

Decoding Output

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

channels = 3
frame = storage.to_numpy().astype(np.uint8).reshape((height, width, channels))

# Convert BGR to RGB if needed
if encoding == "bgr8":
    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)

dora-pyrealsense

Intel RealSense camera with RGB and depth streams.

YAML Configuration

- id: realsense
  build: pip install dora-pyrealsense
  path: dora-pyrealsense
  inputs:
    tick: dora/timer/millis/33  # ~30fps
  outputs:
    - image  # RGB image
    - depth  # Depth image
  env:
    IMAGE_WIDTH: 640
    IMAGE_HEIGHT: 480

Outputs

image - RGB UInt8Array

metadata = {"width": 640, "height": 480, "encoding": "rgb8"}

depth - Float32Array depth values (meters)

metadata = {"width": 640, "height": 480}

dora-pyorbbecksdk

Orbbeck depth camera support.

YAML Configuration

- id: orbbeck
  build: pip install dora-pyorbbecksdk
  path: dora-pyorbbecksdk
  inputs:
    tick: dora/timer/millis/33
  outputs:
    - image
    - depth

Image Data Format

All camera nodes output images in Apache Arrow format:

import pyarrow as pa
import numpy as np

# Encoding image
image_data = pa.array(frame.ravel())  # UInt8Array

# Sending
node.send_output("image", image_data, {
    "width": 640,
    "height": 480,
    "encoding": "bgr8",
    "primitive": "image"  # for dora-rerun visualization
})

Common Patterns

Camera with Detection Pipeline

nodes:
  - id: camera
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
    env:
      IMAGE_WIDTH: 640
      IMAGE_HEIGHT: 480

  - id: yolo
    build: pip install dora-yolo
    path: dora-yolo
    inputs:
      image: camera/image
    outputs:
      - bbox

  - id: rerun
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      image: camera/image
      detections: yolo/bbox

Dual Camera Setup

nodes:
  - id: camera_left
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
    env:
      PATH: "0"

  - id: camera_right
    build: pip install opencv-video-capture
    path: opencv-video-capture
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
    env:
      PATH: "1"

Depth Camera with 3D Visualization

nodes:
  - id: realsense
    build: pip install dora-pyrealsense
    path: dora-pyrealsense
    inputs:
      tick: dora/timer/millis/33
    outputs:
      - image
      - depth

  - id: rerun
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      rgb_camera:
        source: realsense/image
        metadata:
          primitive: "image"
      depth_sensor:
        source: realsense/depth
        metadata:
          primitive: "depth"
          focal: [600, 600]
          camera_position: [0, 0, 0]

Troubleshooting

Camera not found

# List available cameras
v4l2-ctl --list-devices  # Linux

Permission denied

# Add user to video group (Linux)
sudo usermod -a -G video $USER

Frame rate issues

  • Reduce resolution in env vars
  • Increase timer interval (e.g., millis/50 for 20fps)

Related Skills

  • hub-detection - Object detection with YOLO, SAM2
  • hub-visualization - Rerun visualization
  • domain-vision - Vision pipeline patterns
Install via CLI
npx skills add https://github.com/ZhangHanDong/dora-skills --skill hub-camera
Repository Details
star Stars 7
call_split Forks 1
navigation Branch main
article Path SKILL.md
More from Creator
ZhangHanDong
ZhangHanDong Explore all skills →