rename node to dora-image-view
The repository, the Python package, the entrypoint and the manifest name all now agree. `plot` was carried over from the upstream opencv-plot node and no longer described anything here, so the module, the class and the environment variables follow the node: dora_plot/ -> dora_image_view/ dora_plot/plot.py -> dora_image_view/view.py Plot -> View PLOT_WIDTH/HEIGHT -> VIEW_WIDTH/HEIGHT --plot-width/-height -> --view-width/-height Breaking for anyone wiring `path: dora-plot` or setting PLOT_WIDTH; nothing is tagged yet.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# dora-plot
|
||||
# dora-image-view
|
||||
|
||||
Dora node that overlays bounding boxes, labels and text on an image input and displays
|
||||
it in an OpenCV window. A display sink for debugging a vision pipeline: it produces no
|
||||
@@ -13,11 +13,11 @@ Add to your dataflow:
|
||||
|
||||
```yaml
|
||||
nodes:
|
||||
- id: plot
|
||||
git: ssh://git@gitea.liria.cl:5001/liria/dora-plot.git
|
||||
- id: view
|
||||
git: ssh://git@gitea.liria.cl:5001/liria/dora-image-view.git
|
||||
tag: v0.1.0
|
||||
build: pip install .
|
||||
path: dora-plot
|
||||
path: dora-image-view
|
||||
inputs:
|
||||
image: camera/image
|
||||
bbox: detector/bbox
|
||||
@@ -61,11 +61,14 @@ CI=true SOURCE_FRAMES=30 dora run dataflow.yml --uv
|
||||
|
||||
[`dora-node.yml`](dora-node.yml) declares the node's inputs with type URNs. No source
|
||||
package is shared between node repositories, so it is the only contract a consumer has,
|
||||
and it is what makes a wiring mistake fail at build time instead of at runtime:
|
||||
and it is what makes a wiring mistake fail at build time instead of at runtime. The
|
||||
example source has a manifest of its own, so `dora validate` checks the two against
|
||||
each other:
|
||||
|
||||
```
|
||||
$ dora validate dataflow.yml
|
||||
node "plot": injected 2 contract type(s) from .../dora-node.yml
|
||||
node "source": injected 2 contract type(s) from .../examples/dora-node.yml
|
||||
node "view": injected 2 contract type(s) from .../dora-node.yml
|
||||
All type annotations OK.
|
||||
```
|
||||
|
||||
@@ -81,8 +84,8 @@ of that state:
|
||||
|
||||
- An **`image`** event decodes the frame and immediately redraws: it draws every stored
|
||||
bbox (green rectangle plus `label, conf` text), draws the stored text at the top left,
|
||||
resizes to `PLOT_WIDTH`x`PLOT_HEIGHT` if both are set, and shows it in a window titled
|
||||
`Dora Node: dora-plot`. Press `q` in the window to quit.
|
||||
resizes to `VIEW_WIDTH`x`VIEW_HEIGHT` if both are set, and shows it in a window titled
|
||||
`Dora Node: dora-image-view`. Press `q` in the window to quit.
|
||||
- A **`bbox`** or **`text`** event only updates stored state; it is drawn on the next
|
||||
`image` redraw.
|
||||
|
||||
@@ -124,11 +127,11 @@ None — it is a display sink.
|
||||
|
||||
| Variable | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `PLOT_WIDTH` | image width | Resize the displayed frame to this width, in pixels. |
|
||||
| `PLOT_HEIGHT` | image height | Resize the displayed frame to this height, in pixels. |
|
||||
| `VIEW_WIDTH` | image width | Resize the displayed frame to this width, in pixels. |
|
||||
| `VIEW_HEIGHT` | image height | Resize the displayed frame to this height, in pixels. |
|
||||
|
||||
Resizing only happens when both are set. Both are also available as `--plot-width` and
|
||||
`--plot-height`; the environment variable wins when both are given.
|
||||
Resizing only happens when both are set. Both are also available as `--view-width` and
|
||||
`--view-height`; the environment variable wins when both are given.
|
||||
|
||||
`CI=true` suppresses the display window; it is not a configuration knob.
|
||||
|
||||
@@ -143,7 +146,9 @@ so the node installs with no system packages and no compiler on any of them —
|
||||
AVIF support, which comes from `pillow-avif-plugin` rather than OpenCV.
|
||||
|
||||
**Requirements:** dora 1.0+ (verified with `dora-cli 1.0.1`), Python 3.11+, `uv`, and a
|
||||
display to show the window on (or `CI=true` to run without one).
|
||||
display to show the window on (or `CI=true` to run without one). On a bare Linux image
|
||||
`opencv-python` also needs the libGL shared libraries (`libgl1`, `libglib2.0-0`), which
|
||||
it links at import time.
|
||||
|
||||
## Test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user