Nodes/comfyui_cv/CV Draw Connections
ComfyUI Node

CV Draw Connections

Debug helper: draws a line for every (i, j) EDGE between points[i] and points[j] - a skeleton / graph over a point set. Feed the 'landmarks' + 'connections' of 'OpenCV MediaPipe Hand Pose' to draw the hand bones, or any Ex2 index-pair array. Out-of-range indices are skipped; None/empty points or edges pass the image through unchanged (count=0). Connect labels to color each edge by cluster, matching 'CV Draw Points'.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Draw Connections
  • source
  • points
  • edges
  • labels
  • image
  • count
thickness2
color(255, 255, 255)
Categoryimage/CV/points

Inputs (6)

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 the edges index into (or None).
edgesNPARRAYEx2 int index pairs; each row (i, j) connects points[i] to points[j]. None/empty -> passthrough.
thicknessINT21–64Line width in pixels.
colorSTRING(255, 255, 255)Color as a single value (broadcast to all channels) or BGR tuple, e.g. '255' or '(255, 255, 255)'. Shorter tuples are zero-padded; longer tuples are truncated. Ignored when labels are connected.
labelsoptNPARRAY(E,) integer labels: one color per edge cluster.

Outputs (2)

NameTypeDescription
imageCOMFY_MATCHTYPE_V3Same format as the image input.
countINTHow many edges were actually drawn (valid indices).