Skip to content
AI360Xpert
Beta

Lowe's Ratio Test

The ratio test keeps a match only when the best candidate beats the runner up clearly, which drops pairs from repetitive texture.

The ratio test compares first and second neighbor distances and keeps clear winners.
The ratio test compares first and second neighbor distances and keeps clear winners.

Why Does This Exist?

Nearest neighbor always returns something, even on brick walls where every patch looks alike. Absolute distance thresholds fail because good pairs in hard lighting can sit farther than false pairs in clean texture. Lowe's fix compares each query against itself: how much better is best than second best.

A clear winner means a distinctive patch. A close race means ambiguity, so the pair is dropped before geometry. It sits between feature matching and robust fitting.

Think of It Like This

A photo finish rule

A race winner by a full stride is clear. A blanket finish with three noses together is a guess. Judges demand a margin before paying out.

The ratio d1/d2d_1/d_2 is that margin. Below about 0.750.75 pays, above it refuses. The analogy stops at calibration: sprint margins are fixed, while descriptor margins shift with binary versus float distances.

How It Actually Works

Run knn with k=2k = 2 per query to get best distance d1d_1 and runner up d2d_2. Keep the match when:

d1d2<τ\frac{d_1}{d_2} < \tau

Lowe's τ=0.75\tau = 0.75 suits SIFT floats. Binary ORB often uses 0.750.75 to 0.80.8 on Hamming distances. Apply before cross check and RANSAC so estimators see cleaner input.

Worked numbers

A SIFT query with d1=210d_1 = 210 and d2=340d_2 = 340 gives ratio 0.620.62 and survives. A brick query with d1=190d_1 = 190 and d2=205d_2 = 205 gives 0.930.93 and is dropped even though its absolute best beats the first query. On 1,0001{,}000 raw pairs, ratio filtering often keeps 250250 to 400400, and most drops are correct rejections of repeated texture. Tighten τ\tau to 0.70.7 for cleaner input, loosen to 0.80.8 when recall starves.

Watch Out For

One threshold for all descriptors

Float Euclidean gaps and binary Hamming gaps live on different scales. Copying 0.750.75 everywhere either starves ORB or floods SIFT. Tune per descriptor family on your own pairs.

Ratio as the only filter

Ratio kills ambiguity, not geometric error. Repeated windows can still pass by chance. Always follow with cross check or a RANSAC vote before estimating pose.

The Quick Version

  • Needs knn with k=2k = 2 distances per query.
  • Keeps matches with d1/d2d_1/d_2 below threshold, classically 0.750.75.
  • Rejects repetitive texture better than absolute caps.
  • Cheap and essential before geometric estimation.
  • Tune separately for float and binary descriptors.