ANMS
Adaptive Non-Maximal Suppression (ANMS) selects a spatially well-distributed subset of keypoints from a raw detector response. Standard non-maximal suppression enforces a fixed minimum spacing between keypoints, which wastes the detector’s ranking information. ANMS instead assigns each keypoint a suppression radius that depends on its response strength — strong keypoints suppress a large neighborhood, weak ones suppress only nearby weaker keypoints — then keeps the top- points by radius.
For each keypoint with detector response , define its suppression radius as the distance to the nearest stronger keypoint:
where (typically ) is a robustness factor that prevents nearly-equal responses from mutually eliminating each other.Keypoints are sorted by in decreasing order and the top are kept.
Intuition
A Harris response map has both a ranking (stronger corners rate higher) and a geometry (corners are spatially distributed). Plain NMS throws away the ranking by treating all keypoints equally once they pass a fixed threshold. Plain top- by response throws away the geometry, producing a clump of keypoints at the strongest feature.
ANMS threads the needle: the strongest corner in the image gets infinite suppression radius (it cannot be suppressed by anything), the second-strongest gets a radius equal to its distance to the strongest, and so on down the list. Each keypoint’s radius is, by construction, the size of the region it dominates. Picking the top- by radius keeps one keypoint per “region of dominance,” giving spatial coverage automatically.
Properties
(Radius definition) is the distance to the nearest strictly-stronger keypoint.
With the robustness factor , the comparison is , which tolerates small response differences and prevents two nearly-equal keypoints in close proximity from canceling each other out.
(Top-n by radius) After sorting by radius, the top points are spatially well-distributed.
Large radii correspond to keypoints that are both strong and isolated — exactly what downstream matching wants. The user specifies directly (e.g., 500 keypoints per image).
(Efficiency) Naive implementation is in the number of raw keypoints; KD-tree variants reduce this to .
For typical raw Harris corners, the naive version already runs in tens of milliseconds and is rarely a bottleneck.
Examples
ANMS on a Textured Scene
Suppose Harris returns 10,000 corners on a city skyline. Plain top-500 picks 500 corners clustered on the most textured building. ANMS:
- For each corner, compute as defined above.
- Sort by ; keep the 500 largest.
The result is 500 corners spread across the entire skyline — buildings, skyline silhouette, distant objects — giving RANSAC-based homography estimation much better geometric conditioning.
See Also
- 4.1.1. Harris Corner Detection — the standard detector paired with ANMS
- 4.2. Feature Selection — the broader family of selection strategies
- 4.4.1. RANSAC — the downstream estimator that benefits from well-distributed keypoints