CV Match Features (Model)
Matches two sets of keypoints+descriptors using an ONNX matcher model (LightGlue family) via cv2.dnn. All .onnx files in models/onnx (including subdirectories) are listed — pick the matcher that matches your extractor (e.g. lightglue/disk_lightglue.onnx for DISK features). Outputs follow the standard feature infrastructure: cv2.DMatch list for 'CV Draw Matches', Nx1x2 point arrays for 'CV Find Homography (RANSAC)'. LightGlue reads keypoints in a normalized frame centred on the image, and the exported ONNX does NOT do that conversion itself - this node does it, from the sizes on 'space_a'/'space_b' when they are wired, or from the keypoints' own extent when they are not (the reference implementation's own fallback). Zero matches is a valid result (empty outputs, not an error).
- keypoints_a
- descriptors_a
- keypoints_b
- descriptors_b
- space_a
- space_b
- matches
- points_a
- points_b
- scores
- match_count
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| keypoints_a | CV_KEYPOINTS | Keypoints of image A (from 'CV Feature Extract (Model)'). | |
| descriptors_a | NPARRAY | Descriptors of image A, paired with keypoints_a. | |
| keypoints_b | CV_KEYPOINTS | Keypoints of image B (from 'CV Feature Extract (Model)'). | |
| descriptors_b | NPARRAY | Descriptors of image B, paired with keypoints_b. | |
| model | COMBO | ONNX matcher model from models/onnx (e.g. lightglue/disk_lightglue.onnx). | |
| space_aopt | NPARRAY,IMAGE,MASK,LATENT | Image A itself - only its height/width are read, to normalize keypoints_a the way LightGlue expects. Leave unconnected to infer the size from the keypoints' own extent instead. | |
| space_bopt | NPARRAY,IMAGE,MASK,LATENT | Image B itself - only its height/width are read, to normalize keypoints_b. Leave unconnected to infer the size from the keypoints' own extent instead. | |
| engineopt | COMBO | auto (default engine) | DNN engine for inference. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| matches | CV_MATCHES | cv2.DMatch list sorted best-first. |
| points_a | NPARRAY | (M, 1, 2) float32 matched point coordinates in A. |
| points_b | NPARRAY | (M, 1, 2) float32 matched point coordinates in B. |
| scores | NPARRAY | (M,) float32 match confidence scores. |
| match_count | INT | Number of matches found. |