Geometry and matching

Resizing with nearest-neighbour and bilinear interpolation, affine transforms and image warping, and template matching and corner detection.

About 5 hours of study

Learning objectives

Lessons

  1. 1

    Resizing and interpolation Intermediate

    Change an image's size by working out, for every new pixel, where it falls in the old image. Compare nearest-neighbour and bilinear interpolation, line up pixel centres correctly, and avoid aliasing when shrinking.

  2. 2

    Affine transforms: shift, scale, rotate and warp Intermediate

    Move, scale, rotate and shear images with one 2 × 3 matrix. Compose transforms by multiplying matrices, rotate about a centre, invert a transform, and warp images by backward mapping so no output pixel is left empty.

  3. 3

    Template matching and corner features Intermediate

    Find a small pattern inside an image by sliding it and scoring each position with SSD or normalised cross-correlation, then find corners, the distinctive points that feature matching is built on, with the Harris detector.

Module practice

Module quiz

1. Which interpolation copies the closest source pixel?
2. How many numbers describe a 2-D affine transform?
3. With pixel-centre alignment, which source column does output column 0 use when enlarging 4 pixels to 8?
4. Why is SSD a poor score when the scene is brighter than the template?
5. Rotate by R and then translate by T. Which product is the combined matrix?
6. At a corner, what is true of the structure tensor?

‹ Finding shapesLearning to see ›