Skip to content
AI.info

Computer vision

Classical Features: Edges, Corners, and Descriptors

Explore gradients, edge detectors, corners, local descriptors, HOG, matching, and the assumptions behind handcrafted visual representations.

By the end you can

Visual

A classical local-feature pipeline

The pipeline separates where to look from how to describe what was found. Each of the five stages has its own literature and its own measured result. Ten descriptors were ranked against each other by Mikolajczyk and Schmid in 2005. The matching rule most systems still use is Lowe's distance ratio, from 2004. The geometric verifier at the end is random sample consensus, from Fischler and Bolles in 1981.

That division matters for reading results. A single accuracy figure quoted at the end of the chain is a figure about all five stages at once. The published record — set out in the next section — shows that changing one stage can reverse the reported ranking of another.

FigureProcess · 5 steps
  1. 1. Normalize or smooth

    Reduce noise and choose the spatial scale of interest.

  2. 2. Detect structures

    Find edges, corners, blobs, lines, or regions with useful repeatability.

  3. 3. Assign scale and orientation

    Create partial invariance to image size and rotation.

  4. 4. Build descriptors

    Summarize local gradients or intensities around each point.

  5. 5. Match and verify

    Compare descriptors, reject ambiguous matches, and test geometric consistency.

Edges are measurements of change, not object boundaries

Image gradients respond where intensity changes across space; they can mark object boundaries, shadows, texture, reflections, or sensor artifacts.

Derivative filters amplify noise. So smoothing and scale matter. A strong edge does not automatically identify which side belongs to an object.

The field has treated this as a measurement problem from the beginning. Random sample consensus arrived in 1981, and Fischler and Bolles justified it by the state of the front end feeding it. The method, their abstract says, “is capable of interpreting/smoothing data containing a significant percentage of gross errors, and is thus ideally suited for applications in automated image analysis where interpretation is based on the data provided by error-prone feature detectors.” The premise has not been retired. Everything downstream of a gradient is built to survive it.

An edge detector finds local contrast structure, not semantic meaning.

Comparison

Detector, descriptor, matcher, and geometric verifier

These components solve different subproblems and should be evaluated separately. The reason that instruction exists is documented, and it is not a matter of taste.

For over a decade the standard testbed for local features was the Oxford affine covariant regions set. The HPatches authors describe it in one sentence: “It consists of image sequences of 8 scenes, each containing 6 images, and ground-truth homographies.” Oxford's Visual Geometry Group distributes exactly those eight sequences — Bikes and Trees for blur, Graffiti and Bricks for viewpoint, Bark and Boat for zoom and rotation, Cars for light, UBC for JPEG compression.

Table 1 of the HPatches paper collects what the literature concluded from that one small set, and the caption of the table is the finding. It is headed: “Contradicting conclusions reported in literature while evaluating the same descriptors on the same benchmark (Oxford [22]).” The rows are pairs published in both directions — LIOP>SIFT and SIFT>LIOP, BRISK>SIFT and SIFT>BRISK, ORB>SIFT and SIFT>ORB, ORB>BRIEF and BRIEF>ORB. Same descriptors, same eight scenes, opposite verdicts.

A ranking, then, is a property of a whole pipeline measured on a particular set of images. It is not a property of the descriptor whose name appears in the conclusion. HPatches was built in 2017 as the replacement, and it separates the two nuisance factors by construction: “In 57 scenes the main nuisance factors are photometric changes and the remaining 59 sequences show significant geometric deformations due to viewpoint change.” Each sequence is a reference image plus five targets. Detector, descriptor, matcher and verifier are listed apart below because the alternative has already been tried, in print, and produced both answers.

FigureComparison · 4 columns

Keypoint detector

Selects image locations likely to be found again.

  • Goal: repeatable positions
  • Examples: corners or blobs
  • Output: coordinates and scale
  • Failure: unstable under viewpoint

Local descriptor

Encodes the neighborhood around a selected location.

  • Goal: discriminative comparison
  • Examples: gradient histograms
  • Output: feature vector
  • Failure: look-alike texture

Matcher

Pairs descriptors according to distance or ranking rules.

  • Goal: candidate correspondence
  • Often uses ratio or mutual checks
  • Output: tentative pairs
  • Failure: repeated patterns

Geometric verifier

Tests whether matches fit a scene model.

  • Goal: reject inconsistent pairs
  • Examples: homography or epipolar model
  • Output: inliers and parameters
  • Failure: wrong model assumption

Example

What handcrafted descriptors encode

