CV Lab 20 · Module 8 — Feature Detection

Feature Matching

A small template object, a cluttered scene, and one question: is it in there, and where? Detect keypoints in both, fingerprint each one, match fingerprints, throw away the ones that lie, then let geometry itself draw a box around the answer.

Template meets scene Every keypoint gets a fingerprint. Matching finds the closest fingerprint on the other side. RANSAC then checks: do all these matches agree on ONE consistent geometric story, or are some of them just lying?
Template keypoint Scene keypoint Verified inlier match Outlier / discarded
Ready.
Live Explanation
Loading…

Click any keypoint on the template. Its ORB binary fingerprint and SIFT gradient fingerprint are computed live, side by side, from the exact same patch of pixels.

ORB — 256-bit binary barcode
SIFT-style — 128-dim gradient bar graph

Two fingerprints, one verification step

ORB vs SIFT

ORB is a bit-string compared with cheap XOR+popcount — built for speed. SIFT-style is a normalized gradient histogram compared with Euclidean distance — the L2 normalisation makes it naturally tolerant of brightness and contrast changes ORB cannot see past.

Matching alone is not enough

Even good matching finds some wrong pairs by pure coincidence — two unrelated corners whose fingerprints happen to be close. Distance cutoff and the ratio test remove the obviously weak guesses.

RANSAC finds the real story

Real matches from a real object all agree on one consistent transform (rotate, scale, shift). RANSAC repeatedly guesses a transform from a few matches and counts how many others agree with it — the largest agreeing group wins, everyone else is an outlier.

Predict, then verify

In Match & Verify, you turn RANSAC off entirely and set the ratio test very loose. What does the "web" of match lines look like?