Nodes/comfyui_cv/CV Draw Labels
ComfyUI Node

CV Draw Labels

Debug helper: writes a text label next to each point. Feed the 'landmarks' + 'keypoint_names' of 'CV MediaPipe Hand Pose' to name every keypoint, or any per-point string/number array. When 'labels' is left unconnected each point is labelled with its own index (0, 1, 2, ...). None/empty points pass the image through unchanged (count=0).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Draw Labels
  • source
  • points
  • labels
  • image
  • count
font_scale0.4
color(0, 255, 255)
thickness1
offset_x4
offset_y-4
outlinetrue
Categoryimage/CV/points

Inputs (9)

NameTypeDefaultDescription
sourceCOMFY_MATCHTYPE_V3Image or mask to draw on (a copy is made). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
pointsNPARRAYNx1x2 points to label (or None -> passthrough).
font_scaleFLOAT0.40.1–8cv2 text scale; shrink it for dense point sets.
colorSTRING(0, 255, 255)Color as a single value (broadcast to all channels) or BGR tuple, e.g. '255' or '(0, 255, 255)'. Shorter tuples are zero-padded; longer tuples are truncated.
thicknessINT11–32Text stroke width in pixels.
labelsoptNPARRAY(N,) ARRAY of strings or numbers, one per point - not a comma-separated string. Type them with 'CV Text To Array' (one per line), or wire an array that already exists: a QR/barcode detector's 'texts', 'CV Load Labels'.labels_array, a classifier's 'labels_out', or any numeric array via 'CV Numbers To Array'. Leave it unwired to caption each point with its INDEX, which is also what a point whose position is NaN keeps - blanked points are skipped without renumbering the rest.
offset_xoptINT4-4096–4096Horizontal pixel offset of the text from its point.
offset_yoptINT-4-4096–4096Vertical pixel offset of the text from its point.
outlineoptBOOLEANtrueDraw a contrasting halo behind each label (black behind a light 'color', white behind a dark one). These labels land on whatever the image happens to show, so a single flat colour at font_scale 0.4 is often unreadable without it.

Outputs (2)

NameTypeDescription
imageCOMFY_MATCHTYPE_V3Same format as the image input.
countINTHow many labels were drawn.