Feature Matching
Matching pairs descriptors across images by nearest distance, then keeps only pairs that survive ratio and geometry checks.
Why Does This Exist?
Descriptors give fingerprints, but stitching and pose need pairs. Matching turns two descriptor sets into correspondences: which point in image A shows the same physical spot as which point in image B. Everything downstream, from homography to 3D pose, eats these pairs.
Naive nearest neighbor keeps many false friends on repetitive texture. Real pipelines add cross checks, ratio tests, and geometric voting. For fingerprint basics, read feature descriptors first.
Think of It Like This
Matching socks from two dryers
Two dryers hold similar socks. You pair each sock from dryer A with its closest look in dryer B. Then you flip the task: does that B sock also pick your A sock first. One way crushes produce false pairs, both way agreement plus a pattern check keeps real ones.
Cross check is that flip. Ratio and RANSAC are the pattern checks. The analogy stops at geometry: socks have no camera pose, while image pairs must agree on one transform.
How It Actually Works
Given query and train descriptors, compute distances with L2 for floats or Hamming for binary strings. For each query keep best match and second best . Keep the pair when passes an absolute cap and the ratio passes the ratio test. Mutual cross check keeps pairs that are best both directions.
Worked numbers
Image A has ORB descriptors, image B has . Brute force scores Hamming distances. Suppose a query has and . Ratio , so it passes a gate. Another query with and gives ratio and is dropped as ambiguous. From raw pairs, perhaps survive ratio, survive cross check, and survive geometry.
Watch Out For
Trusting raw nearest neighbors
Top one match without filtering looks dense and impressive, but half the lines cross wrongly on brick or leaves. Always add ratio, cross check, and a geometric vote before pose.
Wrong distance on wrong type
L2 on bit strings scrambles rankings, and Hamming on SIFT floats is undefined. Match the metric to the descriptor or every later filter works on noise.
The Quick Version
- Nearest neighbor proposes pairs by descriptor distance.
- Cross check requires mutual best matches.
- Ratio test drops ambiguous texture pairs.
- Geometry keeps pairs that agree on one transform.
- Match quality decides stitching and pose success.