matching
matching
#
match — the keypoints two images agree on, verified by a fundamental matrix.
MIN_CANDIDATES = 8
module-attribute
#
Fewer candidates than a fundamental matrix needs yield no matches at all.
MIN_INLIERS = 15
module-attribute
#
A fundamental matrix explaining fewer correspondences is chance, not a shared scene.
RATIO = 0.8
module-attribute
#
Lowe's ratio: a nearest neighbour counts only when this much closer than the second.
match(image_a, image_b)
#
The keypoint correspondences between image_a and image_b.
Each image's keypoints are matched by descriptor distance with Lowe's
ratio test in both directions, keeping only mutual pairs; a fundamental
matrix fitted by MAGSAC then keeps the pairs consistent with one rigid
scene, so no intrinsics are needed. Fewer than MIN_CANDIDATES mutual
pairs cannot be verified, and fewer than MIN_INLIERS verified ones
are chance agreement; both give no matches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image_a
|
Image
|
The first image. |
required |
image_b
|
Image
|
The second image. |
required |
Source code in capturegraph-recipes/capturegraph_recipes/sfm/correspondence/matching.py
mutual_matches(descriptors_a, descriptors_b)
#
The M×2 index pairs passing the ratio test from both sides.