Skip to content

Image Queue ​

The Image Queue widget shows the latest inspection images as four cards, one below the other, newest first. Each card shows the thumbnail, a chip with the result text, and the bounding boxes and polygons drawn over the thumbnail; empty slots show a placeholder icon. A button at the top right turns the drawings on the thumbnails on or off. Clicking a card opens the image dialog, where the viewer can step through every image the widget holds, not only the four on the cards.

Palette: category Renders, label image queue. 1 input, 1 output.

Image Queue

Configuration ​

PropertyDescriptionDefault
NombreNode name shown in the editor.""
GroupDashboard group that holds the widget. Required.—
LocaleOptional Locale Config: format and time zone of the dates in the dialog, and footbar texts for the fields below left empty.none
SizeWidth and height of the widget (0 = automatic).0 x 0
Close button textText of the dialog's close button.CLOSE
Show mask checkboxShows the MASK toggle in the dialog footbar. The mask version is shown first; with the toggle hidden it is always shown when the image has one.on
Show bbox checkboxShows the BBOX toggle (bounding boxes).on
Show polygon checkboxShows the POLYGONS toggle (polygons and their labels).on
Mask checkbox textLabel of the MASK toggle. Empty: the Locale Config text, else MASK.empty
Bbox checkbox textLabel of the BBOX toggle. Empty: the Locale Config text, else BBOX.empty
Polygon checkbox textLabel of the POLYGONS toggle. Empty: the Locale Config text, else POLYGONS.empty
Hover label textTitle of the Labels on hover option of the footbar menu. Empty: the Locale Config text, else Labels on hover.empty
Hover label hintHint under that option. Empty: the Locale Config text, else Show a label only while pointing at its detection.empty
Box fill textTitle of the Bounding box fill option. Empty: the Locale Config text, else Bounding box fill.empty
Box fill hintHint under that option. Empty: the Locale Config text, else Tint the inside of each bounding box.empty
Annotations on thumbnailsInitial state of the button that draws boxes and polygons on the thumbnails. Each viewer's choice is then remembered in the browser.on
Annotation text size (px)Size of the detection labels in the dialog, 0 to 200. 0 uses each detection's fontSize, or 16.16
Image typesNumber of Type name fields, 0 to 9.0
Type name 1…NKeys of imageShow offered in the dialog's type list. Type name 1 is the type used for the card thumbnail. Empty names are dropped on save.none

Input ​

msg.payloadEffect
{ action: "push", image: { ... } }Adds one image at the top of the queue. The node and the open dashboards keep the 100 most recent images, and dashboards opened later receive the stored queue.
array of image objectsReplaces the whole queue; the first element goes in the first card. The array is stored as sent (no 100 limit).
"clear", "reset" or { action: "clear" }Empties the queue. An open dialog closes.

Other messages are ignored.

Image object ​

PropertyDescription
imageShowOne entry per image type, for example { raw: { ... }, heatmap: { ... } }, each with the fields below. The card uses the entry named in Type name 1 when the image has it, otherwise the first entry.
imageShow.<type>.imageDataFull image shown in the dialog: data URL, raw Base64 (JPEG, PNG, WebP or GIF is detected) or URL.
imageShow.<type>.imageDataThumbnailImage of the card.
imageShow.<type>.imageDataThumbnailMaskUsed on the card instead of imageDataThumbnail when present.
imageShow.<type>.imageDataMaskShown in the dialog while MASK is on (else imageDataThumbnailMask, else imageData).
imageShow.<type>.bbox, imageShow.<type>.polygonsDetections of that type, see Detections.
imageData, imageDataThumbnail, imageDataMask, imageDataThumbnailMask, bbox, polygonsThe same fields at the top level, used when the image has no imageShow (bbox and polygons also when the type has none).
videoShow.<type>.videoData or videoDataURL of an image stream (for example MJPEG). The dialog draws it, about 30 times per second, instead of the still image.
resultText of the card chip and of the dialog's Details field. No chip when absent.
isAnomalousChip colour: red for true, "true" or "1"; green for false or any other string; blue otherwise (for example, when absent).
tagShown as the dialog result when isAnomalous is not a boolean.
dateDate shown in the dialog (ISO string, milliseconds or Date), in the Locale format.
nameDialog's Image name field.
ocrDialog's Barcode OCR field: a string or number, an array, or an object with a text field such as barcode or text. Also read from barcode_ocr, inference.ocr, id_do and idDo. - when absent.
resumePer-model results, shown in the right column of the dialog.
idIdentifier, generated when missing.

