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.
This commit is contained in:
+20
-3
@@ -7,9 +7,9 @@
|
||||
apiVersion: 1
|
||||
name: dora-image-view
|
||||
namespace: liria
|
||||
description: Overlays bounding boxes, labels, and text on an image input and displays it in an OpenCV window
|
||||
description: Displays an image and a depth map side by side in an OpenCV window, with bounding box and text overlays
|
||||
categories: [visualization, debug]
|
||||
keywords: [opencv, view, bbox, bounding-box, image, visualization, object-detection]
|
||||
keywords: [opencv, view, bbox, bounding-box, image, depth, visualization, object-detection]
|
||||
|
||||
runtime: python
|
||||
entrypoint: dora-image-view
|
||||
@@ -41,10 +41,26 @@ inputs:
|
||||
description: >-
|
||||
Text string to overlay at the top-left corner. Stored and drawn on the
|
||||
next image redraw.
|
||||
depth:
|
||||
type: std/core/v1/Float32
|
||||
required: false
|
||||
description: >-
|
||||
Depth map as a flat Float32 buffer, described by the metadata
|
||||
{shape: [height, width], units}. Millimetres unless `units` says `m`;
|
||||
0 and non-finite values are missing depth and draw black. Colour-mapped
|
||||
into its own panel, which receiving this input redraws.
|
||||
|
||||
outputs: {}
|
||||
|
||||
env:
|
||||
VIEW_DEPTH_MIN_MM:
|
||||
type: float
|
||||
description: >-
|
||||
Pin the near end of the depth colour range, in millimetres. Each end is
|
||||
auto-ranged over the valid pixels of the current frame when it is unset.
|
||||
VIEW_DEPTH_MAX_MM:
|
||||
type: float
|
||||
description: Pin the far end of the depth colour range, in millimetres.
|
||||
VIEW_WIDTH:
|
||||
type: int
|
||||
description: Resize the displayed frame to this width (pixels). Defaults to the image input width.
|
||||
@@ -59,6 +75,7 @@ example: |
|
||||
build: pip install .
|
||||
path: dora-image-view
|
||||
inputs:
|
||||
image: camera/image
|
||||
image: camera/image_bgr
|
||||
depth: camera/depth
|
||||
bbox: detector/bbox
|
||||
text: detector/text
|
||||
|
||||
Reference in New Issue
Block a user