Algorithm Search⌘K

Conceptcore

Covariant and invariant local features

Also called feature invariance, affine covariant regions.

A detector is covariant when its regions move with the image under a class of transformations, and a descriptor is invariant when its value does not change under them.

A local feature is a small region of an image, found by a detector, together with a descriptor that summarizes the image inside it. Let TT be a transformation of the image plane, such as a shift, a turn, a change of scale or an affine map, and let f∘T−1f \circ T^{-1} be the image ff moved by TT. A detector is covariant with a class of transformations when it finds the moved regions in the moved image: if it finds the region RR in ff, it finds T(R)T(R) in f∘T−1f \circ T^{-1}. A descriptor is invariant when it gives the same value for RR in ff and for T(R)T(R) in f∘T−1f \circ T^{-1}. Covariance of the detector and invariance of the descriptor together let a program match the same piece of a scene in two photographs taken from different places, at different zoom or in different light. The usual word "invariant feature" means this pair of properties.

In plain words

Two photographs of one building, taken from two places, show the same windows at different positions, sizes and angles. A good feature finder marks the same windows in both photographs, and its marks move, grow and turn with the windows. That is covariance. Then each mark gets a short summary of what is inside it. A good summary gives the same answer in both photographs, because it was measured inside the mark, after the mark was turned and scaled to a standard size. That is invariance. The price is that the summary cannot see what the standard form removed: a summary that ignores turning cannot tell a 6 from a 9.

The idea

Classes of transformations. The useful classes form groups, each one inside the next:

class parameters what a region must carry
translation 2 a position
translation and rotation 3 a position and an orientation
similarity 4 a position, a scale and an orientation
affine 6 a position, an ellipse and an orientation
homography 8 a position and a full projective frame

There are photometric classes too: an offset I↦I+bI \mapsto I + b, an affine change I↦aI+bI \mapsto aI + b with a>0a > 0, and any increasing map of the gray values.

Why the affine class. A smooth surface is close to a plane in a small region, and two views of a plane differ by a homography. In a small region a homography is close to its first-order part, which is an affine map. So affine covariance is the local model of a change of viewpoint. Full projective covariance is rarely needed for small regions.

Covariance by construction. A detector is covariant when it is built only from operations that are themselves covariant. Derivatives at a point turn with the image, so the eigenvalues of a 2×22 \times 2 matrix of derivatives, as in the Harris or the Shi-Tomasi measure, do not change under rotation, and their maxima move with the image. Automatic scale selection makes the scale covariant: a structure ss times larger is found at a scale s2s^2 times larger in t=σ2t = \sigma^2. Affine shape adaptation in Harris-affine makes the ellipse covariant. MSER is covariant by its definition, because a connected component of a threshold set is mapped by any continuous map to the connected component of the mapped set.

Invariance by normalization. A covariant region defines a frame. Map the region to a fixed standard form, such as a disk of radius 1 with its orientation along the first axis, and compute the descriptor there. Two corresponding regions then give the same standard patch, so any descriptor computed on it is invariant. SIFT does this for the similarity class with a position, a scale and a dominant gradient orientation. For an ellipse {x:x⊤Σ−1x≤1}\{\mathbf x : \mathbf x^\top \Sigma^{-1} \mathbf x \le 1\} the map Σ−1/2\Sigma^{-1/2} sends the ellipse to the unit disk. Under an affine map AA the ellipse becomes Σ′=AΣA⊤\Sigma' = A \Sigma A^\top, and the two normalized frames differ by the matrix Σ′−1/2AΣ1/2\Sigma'^{-1/2} A \Sigma^{1/2}, which is orthogonal because its product with its transpose is Σ′−1/2AΣA⊤Σ′−1/2=I\Sigma'^{-1/2} A \Sigma A^\top \Sigma'^{-1/2} = I. So the ellipse removes the affine map up to a rotation, and a dominant orientation removes the rest.