These methods are valuable because their invariances and losses are comparatively explicit — explicit enough to be counted and compared. Ten of them were put on the same footing in 2005: “We use 10 different descriptors”, Mikolajczyk and Schmid write, and their abstract states the outcome: “Furthermore, we observe that the ranking of the descriptors is mostly independent of the interest region detector and that the SIFT-based descriptors perform best.”

Their own GLOH shows what the design choices cost, in numbers. SIFT uses a 4×4 Cartesian grid of 8-orientation histograms: 128 dimensions. GLOH replaces that with a log-polar grid of 17 location bins — 3 radial × 8 angular, the central bin undivided — times 16 orientation bins, a 272-bin histogram. PCA then returns it to 128, using a covariance matrix estimated on 47,000 image patches.

The paper's matching example prices the difference. Hessian-Affine regions, a viewpoint change of more than 50 degrees, a fixed 400 nearest-neighbour matches: GLOH obtained the highest recall at 0.25 and complex filters the lowest at 0.06. That is 192 correct matches down to 44, or “approximately 4.4 times less correct matches for complex filters than for GLOH”. The paper's own summary of the whole comparison is flatter: “In most of the tests, GLOH obtains the best results, closely followed by SIFT.”

  • HOG: Pools local gradient orientations over a dense grid, making shape evidence more stable than raw pixel intensity — grids that Dalal and Triggs report “significantly outperform existing feature sets for human detection”.
  • SIFT-like descriptors: Summarize oriented gradients around scale-selected keypoints; Lowe's is “a 4x4x8 = 128 element feature vector for each keypoint”, and GLOH arrives at the same 128 from the other direction, compressing a 272-bin log-polar histogram by PCA.
  • Color histograms: Represent channel distributions while discarding most spatial arrangement.
  • Local binary patterns: Compare neighboring intensities to describe small texture patterns.
  • Shape moments: Compress region geometry but depend on segmentation quality and normalization.

Analogy

Recognizing a building from architectural details

A passer-by identifies a building by matching window corners, roof edges, and decorative motifs rather than comparing every brick. Repeated, distinctive details support correspondence across viewpoints.

Matching a motif by eye is applying a human concept; descriptors are numerical summaries with limited invariance. Repeated windows can still produce ambiguous matches.

The benchmark the field standardised on makes the point literally. The two viewpoint sequences in the Oxford affine covariant regions set are Graffiti and Bricks — a marked wall and a repeating one, photographed from six positions each.

Local features work when detectable structures are repeatable and sufficiently distinctive.

Key idea

Repeated texture can create many confident wrong matches

Tiles, windows, shelves, and printed patterns may produce nearly identical descriptors at many locations; nearest-neighbor distance alone cannot establish the correct correspondence.

The standard answer is almost as old as the problem, and it works by inverting the usual instinct. Fischler and Bolles opened section II of their 1981 paper by saying so: “The RANSAC procedure is opposite to that of conventional smoothing techniques: Rather than using as much of the data as possible to obtain an initial solution and then attempting to eliminate the invalid data points, RANSAC uses as small an initial data set as feasible and enlarges this set with consistent data when possible.”

Their Figure 1 is the argument in seven points — six valid, one gross error at (10,2). That single bad point survives four rounds of throwing out the worst residual. Fitting everything and then pruning does not converge on the right line.

Robustness has a floor, and it has been measured. A 2009 evaluation of the RANSAC family estimated planar homographies from SIFT matches on the Oxford Graffiti images, and reports that “LMedS and GASAC failed in estimating homography from Image 1 to Image 4, since its inlier ratio is less than 0.5.” Estimators built on the median of squared error stop working once fewer than half the candidate matches are correct. That is exactly the regime repeated texture creates. Ratio tests, mutual consistency and spatial constraints are what keep the inlier ratio above the level at which the verifier still has something to find.

Descriptor similarity proposes a match; geometry must test whether the proposal is coherent.

Case

One distance ratio removed 90% of the false matches

One scalar test does most of the filtering in a classical matcher, and Lowe measured what it buys. He reported it in a single sentence: “we reject all matches in which the distance ratio is greater than 0.8, which eliminates 90% of the false matches while discarding less than 5% of the correct matches”.

The number is attached to a stated experiment rather than to an intuition. The figure was “generated by matching images following random scale and orientation change, a depth rotation of 30 degrees, and addition of 2% image noise, against a database of 40,000 keypoints”. The object being compared throughout is “a 4x4x8 = 128 element feature vector for each keypoint”. The paper appeared in the International Journal of Computer Vision in 2004.

The asymmetry is what made the test worth building a matching system on. At that threshold the rule is 18 times more likely to throw away a wrong match than a right one. And it costs one division, on distances the matcher has already computed.

Figure

The asymmetry, not the rejection rate on its own, is what made one scalar test worth building a matching system on.

