The first image manipulation we consider is shifting an image by a non-integer number of pixels. We have to choose an interpolation scheme for filling in pixels in the target image when they do not line up exactly with source-image pixels. The scheme described here is based on sampling theory, and in an ideal implementation would completely eliminate aliasing due to shifting.
The aliasing we have looked at up to now has all been due to sampling. How does sampling affect the shifting of images? If we had access to the original continuous function from which an image was generated, we could shift that function by an arbitrary amount, and resample it. This would be an ideal shift operation. However, we often have access only to an already discretized image. In that case, we could reconstruct the continuous function as well as possible, shift it, and resample it.
This illustrates the basic idea of antialiased shifting, but doesn't indicate how it may be done efficiently on a digital computer. First, note that a bandlimited signal, after shifting, is still bandlimited. Therefore the prefiltering stage in resampling is unnecessary. This is because shifting is a linear, time-invariant operation. If the sampling and reconstruction filters are given by H, and the shift operator is given by S, the continuous part of the pipeline in Figure 8 may be expressed as:
If H is an ideal low-pass filter, then it is everywhere zero or one, so that H2 = H.
Although, as discussed in Section 5.1 below, practical implementations use non-ideal low-pass filters, they still leave out the second low-pass filtering stage.
By applying discrete convolution techniques (Section 2.6) to the problem, we obtain the following expression in terms of pixels and continuous filter kernels: