Doug Kerr
Well-known member
This morning will will first review the concept of the representation of a continuous phenomenon by sampling, and the reconstruction of the original phenomenon from those samples.
Our illustrations will show the sampling of a waveform, rather than an image. The reason is that the waveform is one-dimensional, and the principles can be seen most clearly here. The principles apply equally well to the sampling of an image, which is two-dimensional, but they are less clearly seen there.
Here is the battle zone:
In panel a we see, in black, our waveform. It is a sine wave, and as such comprises only one frequency. We can, if we wish, think of it as one component of a more generalized waveform.
We will sample it at a pitch p (which, if this were an actual electrical waveform, would be in seconds). We know that the Nyquist frequency for this situation would be 1/(2p). The vertical black lines represent the sampling instants.
We of course can only capture, by sampling, components of the phenomenon whose frequencies are less than the Nyquist frequency. I have shown here a waveform for which this is true (its frequency is actually 80% of the Nyquist frequency).
Sampling here is "instantaneous"—that is, the process captures the value of the waveform at the sampling instant. The purple arrows represent the "sampling agent" at this work.
In panel b we see the results of the sampling, a set of numbers which we represent as little red bars. (Where the value is zero, I show a little red dot.)
Note that so far nothing here is digital (there will in fact be nothing digital in the entire presentation).
Note also that we dare not assume that these numbers are captured with limited precision (that is, are rounded). They are precise representations of the value of the waveform at the respective sampling instant.
Sampling theory tells us that this suite of numbers completely and exactly describes the subject waveform.
If that is so (and it is!), then from that suite of numbers we should be able to reconstruct, completely and exactly, the original waveform. Let's do that in a fanciful way.
In panel c, we have plotted (as little green dots) the values of the samples.
In panel d, we draw a smooth curve (shown in blue) through all the green dots, but subject to an important restriction: the curve must contain no frequencies at or above the Nyquist frequency. (That will certainly be so for the reconstructed waveform if it indeed identical to the original waveform, since we stipulated it was so for the original waveform.)
It turns out that there is only one curve that can be drawn through the green dots and follow that restriction: a curve identical to the original waveform!
And thus the blue curve represents a complete and exact duplicate of the original waveform, reconstructed from only the suite of numbers seen (graphically) in panel b.
This is truly wondrous, and if of course the key to all digital representation of audio waveforms, video waveforms, and photographic images.
Time for breakfast. Next: Finite window sampling.
Best regards,
Doug
Our illustrations will show the sampling of a waveform, rather than an image. The reason is that the waveform is one-dimensional, and the principles can be seen most clearly here. The principles apply equally well to the sampling of an image, which is two-dimensional, but they are less clearly seen there.
Here is the battle zone:
In panel a we see, in black, our waveform. It is a sine wave, and as such comprises only one frequency. We can, if we wish, think of it as one component of a more generalized waveform.
We will sample it at a pitch p (which, if this were an actual electrical waveform, would be in seconds). We know that the Nyquist frequency for this situation would be 1/(2p). The vertical black lines represent the sampling instants.
We of course can only capture, by sampling, components of the phenomenon whose frequencies are less than the Nyquist frequency. I have shown here a waveform for which this is true (its frequency is actually 80% of the Nyquist frequency).
Sampling here is "instantaneous"—that is, the process captures the value of the waveform at the sampling instant. The purple arrows represent the "sampling agent" at this work.
In panel b we see the results of the sampling, a set of numbers which we represent as little red bars. (Where the value is zero, I show a little red dot.)
Note that so far nothing here is digital (there will in fact be nothing digital in the entire presentation).
Note also that we dare not assume that these numbers are captured with limited precision (that is, are rounded). They are precise representations of the value of the waveform at the respective sampling instant.
Sampling theory tells us that this suite of numbers completely and exactly describes the subject waveform.
If that is so (and it is!), then from that suite of numbers we should be able to reconstruct, completely and exactly, the original waveform. Let's do that in a fanciful way.
In panel c, we have plotted (as little green dots) the values of the samples.
In panel d, we draw a smooth curve (shown in blue) through all the green dots, but subject to an important restriction: the curve must contain no frequencies at or above the Nyquist frequency. (That will certainly be so for the reconstructed waveform if it indeed identical to the original waveform, since we stipulated it was so for the original waveform.)
It turns out that there is only one curve that can be drawn through the green dots and follow that restriction: a curve identical to the original waveform!
And thus the blue curve represents a complete and exact duplicate of the original waveform, reconstructed from only the suite of numbers seen (graphically) in panel b.
This is truly wondrous, and if of course the key to all digital representation of audio waveforms, video waveforms, and photographic images.
Time for breakfast. Next: Finite window sampling.
Best regards,
Doug