Nodes/comfyui_cv/CV Draw Matches
ComfyUI Node

CV Draw Matches

Debug helper: draws the matched keypoint pairs side by side (cv2.drawMatches). Feed the inlier mask from cv2.findHomography / cv2.findFundamentalMat to show only RANSAC inliers.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Draw Matches
  • image_a
  • keypoints_a
  • image_b
  • keypoints_b
  • matches
  • inlier_mask
  • image
max_draw0
color(0, 255, 0)
Categoryimage/CV/features

Inputs (8)

NameTypeDefaultDescription
image_aCOMFY_MATCHTYPE_V3Left image of the pair. 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.
keypoints_aCV_KEYPOINTSKeypoints of image A.
image_bCOMFY_MATCHTYPE_V3Right image of the pair (same format as image_a). 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.
keypoints_bCV_KEYPOINTSKeypoints of image B.
matchesCV_MATCHESMatches from 'CV Match Features' to draw.
max_drawINT00–10000Draw at most this many matches (best first). 0 = all.
inlier_maskoptNPARRAYNx1 uint8 mask from findHomography & co: only matches flagged 1 are drawn.
coloroptSTRING(0, 255, 0)Color of the match lines and their keypoints, as a single value or a BGR tuple. The green default vanishes over foliage, grass or any green subject - set something the pair of photos does not contain.

Outputs (1)

NameTypeDescription
imageCOMFY_MATCHTYPE_V3Side-by-side canvas, same format as the image inputs.