Photometric invariance. Derivatives do not see an offset bb, so derivative based detectors are invariant to it. A gain aa multiplies a measure of order MM in the derivatives by aMa^M, which keeps the order of the responses but changes which ones pass a fixed threshold. A descriptor normalized to mean 00 and length 11 is invariant to the affine change aI+baI + b. The set of extremal regions of MSER does not change under any increasing map of the gray values.

The trade-off. Each invariance removes information. A larger class needs more parameters per region, and each estimated parameter adds noise; an affine frame is less stable than a similarity frame when the true change is only a rotation and a scale. A detector should be covariant with the class that the application needs, and no larger.

Examples

A rotation by 90 degrees. On the pixel grid, a rotation by 90 degrees and a shift by whole pixels are exact. The derivative matrix at a point becomes RMR⊤R M R^\top with RR the rotation, with the same eigenvalues, so the Harris and Shi-Tomasi values are the same at the rotated point and the detected points rotate with the image. Rotations by other angles are only approximately exact, because the image is resampled.

A blob that grows. A Gaussian blob of variance t0t_0 has its normalized Laplacian maximum at t=t0t = t_0. Scale the image by s=2s = 2: the blob has the variance 4t04t_0, and the maximum moves to t=4t0t = 4t_0. The ratio of the two selected scales is the ratio of the sizes squared, as covariance requires.

A shear and its ellipse. Take a circular region, Σ=I\Sigma = I, and the shear A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}. Then Σ′=AA⊤=(2111)\Sigma' = A A^\top = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, with eigenvalues (3±5)/2=2.618(3 \pm \sqrt 5)/2 = 2.618 and 0.3820.382. The mapped region is an ellipse with semi-axes 1.6181.618 and 0.6180.618, whose product is 1=det⁡A1 = \det A, with the long axis at 31.731.7 degrees to the uu axis. The matrix Σ′−1/2A\Sigma'^{-1/2} A is the rotation by −26.6-26.6 degrees, (0.8940.447−0.4470.894)\begin{pmatrix} 0.894 & 0.447 \\ -0.447 & 0.894 \end{pmatrix}, so after normalization the two regions differ only by this rotation.

A change of light. Add 1010 to every gray value. The Harris measure, the DoG and the Hessian do not change, and MSER finds the same regions with every level shifted by 1010. Double every gray value: the Harris measure is multiplied by 1616 and the DoG by 22.

Where it is used

  • Wide-baseline matching and stereo. Covariant regions and invariant descriptors find the same scene points in views that are far apart; MSER was introduced for this task.
  • Image registration and panoramas. Matched features give the correspondences for homography estimation.
  • Structure from motion. Feature tracks over many photographs come from invariant features.
  • Object recognition and image retrieval. Invariant descriptors of an object can be matched in new scenes, at any position, size and orientation.
  • Evaluation. Detector repeatability measures how well a detector is covariant in practice.

References

  1. Tinne Tuytelaars and Krystian Mikolajczyk, Local invariant feature detectors, a survey, Foundations and Trends in Computer Graphics and Vision 3(3), 177-280, 2008, the introduction (local features, invariance and covariance, and the properties of a good feature)
  2. Krystian Mikolajczyk, Tinne Tuytelaars, Cordelia Schmid, Andrew Zisserman, Jiri Matas, Frederik Schaffalitzky, Timor Kadir and Luc Van Gool, A comparison of affine region detectors, International Journal of Computer Vision 65(1-2), 43-72, 2005, the introduction (why affine covariant regions model a local change of viewpoint) and the section on the detectors
  3. Krystian Mikolajczyk and Cordelia Schmid, Scale and affine invariant interest point detectors, International Journal of Computer Vision 60(1), 63-86, 2004, Section 3 (the affine normalization of a region by its second moment matrix)
  4. David G. Lowe, Distinctive image features from scale-invariant keypoints, International Journal of Computer Vision 60(2), 91-110, 2004, Section 5 (the orientation assignment) and Section 6 (the descriptor computed in the frame of the keypoint)
  5. Tony Lindeberg, Feature detection with automatic scale selection, International Journal of Computer Vision 30(2), 79-116, 1998, the sections on the scale invariance of the extrema of normalized derivatives

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/MX501M/text.yaml