xtract.bot

Annotate detections

Try it interactively →
POST /api/image-annotate-detections

Render bounding boxes and labels onto an image. Accepts the JSON output of any of the detection tools (faces / barcodes / QR / contours / etc.) and produces a visual overlay.

Draws coloured bounding boxes and text labels onto an image, given a list of detection rectangles. The companion tool for the various detection tools (`image-detect-qr`, `image-face-detect`, `image-detect-barcode`, etc.). Use the JSON output of any detection tool as the `detections` array — each entry needs `{rect: {x,y,width,height}, label?, color?}`.

Inputs

NameTypeDefaultDescription
image*fileInput image bytes.
detections*stringJSON-encoded array of `{x, y, width, height, label?, score?, color?}` (or any object with `box: [x,y,w,h]`).
lineWidthnumber (1…32)3Rectangle stroke width.
defaultColorstring"#ff3366"Stroke colour fallback (CSS hex).
fontScalenumber (0…4)0.6Label font scale (0 = no labels).
formatenum (jpeg | png)"jpeg"Output encoding.
qualitynumber (1…100)90JPEG quality.

Response

Modes: binary, json. Cache: yes (24h TTL).