Image Resampling

Work in progress. This note is still being written and incomplete.

2 min read Last updated Sun Jul 26 2026 05:09:41 GMT+0000 (Coordinated Universal Time)

Changing image size parameters requires resampling to create new pixel values: adding pixels when upsampling, replacing pixels when downsampling.

Resampled pixels must:

  • Preserve image features, including fine detail
  • Reduce noise
  • Not introduce artefacts

Scaling by a factor of 2

  • Enlarge by replicating each row and column
  • Reduce by removing every other row and column
  • Repeat progressively for larger scaling factors

Nearest neighbour method

Replaces each new pixel with the value of the closest pixel among its N4(p)N_4(p) neighbours, using any distance metric.

  • Preserves most fine detail
  • Still prone to checkerboard and aliasing effects

Interpolation

An alternative to direct scaling: reconstruct, or estimate, the continuous intensity function from discrete samples, then resample it at the required resolution.

  • Linear interpolation
    Assumes the variation between samples is a straight line.
  • Cubic interpolation
    Uses a higher-order polynomial, giving a smoother variation.

In 2-D, these become bilinear and bicubic interpolation.

Aliasing

Aliasing is more prominent in high-frequency components, where fine detail lives.

  • Nyquist theory requires sampling at least twice the highest signal frequency to capture all detail
  • Some blurring reduces aliasing, at the cost of high-frequency detail. Less noticeable in sub-sampling.

Multi-scale pyramids

A series of progressively lower-resolution images, storing different degrees of detail.

Ln=GnGn+1^L_n = G_n - \widehat{G_{n+1}}

Here:

  • GnG_n: image at level nn

  • Gn+1^\widehat{G_{n+1}}: level n+1n+1, upsampled back to level nn‘s resolution

  • LnL_n: difference stored at level nn

  • Common in image indexing and search

  • Lower levels need less storage, since only the difference from the upsampled original needs to be kept

  • Used as the basis for progressively encoded image compression

Was this helpful?