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 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.
Here:
-
: image at level
-
: level , upsampled back to level ‘s resolution
-
: difference stored at level
-
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