We often refer to the intensity function, f(x), as signal in the spatial domain, i.e. for each position in space (along the x axis) f has a value. These signals have a dual form -- in the so called frequency domain. Instead of representing the intensity at each position, we represent the amplitude of rate of change of the signal or the frequency. Thus for a given frequency value (number of cycles per pixel, or more appropriately cycles per inter-pixel distance) we ask how "much" of the given signal has that frequency. For example, F(0), where F is the frequency domain representation of f, is the amplitude of DC (meaning direct current, to borrow a term from signal theory) component of the signal -- i.e. the signal's average value.
Here are the functions to transform a function from the spatial to the frequency domain (also knows as Fourier transform).
There exists a duality between the two domains, i.e. for each operation in one domain there exists an equivalent operation in the other domain. The pair we are most interested in is the multiplication-convolution pair. Let us denote multiplication by · and convolution by ¤. Also, denote a spatial domain function by a lower case letter and its Fourier transform by upper-casing the letter. Also denote the transform by <->. Thus:
Theory tells us that if a signal has a maximum frequency of µ we must sample it at a frequency of 2µ or it would be impossible to reconstruct the original signal. 2µ is also called the Nyquist frequency. We will see some evidence of this shortly.
If we sample at a frequency less than the Nyquist rate, the samples can be used to reconstruct another signal of lower frequency. This phenomenon of a high frequency signal behaving as a low frequency signal (see figure below) is called aliasing.
To see how we may recover f from f · comb let us concentrate on the frequency domain:
The multiplication with the PULSE (This process is also called filtering.) gives F(u) and by inverse Fourier transformation we get back the original signal. Another way of getting back f is to convolve fc with the sinc function, since
x)/(
x) <-> PULSE(u)
The image we finally see is a filtered version. CRT reconstructs a continuous image by a crude interpolation (by the "set voltage and hold" electronics) followed by a Gaussian blur (of the flourescent spot). This roughly corresponds to filtering by a box filter followed by a Gaussian filter.
To band limit a signal we can do something quite similar to filtering. In effect, we compute the Fourier transform of a given signal f, filter out the frequencies greater than 1 cycle per/pixel and reconstruct a new signal f'. If we now sample f' once a pixel, it can later be exactly reconstructed with no aliasing. In reality, we do not need to explicitly reconstruct f', since later it would only be sampled once a pixel. We just compute the value of f' at each pixel position.
How do we compute f'(x) for a given pixel number x? Remember, in order to filter out the replicas we multiplied the frequency domain signal with a PULSE. Similarly, in order to truncate the higher frequencies we can multiply the frequency domain signal with a PULSE. With a narrower PULSE, larger range of frequencies is discarded. With a wider PULSE, more of the higher frequency content is retained. One way to compute f' is to find F, the Fourier transform of f and then discard the frequencies outside the PULSE and then compute the inverse Fourier transform of the resulting signal. Or we could just find the value of f ¤ sinc at x. (We call this operation sinc-filtering the signal.) Unfortunately, both these methods require continuous integration of functions that may extend up to infinity. Hence we
| Let us look at some other filters and see how close their frequency domain representation are to PULSE. A commonly used filter is the box-filter or pulse in the spatial domain. We know what its Fourier transform looks like -- it's SINC. We could use a truncated sync, however it's Fourier transform exhibits ringing (the Gibbs' phenomenon) shown on the right. A Gaussian filter works well, but it attenuates many lower (read: important) frequencies as well. A triangle filter (or Bartlett filter) transforms to SINC2, a SINC like function, but with smaller magnitude at high frequencies. | |
For two dimensional signals (images), we extend the filter to two dimensions. We store the values at a number of (x,y) positions. Typically we sample the filter function uniformly on a grid more dense the pixel grid. This is also called sub-sampling. At drawing time, we evaluate the image intensity at each sub-sample position and take a weighted average of these samples (weighted by the corresponding entry in the filter table). Some examples of 2D-filter kernels are given below:
| Box Filter | Bartlett Filter | Gaussian Filter | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|