Techniqueadvanced
Automatic scale selection
Also called Lindeberg scale selection, scale-normalized derivatives.
Pick the scale of a feature at the extremum over scale of a derivative normalized by a power of the scale, so that the chosen scale follows the size of the structure.
Automatic scale selection picks, for each feature of an image, the scale at which a normalized derivative of the scale space has a local extremum over scale. Plain derivatives of a smoothed image fall as the scale grows, so their maximum is always at the finest scale. Lindeberg multiplied each derivative of order by . With this factor, a structure that is times larger has its extremum at a scale times larger, so the selected scale follows the size of the structure. The DoG detector, the determinant of Hessian detector, the Harris-Laplace detector and the scale step of SIFT and SURF all use this rule.
In plain words
To measure how big a spot in an image is, look at it through a range of blurs, from weak to strong. A weak blur leaves the spot sharp but small compared to the blur window; a very strong blur washes it out. In between there is one blur that fits the spot best, and there a well chosen response is at its peak. Scale selection computes the response for each blur and keeps the blur where it peaks. The response must be corrected for the blur first, because blur alone makes every response smaller. With the right correction, a spot twice as large peaks at a blur twice as wide, so the chosen size grows with the spot.
When it applies
The setting is the scale space of an image, where is the Gaussian of variance . A -normalized derivative of order is
Scale selection applies when the feature is measured by a differential expression that is homogeneous: each term is a product of derivatives with the same total order . Examples are the Laplacian (), the determinant of the Hessian (), the gradient magnitude () and the Harris measure (). The normalized measure is .
Why it works. Let be a copy of made smaller by the factor . Its scale space is , and each derivative of order gets the factor . So
The factor does not depend on . So a local extremum over scale at for is a local extremum at for , for every . With the values at the two extrema are also equal, which lets a detector compare the strength of features of different sizes with one threshold.
It does not apply to structures with no size of their own. An ideal step edge or the corner of an infinite wedge looks the same at every magnification, so with its normalized response is constant over scale and there is no extremum.
The template
SELECT-SCALES(f, x, D, M, γ, t_1 < t_2 < ... < t_K)- 1
for k ← 1 to K do - 2
L_k ← g_{t_k} * f ▷ the scale-space level t_k - 3
R_k ← t_k^{M γ / 2} · D(L_k)(x) ▷ the normalized measure at x - 4
S ← empty list - 5
for k ← 2 to K - 1 do - 6
if |R_k| > |R_{k-1}| and |R_k| > |R_{k+1}| then - 7
append t_k to S ▷ a characteristic scale of x - 8
return S
A detector runs the same test over position and scale at once: it keeps the points where is larger than at all 26 neighbours in the stack of levels, or it finds points in space at each level first and then tests them over scale, as Harris-Laplace does. The levels are usually spaced by a constant factor in , such as , and a parabola through the three values around the extremum refines the scale.
Classic examples
- A Gaussian blob and the Laplacian. For the scale space at the center is and . With ,
whose derivative in is zero at . The selected scale is the variance of the blob, and the value there is for every .
- A Gaussian blob and the determinant of the Hessian. At the center and , so . Its maximum is again at , with the value .
- An elongated blob. For a blob with the variances and along its two axes, at the center is , which is largest at . The normalized Laplacian picks a different scale. For and the determinant picks and the Laplacian ; for and they pick and .
- A difference of Gaussians. The DoG between the scales and is close to , a normalized Laplacian times a constant. For the Gaussian blob, the DoG at the center is , which is largest at , where the geometric mean of the two variances is . For and the peak is at .
- A sine wave. For the derivative of order has the amplitude in scale space. The normalized amplitude is largest at . The selected is proportional to the wavelength ; for and it is for and for .
- A blurred edge. A step edge smoothed with variance has the gradient at the edge in scale space. With the normalized gradient grows with and has no maximum. With it is , which is largest at : the selected scale is the width of the edge. This is why is the usual choice for edges and for blobs.
Variations
- The choice of measure. The Laplacian and the DoG respond to blobs and also along edges; the determinant of the Hessian responds less along edges. Mikolajczyk and Schmid compared several measures for the selection of the characteristic scale and kept the Laplacian for Harris-Laplace.
- Extrema in position and scale together. SIFT and SURF look for extrema of one measure in the three dimensions . Harris-Laplace uses one measure in space (the Harris measure) and another over scale (the Laplacian).
- Affine shape. Harris-affine selects a scale and then adapts an elliptic window, because a single scale cannot fit an elongated structure.
- Pyramids. Instead of smoothing the full image at every level, a Gaussian pyramid halves the image size at each octave, and the scale of a level is computed from its octave and its index.
- Other values of . trades how the selected scale depends on the shape of the structure; values below are used for edges and ridges.
Pitfalls
- The selected scale is proportional to the size, not equal to it. The constant depends on the measure and on the dimension. In 1D, of a Gaussian of variance is at the center, which is largest at , not at . On the pixel grid, with the discrete Gaussian kernel, a second difference and , the peak is also at .
- Scale sampling. With levels spaced by a factor in , the true extremum can fall between two levels, and a structure near the first or the last level has no extremum because it has no neighbour on one side. Use a parabola over scale and extend the range by one level on each side.
- Small scales on the pixel grid. For below about the sampled Gaussian smooths less than it should, and derivatives by finite differences are biased. Features at the finest levels are less reliable. A sharp corner or a step edge has no scale of its own, so on the grid its extremum is often at the finest level the detector allows.
- Many scales at one place. Nested structures, such as a dark spot inside a bright disk, give several extrema over scale at one point. Keep all local extrema, not only the largest one.
- Neighbouring structures. At coarse scales two nearby blobs merge into one, and the selected scale of each is then pulled by the other.
- Border effects. At large scales the smoothing kernel reaches past the image border, and the measure near the border depends on the border rule.
Exercises
- In dimensions, a Gaussian blob of variance has at the center. Show that is largest at , and check the cases and against the examples on this page.
- Repeat the elongated blob example for the normalized Laplacian and show that the maximum solves a polynomial equation in . Check the value for and .
- Show that the normalized gradient with of an ideal step edge is at every scale.
- For the sine wave, find such that the selected for is equal to .
- Show that the DoG between and of the Gaussian blob is largest at .
References
- Tony Lindeberg, Feature detection with automatic scale selection, International Journal of Computer Vision 30(2), 79-116, 1998, the sections on gamma-normalized derivatives, the scale invariance of their extrema, and blob detection with the Laplacian and the determinant of the Hessian
- Tony Lindeberg, Scale-Space Theory in Computer Vision, Kluwer Academic Publishers, 1994, the chapter on scale selection and blob detection over scale
- Krystian Mikolajczyk and Cordelia Schmid, Scale and affine invariant interest point detectors, International Journal of Computer Vision 60(1), 63-86, 2004, Section 2 (the characteristic scale and the comparison of the measures used to select it)
- David G. Lowe, Distinctive image features from scale-invariant keypoints, International Journal of Computer Vision 60(2), 91-110, 2004, Section 3 (the DoG as an approximation of the scale-normalized Laplacian)
- 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 part on scale invariant detectors
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag D3NE89 Edit this page History Report an error Markdown