You are on page 1of 7

Home Search Collections Journals About Contact us My IOPscience

Fourier theory explanation for the sampling theorem demonstrated by a laboratory experiment

This content has been downloaded from IOPscience. Please scroll down to see the full text.

1996 Phys. Educ. 31 368

(http://iopscience.iop.org/0031-9120/31/6/017)

View the table of contents for this issue, or go to the journal homepage for more

Download details:

IP Address: 128.59.222.12
This content was downloaded on 01/02/2015 at 16:40

Please note that terms and conditions apply.


N E W A P P ROAC H E S

The project is attracting international interest with, References


for example, a major Australian input to the Albert, winner of the German Academic Software
developing module on Optics. The existing modules Award, is distributed in the UK by Steve Barret, PT
on 'Waves and Vibrations' and 'Measurement and Distribution, 30 Perseverance Lane, Great Horton,
Uncertainty' are being used in the UK and overseas. Bradford, West Yorkshire BD7 3LE (email:
The UK Higher Education Funding Councils have spike@kplusi.demon.co.uk)
recently awarded additional funding to assist in the Bacon R A 1993 The Computers in Teaching
dissemination of SToMP, and to nurture the project Initiative: a view from the Physics Centre Phys. Educ.
toward a self-supporting existence. 28 97
CUPLE is available from the Academic Software
Acknowledgements Library, Box 8202, North Carolina State University
The SToMP team consists of academics and research (http://www.ciue.rpi.edu/cuple/cuple.htm)
associates from the Universities of Cambridge, CUPS courseware is available as a series of nine
Cardiff, Keele, Manchester, Portsmouth, Queen’s book/program packages published by John Wiley.
(Belfast), St Andrews, Salford, Southampton and Information is available from the CTI Physics WWW
Surrey, also the Open University and Queensland server (http://www.ph.surrey/cti/cups/main.html)
University of Technology (Brisbane). The project was Fuller R G 1993 Millikan Lecture 1992:
funded by the Higher Education Funding Councils of Hypermedia and the knowing of physics: Standing
England, Scotland and Wales and the Department of on the shoulders of giants Am. J. Phys. 61 300
Education for Northern Ireland through the Teaching
Hall W 1994 IEEE Multimedia 1 60
and Learning Technology Programme (TLTP). The
SToMP material can be obtained by contacting Interactive Physics is available from Pasco Scientific,
Dr R A Bacon, Department of Physics, University of Admail 394, Cambridge CB1 1YY (email:
Surrey, Guildford GU2 5XH (email: sales@pasco.com)
SToMP@surrey.ac.uk). Watkins J, Davies J, Calverley G and Cartwright T
1995 Evaluation of a physics multimedia resource
Received 30 April 1996, in final form 4 June 1996 Comput. Educ. 24 (2) 83

Fourier theory explanation for the


sampling theorem demonstrated by
a laboratory experiment
A Sharma, B Tong and N R Axford University of Westminster,
Harrow, UK

A simple experiment is described that uses a CCD lens equation and magnification, as well as more
video camera, a display monitor and a laser- advanced topics from Fourier theory such as
printed bar pattern. The imaging process is used convolution and the sampling theorem. The
as an example to illustrate the concepts involved experiment is suitable for use in undergraduate
in the correct sampling of an analogue signal. The courses in imaging, signal processing, engineering
analysis uses basic results from optics such as the and physics.

368
N E W A P P ROAC H E S

Figure 1. The figure represents a sinusoidal image being sampled by a CCD sensor. (a) Sampling is adequate
to record correctly the incident pattern. (b) Aliasing occurs when a rapidly changing waveform is
inadequately sampled. The result of inadequate sampling is a false low frequency or moiré fringe pattern.

Incorrect sampling of continuous analogue signals continuous signal. Generally this means that the
can produce anomalous and misleading results. In sampled data should retain all the information
imaging this is readily visible, for example in contained in the continuous signal. Figure 1
television pictures of news readers wearing clothes illustrates aliasing and shows how it can occur
containing fine detail. The imaging system is unable during the digitization of a one-dimensional space-
to correctly sample and reproduce the high spatial varying signal. The figure suggests that if regular
frequency information contained in a detailed tie samples of the signal are taken, it is possible to
pattern, and the image displayed to the viewer digitize accurately the slowly varying signal.
contains brightly coloured interference fringes However, the same sampling rate is inadequate for a
known as aliasing or moiré fringes. The relevance of signal which is changing very rapidly and contains
physics and optics is enhanced by the exploration of high spatial frequency information. The sampled
a phenomenon that is evident in the world around data in the second case suggest the presence of a
us. This investigation can arouse and develop critical false low spatial frequency instead of the correct
thinking and encourage students to seek scientific high spatial frequency. This situation of under-
explanations for occurrences in their everyday life sampling where fine detail (high spatial frequency
[1]. Since this experiment was conducted in our information) is corrupted, and appears as a false low
laboratories many of our students have reported spatial frequency or moiré fringe, is known as
that watching television has never been the same, as aliasing. Thus, samples must be made often enough
they notice and are distracted by aliasing in the to allow the original image to be correctly
images, even the pattern caused by the goal net in reconstructed, and the choice of sampling interval
televised football matches! depends on the frequencies present in the image.
The sampling theorem states that the highest spatial
The physical world consists of continuously changing
frequency that can be resolved is equal to the
conditions or analogue functions, for example
reciprocal of twice the sampling interval [2]. Stated
temperature and time. Scientific studies nowadays
mathematically, v 5 1/2dx, where v is the highest
depend almost exclusively on digital computer
spatial frequency that can be resolved and dx is the
systems and digital electronics. It is required
sampling interval.
therefore to digitize continuous functions into
discrete sampled values using analogue-to-digital (A- Imaging is an example of an A-to-D conversion,
to-D) converters or suitable sampling circuits. As where the scene consists of continuous intensity
digital processing systems deal solely with the variations and a CCD sensor forms an image by
sampled values, care must be taken in obtaining sampling the incident intensity at regular horizontal
these values so that no information in the original and vertical positions. For alias-free imaging, using
function is lost. Correct sampling aims to obtain a any CCD-based camera (video or still) the sampling
'good' digital representation of the underlying theorem must be obeyed. For the imaging situation,

369
N E W A P P ROAC H E S

Figure 2. The figure shows the situation for (a) correct sampling, (b) sampling at the Nyquist frequency and
(c) sampling at 'zero' frequency. The figures on the left-hand side are all in real space, while those on the
right-hand side represent Fourier space.

370
N E W A P P ROAC H E S

v refers to the maximum spatial frequency in the wave. The height of the spike is related to the
image falling on the sensor, and dx relates to the amplitude of the sine wave. The Fourier transform of
CCD pixel separation. This experiment uses a bar a sine wave can also contain a constant in space
pattern to produce images of known spatial (DC offset) component, shown by the central spike
frequency and illustrates how aliasing can occur at zero frequency. This constant in space component
when the sampling theorem is violated. The does not alter the shape of the sine wave, and only
sampling theorem is also used to calculate the CCD serves to move the sine wave up or down on the
pixel attributes. In general, aliasing in CCD sensors y-axis. The real-space Dirac comb III(x) has spacing
is related to both the size of the CCD pixels and their dx, and its Fourier transform is a reciprocal Dirac
separation [3]. For the purposes of this experiment comb III(v) in which the comb spacing is 1/dx.
the size of the individual CCD pixels is ignored and Convolution between the impulse response pair and
only the centre-to-centre pixel separation is the Dirac comb, II(v) 3 III(v), gives a replicated
considered. impulse response. If adjacent response pairs do not
overlap, the CCD samples the image correctly and
inverse Fourier transformation produces a real-space
Sampling: a Fourier theory explanation sinusoidal wave without aliasing. In figure 2(a) the
The Fourier transform is a means of representing sinusoidal wave is of low enough frequency to be
real-space functions in terms of their sinusoidal correctly described by the given CCD sampling rate.
components. As it deals with spatial frequencies, it It should be noted that the convolved spectrum
provides an appropriate and elegant means to repeats itself with a period relating to the sampling
explain the sampling theorem and the aliasing interval, 1/dx. Because of this periodicity it is
phenomenon in CCD-based sensors. sufficient during inverse Fourier transformation, to
compute values within the 'fundamental' interval,
The imaging situation can be thought of as an
21/2dx # v # 11/2dx. Nothing new is added to
incident image being sampled by some CCD pixels
the real-space function by computing values outside
with a fixed separation. Multiplication of a function
this fundamental interval.
by a comb function provides a mathematical
representation of the sampling process [4]. A comb Consider what happens as the incident sine wave
function is an array of equi-spaced spikes drawn as image increases in frequency, figure 2(b). At a
vertical arrows of unit height and represented by the particular incident frequency, a limiting situation is
shah symbol, III. Mutliplication of any function by a reached where a real space sample is being taken
comb function produces discrete values at the exactly at every peak and trough of the sine wave.
sampling points and zero in between. Imagine for Sampling any closer does not add any further
simplicity that the incident image is a 1D sinusoidal information, but sampling further apart will miss the
pattern, figure 2(a). A 1D CCD can be represented sinusoidal shape. This limiting situation can also be
by a Dirac comb, III(x), which consists of a row of described in Fourier space. The sine wave has
impulses dx apart, where dx is the CCD pixel increased in frequency from that shown in figure
spacing. In real space, sampling of the incident 2(a), so its impulse response pair II(v) has become
image is represented by a multiplication of the sine wider. The CCD sensor remains the same, so the
wave by the Dirac comb, which produces discrete Dirac comb III(x) and its Fourier transform III(v),
values dependent on the value of the sine wave at remain the same. At this limiting situation the
the sampled points. In Fourier space the equivalent response spikes in the convolved spectrum II(v) 3
process is represented by a convolution between the III(v), will just overlap. The Nyquist frequency is
Fourier transform of the sinusoidal wave and the easy to recognize experimentally because image
Fourier transform of the Dirac comb. The simple sine structures that initially get finer and finer change
wave image consists of only one frequency and in suddenly at the Nyquist frequency and start getting
Fourier space is represented by spikes (positive and bigger and bigger. In Fourier space this is explained
negative) at the appropriate frequency. The spikes in by examining the convolved spectrum II(v) 3 III(v),
the Fourier transform of the sine wave are shown as in figures 2(a) and 2(b). As the incident sine wave
an impulse response pair, II(v), where the spacing of increases in frequency the impulse response pairs
the pair is determined by the frequency of the sine widen and at vn they will just overlap. The

371
N E W A P P ROAC H E S

frequency of the image falling on the detector, vn, is occurs at twice the Nyquist frequency. In real space,
known as the Nyquist frequency and is the maximum a sample is being taken so infrequently that the
frequency that can be accurately recorded for the sinusoidal structure of the function is completely
given CCD pixel separation. If the incident image missed out and the resulting image is of constant
frequency continues to increase beyond vn an intensity or zero frequency. The incident real-space
impulse response from an adjacent pair will appear frequency at this second limiting situation is called
in the spectrum and a low spatial frequency (due to v0. The sine wave is represented in Fourier space by
the neighbouring impulse spike) appears in the an impulse response pair II(v) postitioned at v0.
image. Thus all frequencies higher than the Nyquist The convolved impulse response II(v) 3 III(v) has
frequency are 'folded' to lower frequencies and a spikes exactly 1/dx apart. The inverse Fourier
broad low frequency fringe is seen in the image transformation of this convolved spectrum is a
wherever fine detail should be. So, the incident sine uniformly flat, real-space image. At this point the
wave will be sampled correctly as long as (from CCD spacing can again be calculated. From figure
figure 2(b)) 2vn # 1/dx. This is a statement of the 2(c), the frequency falling on the CCD, v0, is now
sampling theorem described earlier. Rearranging exactly equal to the inverse CCD pixel spacing, thus
this equation gives an expression for the CCD centre- v0 5 1/dx.
to-centre pixel spacing, dx 5 1/2vn. In this example the real space or Fourier space diagrams
If the incident frequency is increased beyond the of figure 2 can be used to examine the sampling
Nyquist frequency, lower and lower frequencies are theorem. Either could be used only because the
produced until eventually a uniform image is chosen example image is very simple, containing
obtained, a so-called zero frequency response. Figure only one spatial frequency. In reality images will
2(c) illustrates this second limiting situation which contain more than one frequency and the real-space

Figure 3. The experimental set-up. As the camera is moved away from the bar target its images show various
stages of aliasing.

372
N E W A P P ROAC H E S

explanation in figure 2 will not be possible. It is Table 1.


therefore usual practice to use the Fourier space Pixel separation
diagrams of figure 2 to evaluate the sampling
Horizontal Vertical
theorem. (mm) (mm)
From Nyquist frequency position 14.93 11.01
Results
From zero frequency position 14.90 11.05
An experiment was conducted using a Nemco CC31 From manufacturer’s literature 14.67 11.00
monochrome CCD video camera. The camera was
mounted on an optical bench and the image
displayed on a 256 grey scale monitor, figure 3. A In electronic imaging the sampling rate is governed
bar chart of known frequency was made using a by the CCD sensor pixel separation. One way to
laser printer. (A bar chart is easier to produce than a avoid aliasing is to improve the CCD sampling rate
sine wave and is an acceptable approximation if by using a CCD detector with very small pixel
higher order harmonics are ignored.) To obtain separations. The other approach would be to make
different effective frequencies on the CCD sensor, sure that the image has no spatial frequencies above
the camera was moved along the optical bench. In the Nyquist frequency, vn. High spatial frequency
order to calculate the effective frequency of the bar information can be eliminated by an anti-aliasing
chart on the CCD sensor, the lens equation is used, filter that removes such information from the data
1/f 5 1/u 1 1/v, where f is the focal length of the before it is digitized. In imaging this may consist of
camera, and u and v are object and image distances simply smearing Vaseline on the lens or using a pair
respectively. Magnification, M, is given by M 5 v/u, of tights over the lens as a low pass filter. The
and as the focal length of the camera is known and controlled removal of high spatial frequencies is
the distance from test chart to lens can be better than the uncontrolled losses of aliasing.
measured, the image distance and the As aliasing depends on two variables — the sampling
magnification can be calculated. The effective rate (in this case the CCD pixel separation) and the
frequency of the bar pattern falling on the CCD frequencies in the image — a simple experiment has
detector is given by 1/magnification 3 original bar been used to show that if a calibrated test target is
chart frequency. used, then the image frequency is known and the
The camera was placed very near the target and other variable, the CCD centre-to-centre pixel
moved back slowly, with constant refocusing. When separation, can be calculated.
alias fringes first appeared this position was noted Received 28 December 1995, in final form 4 May 1996
and corresponds to the Nyquist frequency, figure
2(b). Then at about twice this distance a uniform
zero-frequency image was produced which References
corresponds to the situation described by figure 2(c). [1] Mazurova J and Slabeycius J 1995 Phys. Educ.
The camera was rotated by 90o and the process was 30 297
repeated to calculate the vertical CCD pixel [2] James J F 1995 Student’s Guide to Fourier
separation. Based on this data, the calculations Transforms (Cambridge: Cambridge University Press)
shown in table 1 were made. p33
[3] Greivenkamp J E and Lowman A E 1994 Appl.
Conclusions Opt. 33 5029
Aliasing is an annoying artifact that can potentially [4] Gonzales R C and Woods R E 1992 Digital
always occur when digitizing analogue signals. Image Processing (Reading, MA: Addison Wesley)
Aliasing depends on two factors — the sampling rate p111
and the frequencies in the function being sampled.

373

You might also like