ORB · computer vision

Also known as: Oriented FAST and Rotated BRIEF · ORB features

On this page 8

ORB, short for Oriented FAST and Rotated BRIEF, is a local feature detector and descriptor in computer vision that finds distinctive keypoints in an image and encodes each one as a compact 256-bit binary string. It was introduced in 2011 by Ethan Rublee and colleagues as a free, fast alternative to SIFT and SURF, which were patented at the time and too slow for many real-time systems.

Within the Computer vision topic of artificial intelligence, ORB belongs to the classical, hand-engineered family of feature matching methods. It remains a default choice for visual SLAM, image stitching and visual odometry on embedded hardware, because ORB features can be extracted and matched in a few milliseconds on an ordinary CPU without any training data.

How ORB detects and describes keypoints

ORB works in two stages: an oriented FAST detector locates corner-like points, and a steered BRIEF descriptor turns the patch around each point into a binary fingerprint. Both stages were modified from their original forms to add rotation invariance and a degree of scale invariance, which plain FAST and BRIEF lack.

Detection begins with FAST-9, which tests whether at least nine contiguous pixels on a 16-pixel circle are all brighter or all darker than the center by a threshold. FAST responds strongly along edges, so ORB ranks candidates with the Harris corner measure and keeps the top N points. To cover different sizes, the detector runs on an image pyramid, typically 8 levels with a scale factor of 1.2.

Orientation comes from the intensity centroid: ORB computes first-order image moments in a circular patch and takes the angle from the patch center to the centroid. The BRIEF sampling pattern is then rotated by that angle before the 256 pairwise intensity comparisons are made, so the same corner seen at a different rotation produces nearly the same bit string.

The following table summarizes what each component contributes to the final feature.

ComponentWhat it doesWhy it matters
FAST-9 detectorFinds candidate corners with a circle testVery cheap per pixel
Harris rankingScores corners and keeps the strongest NRemoves weak edge responses
Image pyramidRepeats detection at several scalesPartial scale invariance
Intensity centroidAssigns a dominant orientationRotation invariance
rBRIEF descriptor256 learned binary intensity testsCompact, fast to compare
Components of the ORB pipeline

Why ORB uses learned binary tests

Simply steering BRIEF by orientation makes the bits highly correlated and less discriminative, because rotated tests tend to behave alike. The ORB authors addressed this with a greedy search over a training set of keypoints, choosing 256 test pairs that have high variance, a mean near 0.5 and low mutual correlation. The result is called rBRIEF, and its fixed pattern is shipped with every implementation.

Binary descriptors are compared with the Hamming distance, the count of differing bits. On modern processors this is a XOR followed by a population count instruction, which is orders of magnitude cheaper than the Euclidean distance between floating-point vectors. A typical ORB descriptor occupies 32 bytes, against 512 bytes for a 128-dimensional float SIFT vector.

ORB compared with SIFT, SURF and other descriptors

ORB trades some matching accuracy under large scale and viewpoint changes for a large gain in speed and memory. The comparison below reflects commonly reported behavior; exact figures depend on image resolution, implementation and hardware.

MethodDescriptor typeSizeRelative speedRobustness
ORBBinary32 bytesVery fastGood rotation, moderate scale
SIFTFloat gradient histogram128 floatsSlowStrong scale and rotation
SURFFloat Haar responses64 floatsModerateGood scale and rotation
BRISKBinary64 bytesFastGood scale and rotation
AKAZEBinary (M-LDB)61 bytesModerateStrong on nonlinear scale space
Classical local feature methods side by side

Learned descriptors such as SuperPoint usually outperform ORB on difficult benchmarks, but they need a neural network and often a GPU. ORB remains attractive where deterministic behavior, no training data and low power are requirements, for example on drones, phones and robot controllers.

Key parameters and how to tune them

Most ORB implementations, including the one in OpenCV, expose a small set of parameters that control how many features are found and how they are spread. Tuning them usually matters more than switching descriptors.

ParameterTypical defaultEffect of increasing it
Number of features500More matches, higher cost
Scale factor1.2Fewer levels, coarser scale coverage
Number of levels8Wider scale range, more computation
FAST threshold20Fewer, stronger corners
Edge threshold / patch size31 pixelsLarger support, fewer border features
WTA_K2Tests compare 3 or 4 pixels; needs other distance
Main ORB parameters in common implementations

A frequent practical improvement is grid-based keypoint distribution: dividing the image into cells and keeping the best corners per cell. Without it, ORB tends to cluster features on high-texture regions, which weakens pose estimation. ORB-SLAM uses this technique together with an octree to spread points evenly.

Matching ORB features in practice

ORB descriptors are matched by brute-force Hamming search for small sets or by locality-sensitive hashing for large databases. Raw matches always contain errors, so a robust pipeline adds filters before trusting the result.

  • Ratio test: accept a match only if the best distance is clearly smaller than the second best, often by a factor of 0.7 to 0.8.
  • Cross-check: keep a pair only if each descriptor is the other’s nearest neighbor.
  • Distance threshold: reject pairs above roughly 50 to 64 differing bits out of 256.
  • Geometric verification: fit a homography or fundamental matrix with RANSAC and keep only the inliers.

In bag-of-words place recognition, ORB descriptors are quantized into a binary vocabulary tree such as DBoW2, which lets a SLAM system detect loop closures among thousands of keyframes in real time.

Limitations and common mistakes

ORB is not fully scale invariant: the pyramid covers only a finite range, and matching across a zoom factor above about 2 to 3 degrades quickly. It is also sensitive to strong blur, low texture and large viewpoint changes, because FAST needs sharp intensity contrast and BRIEF tests are not affine invariant.

SymptomLikely causeRemedy
Few keypoints on smooth wallsLow texture, high FAST thresholdLower threshold, add another sensor
Features crowded in one areaNo spatial distribution controlUse grid or octree bucketing
Many false matchesRepetitive patternsRatio test and RANSAC
Failure after zoomScale outside pyramid rangeAdd levels or use SIFT
Wrong distance resultsUsing L2 on binary dataUse Hamming distance
Typical ORB problems and remedies

A common error is matching ORB descriptors with Euclidean distance or feeding them to a float-based index, which silently produces poor results. Another is assuming patent restrictions still apply to alternatives: the SIFT patent expired in 2020, so the choice between ORB and SIFT is now mainly a question of speed versus robustness.

Explained without jargon

ORB helps a computer find the same spots in two pictures. It looks for sharp corners, such as the tip of a window frame. For each corner, it writes a short code of ones and zeros. The code records which nearby pixels are brighter than others.

When the camera turns, ORB turns its measuring pattern too. So the same corner keeps nearly the same code. Comparing two codes is like counting how many light switches differ between two rows. That is why ORB is extremely fast and runs well on small devices.

A typical use case

A warehouse robot uses a single forward-facing camera at 640 by 480 pixels and 30 frames per second to estimate its own position. Its onboard computer extracts about 1,000 ORB features per frame spread over a grid, matches them to the previous keyframe with the Hamming distance and a ratio test, and estimates motion with RANSAC.

Because extraction and matching take only a few milliseconds per frame on an embedded ARM processor, the robot keeps real-time visual odometry without a GPU. When it returns to a known aisle, a binary vocabulary of ORB descriptors recognizes the place and corrects accumulated drift, keeping the map error within a few centimeters over a full shift.