Feature Matching
Feature matching pairs descriptors across two or more images to produce correspondences — pixel-to-pixel links between views of the same physical point. It is the last stage of the detect-describe-match pipeline and feeds every downstream geometry estimator: homography fitting, epipolar geometry, SfM, and visual SLAM.
The standard recipe:
- Nearest-neighbor search. For each descriptor in image 1, find the closest descriptor in image 2 by Euclidean (or Hamming, for binary descriptors) distance. Efficient implementations use KD-trees or approximate-NN libraries (FLANN).
- Ratio test. Keep a match only if the nearest neighbor is distinctly closer than the second-nearest: (Lowe’s threshold). This rejects ambiguous matches that arise from repeated texture and descriptor noise.
- Mutual consistency. Optionally, keep only matches that are nearest-neighbors in both directions.
- Geometric verification via RANSAC using the problem-appropriate model (homography, fundamental matrix, or PnP).
Intuition
Descriptors turn the matching problem into nearest-neighbor search in a high-dimensional space. In principle, one could just pair each descriptor with its closest counterpart and call it done. In practice, that strategy fails: real images contain repeated texture (bricks, windows, foliage), small-scale variation (noise, compression artifacts), and occlusion (keypoints visible in one image but not the other), all of which produce confident-but-wrong matches.
The two lines of defense are the ratio test and RANSAC. The ratio test is a per-match filter: it catches cases where the descriptor itself is ambiguous (the nearest and second-nearest neighbors are both plausible). RANSAC is a global filter: it catches cases where the match is locally plausible but geometrically inconsistent with the rest. Together they reduce the outlier rate from of raw matches to a few percent, which is low enough for downstream geometric estimators to succeed.
Notes
- 4.4.1. RANSAC — Random Sample Consensus: the robust geometric-verification step that follows descriptor matching
See Also
- 4.1. Feature Detection — the detector that produces the keypoints
- 4.3. Feature Description — the descriptor that defines the matching metric
- 5.3. Epipolar Geometry — the two-view geometric model that verifies matches
- SfM — the downstream pipeline that consumes verified matches