Cambridge Research Systems Logo Cambridge Research Systems - Tools for vision science CRS Products
CRS Research
CRS Support
CRS Research topics menu Computerised Visual Stimuli
Topics in Computerised Visual Stimulus Generation

Topics in Computerised Visual Stimulus Generation by Tom Robson is published as a chapter of Vision Research, A Practical Guide to Laboratory Methods, edited by Roger Carpenter and John Robson, OUP 1998.


2. How do computers represent images
2.3 What is a sampled data system?

As explained above, computerised visual stimulus generators choose to store continuous images as a series of closely spaced pixels or samples each of which is derived by measuring the value of a real (or imaginary) continuous time (and space) image on a regular spatial and temporal matrix. This is called a sampled data system. In order to understand how a computer generates a stimulus consisting of a single spatial harmonic on a CRT based display, let us start by considering the illustration shown in Figure 2. The sine wave depicts the luminance profile that we wish to reproduce from left to right on our monitor while the spaces between the thin vertical lines are supposed to indicate the phosphor dots on the screen that will emit the light. For the purposes of simplicity the screen is covered in uniform areas of phosphor without any gaps in between. The computer has been programmed to control the voltage to the display such that the luminance rises instantaneously to the commanded value and stays constant until instructed to change for the next pixel. The luminance of each whole pixel is chosen to be the luminance of the desired waveform at the start of the pixel. From the picture it can be seen that the resulting luminance on the display has a distinctly stepped appearance but with a little imagination it can at least be seen to have the correct spatial frequency albeit with a slightly different phase to the desired one. The next stage in the process is to take the stepped profile and pass it through a low-pass filter to remove all the higher harmonic components and which, if suitably adjusted will reconstruct the desired waveform exactly although still with a slight phase shift. But how do we implement this low-pass filter? Conveniently, the optical system of the eye will perform this function for us and even though we have no control of the pass band, by placing our samples at an appropriate frequency we can achieve the required frequency response.


Figure 2 Single frequency reproduction



Figure 3 Single frequency reproduction showing aliasing

Figure 3 shows what happens if we try and use this system to reproduce a luminance profile of a higher spatial frequency than that in Figure 2. The pixels still have the same spacing on the screen but as can be seen, their luminance values have been chosen from different cycles on the waveform which results in the stepped profile shown. This is very similar to and in fact has the same frequency as the example given in Figure 2 so that when the low pass filter is applied the two waveforms are indistinguishable. By not using enough samples to reproduce our desired waveform we have, as far as the observer is concerned, transformed one frequency into an unintended lower one. This phenomenon is called aliasing. Another way of looking at aliasing is as a beat frequency; if two frequencies f1 and f2 are mixed together the result will have components at the sum frequency (f1+f2) and the difference frequency (|f1-f2|). Looking again at Figure 3 and considering the periods rather than the frequencies we can see that the desired waveform has about 10 cycles across the diagram while there are about 13 pixels in the same space leading to an actual waveform that has 13-10=3 cycles in the same space.
To put this yet another way consider trying to reproduce a waveform of spatial frequency f cpd with a sampling or pixel frequency of s cpd. When low-pass filtered there will be four frequencies present in the output, one at f, one at s, one at s-f and one at s+f. If the beat frequency at (s-f) is not to interfere or alias with the desired output at f then (s-f) must be greater than f or in words the sampling frequency must be greater than twice the maximum frequency that is to be reproduced.

The important conclusions to be drawn from this discussion are these:

    1. To prevent aliasing, the sampling frequency (fs) which in this case is the pixel frequency, must be at least twice as high as the highest frequency (fmax) that is to be reproduced. The corresponding temporal condition is that the frame rate of the display must be at least twice as high as the maximum temporal frequency that is to be reproduced. This is called the Nyquist criterion. The frequency fs/2 is called the Nyquist frequency (fN).
    fs > 2. fmax

    2. To prevent observable beat frequencies, the pixel frequency minus the highest spatial frequency (fs-fmax) must lie outside the pass-band of the observer.



Figure 4 The important frequencies in a sampling system

arrowPrevious
  Nextarrow


^ Back to top



   
contact us