ComfyUI Node
CV Match Features
Matches two descriptor sets with BFMatcher or FLANN. Outputs matches sorted by distance and matched point coordinates as Nx1x2 float32 arrays, ready for 'CV Find Homography (RANSAC)' / cv2.findFundamentalMat / cv2.estimateAffine2D. Zero matches is a valid result, not an error - check the count (or the homography node's 'found' flag) downstream.
CV Match Features
- keypoints_a
- descriptors_a
- keypoints_b
- descriptors_b
- matches
- points_a
- points_b
- count
◄matcherBFMatcher►
◄norm_typeauto►
◄match_moderatio test (Lowe)►
◄ratio0.75►
◄k2►
◄radius0.0►
◄flann_algorithmauto►
◄flann_trees5►
◄flann_checks50►
◄flann_table_number6►
◄flann_key_size12►
◄flann_multi_probe_level1►
Categoryimage/CV/features
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| keypoints_a | CV_KEYPOINTS | Keypoints of image A (from 'CV Detect Features'). | |
| descriptors_a | NPARRAY | Descriptors of image A, paired with keypoints_a. Must use the same detector as image B. | |
| keypoints_b | CV_KEYPOINTS | Keypoints of image B (from 'CV Detect Features'). | |
| descriptors_b | NPARRAY | Descriptors of image B, paired with keypoints_b. | |
| matcher | COMBO | BFMatcher | BFMatcher: brute-force, exact, fast for small/mid descriptor sets. FLANN: approximate nearest neighbors, faster for large sets (10k+ descriptors). |
| norm_type | COMBO | auto | Distance norm. 'auto' = HAMMING for uint8 (ORB/BRISK/AKAZE), L2 for float32 (SIFT). Override only if you know what you are doing. |
| match_mode | COMBO | ratio test (Lowe) | Ratio test: keep matches clearly better than the runner-up (robust default). Cross-check: keep only mutual best matches (BFMatcher only). Radius: keep all matches within max distance (all matchers). |
| ratio | FLOAT | 0.750.1–1 | Lowe ratio threshold; lower = stricter. Ignored for cross-check and radius modes. |
| kopt | INT | 22–32 | k for kNN matching. 2 = Lowe's ratio test (standard). Higher k considers more candidates but is slower. Ignored for cross-check mode. |
| radiusopt | FLOAT | 0.0 | Max distance for radius matching. 0 = no limit (returns all matches). Only used when mode = radius. |
| flann_algorithmopt | COMBO | auto | FLANN index algorithm. 'auto' = KDTREE for float32 descriptors, LSH for binary (uint8). Override to force a specific algorithm. |
| flann_treesopt | INT | 51–16 | FLANN KDTREE: number of randomized trees. More = better accuracy, slower build. |
| flann_checksopt | INT | 501–1000 | FLANN search: number of leaves to check. Higher = more accurate but slower. |
| flann_table_numberopt | INT | 61–30 | FLANN LSH: number of hash tables. Only used for binary descriptors. |
| flann_key_sizeopt | INT | 124–32 | FLANN LSH: key bits per table. Only used for binary descriptors. |
| flann_multi_probe_levelopt | INT | 10–5 | FLANN LSH: extra search probes per table. 0 = standard LSH, higher = more accurate. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| matches | CV_MATCHES | — |
| points_a | NPARRAY | Matched keypoint coordinates in image A, Nx1x2 float32. |
| points_b | NPARRAY | Matched keypoint coordinates in image B, Nx1x2 float32. |
| count | INT | — |