Files
dora-image-view/dataflow.yml
T
cristhian 0efeacd538 add a depth map panel
The node showed a colour image only, so debugging a depth pipeline meant
either trusting the numbers or writing a throwaway viewer. It now keeps one
panel per frame stream -- image and depth -- and tiles them side by side,
scaled to a common height. Wiring one is a plain viewer; wiring both shows
them together. bbox and text stay overlays rather than panels.

The contract follows what dora-zed already publishes: float32 [H, W] in
millimetres with 0 for missing. It is sent there as a raw byte slice, so the
payload arrives as UInt8 despite the Float32 contract and is reinterpreted
rather than converted.

Auto-ranging the colormap over the valid pixels' full extent, rather than over
a percentile of them, is deliberate and was not the first attempt: trimming
the tails collapsed on the scene the node exists for. A small object in front
of a large wall is a few percent of the pixels, so both tails landed on the
wall and the object clipped away. Rendering a frame and looking at it found
that; every test passed either way.

Verified with dora-cli 1.0.1: validate passes with both contracts injected,
the dataflow runs both nodes to a clean exit, and a composed frame was
rendered and inspected.
2026-09-15 05:06:50 -03:00

34 lines
1011 B
YAML

# The repository's own example, and its end-to-end test: a synthetic source
# feeding the viewer. Everything it needs is in this checkout -- no camera, no
# detector, no network -- so it is also what CI runs.
#
# Both nodes are built from the checkout with `path:` + `build:`, which is what
# lets `dora validate` pick up the typed contract in dora-node.yml. A consumer
# wires the viewer from a tag instead -- see README.md.
#
# Run it with `--uv` so every node gets its own managed environment.
strict_types: true
nodes:
- id: source
path: examples/source.py
# The source needs dora-rs, numpy and pyarrow; installing the project gives
# it exactly the versions pinned in uv.lock.
build: pip install .
inputs:
tick: dora/timer/millis/33
outputs:
- image
- depth
- bbox
- text
- id: view
path: dora-image-view
build: pip install .
inputs:
image: source/image
depth: source/depth
bbox: source/bbox
text: source/text