Skip to content
AI360Xpert
Beta

Oriented FAST and Rotated BRIEF

ORB fixes FAST with a pyramid plus orientation and pairs it with a rotated binary test, giving free and fast points for matching.

ORB paints one compass direction per patch from its intensity centroid, then compares the rotated binary strings by counting differing bits.
ORB paints one compass direction per patch from its intensity centroid, then compares the rotated binary strings by counting differing bits.

Why Does This Exist?

SIFT and SURF matched well across rotation and scale but were slow and once carried patent risk, so phones and drones could not run them at frame rate. FAST corners were cheap to find yet had no orientation and no scale handling: rotate the image and every descriptor mismatched.

ORB (Rublee and colleagues, 2011) fused two cheap ideas into one free pipeline: multiscale oriented FAST for detection plus steered BRIEF for description. The pyramid adds coarse scale tolerance, the intensity centroid adds rotation, and binary strings add millisecond Hamming matching. That mix powers open-source SLAM and panorama demos to this day. The point-detection roots live in corner and keypoint detection; putting the points to work lives in feature matching. This page covers the pyramid, the compass and the bit strings.

The one idea you need first. A descriptor is a compact fingerprint per keypoint, and matching compares fingerprints instead of pixels. Binary fingerprints compare with Hamming distance, the count of differing bits, which hardware counts almost for free.

Think of It Like This

A compass taped to a barcode

FAST alone is a barcode with no up direction: rotate the package and the scanner misreads it. ORB tapes a compass to each barcode, then prints the bars relative to north, so the same package scans at any angle.

The intensity centroid is that compass, and rotated BRIEF prints the barcode relative to it. Where it stops: the compass fixes rotation only, while big zoom changes still defeat it, since the pyramid covers coarse scale steps rather than extreme close-ups.

How It Actually Works

Pyramid detection with Harris ranking

Detection builds an image pyramid, meaning successively downscaled copies with a scale factor near 1.21.2 across about 88 levels. FAST corners (pixels much brighter or darker than most of a surrounding ring) run per level, survivors rank by Harris response (a corner-strength score that rejects edge-like replies), and the top NN points spread across levels are kept. The pyramid buys scale tolerance; the Harris cut keeps the points repeatable.

One compass direction per patch

Orientation comes from the intensity centroid. With patch moments m10m_{10} (brightness-weighted horizontal offset), m01m_{01} (vertical offset) and m00m_{00} (total mass):

θ=atan2(m01,m10)\theta = \mathrm{atan2}(m_{01}, m_{10})

where θ\theta is the angle from the patch center to its brightness centroid, and atan2\mathrm{atan2} is the quadrant-aware arctangent. Description then rotates a fixed set of 256256 pixel-pair tests by θ\theta and stores each brighter-or-darker verdict as one bit, giving a 256256-bit rotated BRIEF string that turns with the image.

Worked numbers

Take a patch with moments m10=1200m_{10} = 1200 and m01=900m_{01} = 900. Then θ=atan2(900,1200)=arctan⁡(0.75)≈36.87\theta = \mathrm{atan2}(900, 1200) = \arctan(0.75) \approx 36.87 degrees: the compass points up and right, and all 256256 pair tests rotate by that angle before comparing. For matching, shrink to an 88-bit toy: descriptor a=10110011a = 10110011 against b=10010010b = 10010010 differ in positions two and six only, so the Hamming distance is 22. At full scale, true pairs differ in a few dozen of 256256 bits while random pairs average 256×0.5=128256 \times 0.5 = 128, so a threshold near 5050 plus a ratio test separates them cleanly.

Code

import math
theta = math.degrees(math.atan2(900, 1200))a, b = 0b10110011, 0b10010010ham = bin(a ^ b).count("1")print(round(theta, 2), ham)# -> 36.87 2

Watch Out For

Scale factor left at defaults for close-ups

A 1.21.2 factor over 88 levels covers moderate zoom only. The symptom is a product macro that matches nothing against its shelf photo while ordinary views match fine. Fix it with more levels, a smaller factor, or SIFT when scale range truly matters.

Too few points on blank walls

ORB keeps the top NN by score, so textureless rooms still return a full quota of weak points. The symptom is confident matches between bare walls that share nothing. Fix it by raising the FAST threshold, requiring support across pyramid levels, or fusing another cue instead of trusting 500500 forced points.

The Quick Version

  • Pyramid FAST plus Harris ranking gives fast multiscale corner points.
  • The intensity centroid assigns one rotation θ=atan2(m01,m10)\theta = \mathrm{atan2}(m_{01}, m_{10}) per point.
  • Rotated BRIEF stores 256256 orientation-corrected bits per patch.
  • Hamming distance compares thousands of fingerprints in milliseconds.
  • A 36.8736.87-degree example and a 22-bit toy distance show the full pipeline arithmetic.