Detections ​

Bounding boxes (bbox, array):

PropertyDescription
x_rel, y_relTop-left corner, relative to the image width and height (0 to 1).
w_rel, h_relWidth and height, relative (0 to 1).
tagLabel text.
scoreAdded to the label, cut to two decimals (scratch 0.91).
colorOutline colour: a CSS colour, { r, g, b, a } or [r, g, b, a] (alpha optional). When absent or invalid, a colour derived from tag (blue without a tag).
strokeWidthOutline width on screen, default 2.
fontSizeLabel size, used when Annotation text size (px) is 0.

Polygons (polygons, array):

PropertyDescription
pointsAt least three [x_rel, y_rel] points (0 to 1).
tag, confidenceLabel text, as for boxes.
colorOutline and fill colour, in the same forms as for boxes. Default: a colour derived from tag, or green without a tag.
alphaFill opacity in the dialog, default 0.5. It applies only to colours given as rgb(r,g,b), { r, g, b } or [r, g, b]; other forms keep their own opacity, so a named or hex colour fills the polygon solid.
strokeWidthOutline width on screen, default 0.5.
fontSizeAs for boxes.

On the thumbnails, boxes and polygons are drawn without labels.

Image dialog ​

  • Left column: the Select image type list (the configured type names; without them, the keys of the image's imageShow), Result (NOK when isAnomalous is true, OK when false, otherwise tag), Details (result), Date, Image name and Barcode OCR.
  • Centre: the image. The mouse wheel zooms and dragging pans; on touch screens, pinch to zoom and drag with one finger to pan. Buttons over the image: brightness slider (-1 to 1, remembered in the browser for this widget), reset zoom, zoom lock (keeps the zoom and pan for the next images until the dialog closes) and full screen. In full screen, a top bar shows the result and the date, the same buttons and, when there is more than one type, the type list.
  • Right column: one panel per key of resume (a key named barcode ocr is skipped), red or green from the result (NOK or OK) or isAnomalous inside that key's object. The panel lists every property; values between 0 and 1 are shown as percentages when the key contains score, confidence, probability, ratio or threshold, or when the value is not a whole number. Each entry of ruleResults is listed under its name in capitals (or Rule N).
  • Footbar: a gear menu with Labels on hover (a label shows only while the pointer is over its detection) and Bounding box fill (translucent fill inside the boxes, also on the thumbnails), both off by default and remembered in the browser for this widget; the MASK, BBOX and POLYGONS toggles enabled in the configuration; previous and next buttons with the position (2 / 4), also driven by the left and right arrow keys; and the close button.

Output ​

This node does not send messages.

Usage example ​

With Type name 1 set to raw, a function node after the inspection pushes each result:

js
msg.payload = {
    action: "push",
    image: {
        name: "1732270000000_cam1.jpg",
        date: new Date().toISOString(),
        result: "NOK",
        isAnomalous: true,
        imageShow: {
            raw: {
                imageData: msg.image,              // full image, Base64 or URL
                imageDataThumbnail: msg.thumbnail, // small copy for the card
                bbox: [
                    { x_rel: 0.12, y_rel: 0.30, w_rel: 0.18, h_rel: 0.10, tag: "scratch", score: 0.91, color: "red" }
                ]
            }
        },
        resume: {
            detector: { result: "NOK", score: 0.91 }
        }
    }
};
return msg;

To empty the cards, send msg.payload = "clear".