Expand description
Scale-Invariant Feature Transform (SIFT).
SIFT finds distinctive local features that can be matched between images of the same scene despite changes in position, scale, rotation and brightness/contrast. Following Lowe (2004):
- Scale space. The image is blurred by a ladder of Gaussians grouped in octaves; each octave
covers a doubling of the blur
σwithscales_per_octavesteps, and the next octave starts from a half-size copy. - Detection. Subtracting adjacent blurred images gives difference-of-Gaussian (DoG) images, an approximation of the scale-normalised Laplacian. Local extrema over position and scale (3×3×3 neighbourhoods) are candidate keypoints.
- Localisation. A quadratic fit refines each candidate to sub-pixel, sub-scale accuracy; low-contrast candidates and candidates on edges (where the 2×2 Hessian is badly conditioned) are discarded as unstable.
- Orientation. A histogram of gradient directions around the keypoint (Gaussian weighted) gives one or more dominant orientations; a keypoint is created for each. Describing the neighbourhood relative to this orientation makes the descriptor rotation invariant.
- Descriptor. The orientation-aligned neighbourhood is divided into a 4×4 grid; each cell holds an 8-bin gradient histogram (trilinearly interpolated), giving a 128-vector, normalised and clipped at 0.2 to resist contrast and illumination changes.
The input image is first normalised to [0, 1], so the thresholds are relative to the image’s
own dynamic range and a uniform brightness/contrast change does not alter the result. A
constant image has no features.
Compared with the original paper, the image is not upsampled first (so the finest features, below about 2 pixels, are missed).
See the book entry Local features.
Structs§
- Sift
Keypoint - A SIFT keypoint with its descriptor.
- Sift
Params - SIFT parameters.
Functions§
- sift
- Detects SIFT keypoints and computes their descriptors.