The size of a given image can be easily enlarged by an integer scale factor (2, 3, etc.) by repeating each of the pixels in the image. For example, a 2 by 2 image can be doubled by
| (1) |
This replication can be implemented equivalently by this two-step procedure:
| (2) |
| (3) |
| (4) |
An obvious problem of enlargement by replication is that the resulting image looks blocky, which can be avoided by using linear interpolation:
| (5) |
This operation is called bilinear interpolation (two-dimensional linear interpolation) which can be implemented equivalently by this two-step procedure:
| (6) |
| (7) |
| (8) |