Steps

Build a classical-feature baseline

A transparent baseline can reveal whether a deep model is solving the intended task or merely exploiting dataset scale. For most of the period in which the best-known classical descriptor defined the field, building that baseline was also a licensing question.

SIFT was patented. US Patent 6,711,293 B1 opens its abstract this way: “A method and apparatus for identifying scale invariant features in an image and a further method and apparatus for using such scale invariant features to locate an object in an image are disclosed.” The inventor is David G. Lowe, the assignee the University of British Columbia. Priority 8 March 1999, filed 6 March 2000, granted 23 March 2004, anticipated expiration 6 March 2020. The status now reads “Expired - Lifetime”. Sixteen years.

The tooling followed within weeks. OpenCV merged pull request #17119 on 24 April 2020: 21 commits moving SIFT out of the xfeatures2d module in opencv_contrib and into the main features2d module, one of them titled “features2d(sift): patent expiration note”. The step below that says construct the representation became a default import on that date, and not before it.

FigureProcess · 5 steps
  1. 1. Choose the task geometry

    Decide whether global shape, local correspondence, or texture matters.

  2. 2. Select scales and invariances

    Set smoothing, patch size, orientation, and normalization rules.

  3. 3. Construct the representation

    Aggregate descriptors into matches, histograms, or region statistics.

  4. 4. Add a simple decision model

    Use nearest neighbors, linear classifiers, or geometric fitting.

  5. 5. Compare failure slices

    Measure low texture, repetition, blur, viewpoint, and illumination separately.

Handcrafted features still matter as diagnostics

Learned representations dominate many benchmark tasks. On geometry the published comparisons do not read that way, and two unrelated groups have put the finding in print.

The Image Matching Challenge benchmark scores methods on “the accuracy of the reconstructed camera pose” rather than on an intermediate proxy, and embeds dozens of algorithms “from seminal works to the cutting edge of machine learning research”. Jin and co-authors published it in the International Journal of Computer Vision in 2020. Their abstract states the result: “We show that with proper settings, classical solutions may still outperform the perceived state of the art.”

The second finding comes from a survey arguing the opposite case. A 2019 survey from NAVER LABS Europe set out to show that detectors and descriptors are better learned than designed by hand. Its numbered conclusion 10 records the reverse anyway: “recent benchmarks targeting their application in image-based reconstruction and localisation pipelines suggest that handcrafted features still perform just as well or even better than recent deep-learned features on such tasks”. It adds that those benchmarks predate methods such as SuperPoint, KSP and DOAP.

So classical features stay useful for low-data geometry, deterministic preprocessing, interpretability, and sanity checks. They can expose whether a task depends on shape, texture, alignment, or color. A strong handcrafted baseline may show that a complex model is unnecessary.

Baselines are valuable when they clarify the source of performance, not only when they win.

Case

A designed feature cut false positives by an order of magnitude

A hand-designed feature once cut false positive rates by more than a factor of ten, and that result is still the reference point for what design could do. Dalal and Triggs pooled gradient orientations over a dense grid in 2005 and ran a linear SVM over the result. The abstract's claim is unhedged: grids of these descriptors “significantly outperform existing feature sets for human detection”.

The evidence for it begins with the test set failing rather than the method. The approach “gives near-perfect separation on the original MIT pedestrian database”, so they built a harder one, “containing 1805 64×128 images of humans cropped from a varied set of personal photos”. Against that set the paper closes on the comparison worth remembering: “reducing false positive rates by more than an order of magnitude relative to the best Haar wavelet based detector”.

The method is legible end to end — gradients, orientation bins, a dense grid, a linear classifier. That is what makes it a control rather than only a historical result. Every step is one a reader can inspect and a competitor can reproduce.

Example

Evidence to inspect in a correspondence system

Aggregate match counts can hide a pipeline that fails for the wrong reasons. Recall of 0.25 and recall of 0.06 came from the same image pair, with the same regions and the same fixed 400 nearest-neighbour matches. Only the descriptor differed. Nothing in a headline count would have separated them.

  • Keypoint density across texture, scale, and frame regions
  • Descriptor distance distributions for true and false candidate pairs
  • Ratio-test and mutual-check rejection rates, against Lowe's published reference point: a 0.8 distance ratio eliminating 90% of false matches for less than 5% of correct ones
  • Spatial plots of tentative matches and verified inliers
  • Residuals under the selected geometric model, and the inlier ratio itself, since LMedS and GASAC were measured to fail below 0.5
  • Failure examples involving repetition, motion blur, occlusion, and low contrast, separated the way the Oxford set separates them: blur, viewpoint, zoom and rotation, light, JPEG compression

Key takeaways