Lecture 2
Lecture 2
Applications
Introduction to Multimedia 1
Digital Technology
Everyday, we encounter many values that
change continuously, for example, the voltage of
the electricity that lights up our room varies
continuously over time. These are also known as
analogue signals.
Introduction to Multimedia 2
Digital Technology
Because of this, when using
a computer to process
continuous signals, we first
need to find a way to
represent them so that the
computer is able to handle
them. Usually, this is a
digital representation, i.e.,
we use a series of numbers
to denote the continuous
signals.
Introduction to Multimedia 3
Digital Technology
Then, we have to convert the continuous signal into the
digital representation. This process is known as
digitization.
The first step in the digitization process is sampling
which takes samples of the continuous signal. The
number of samples taken during a time period is known
as sampling rate.
The second step is known as quantization where we
restrict the value of the samples to a fixed set of levels.
Introduction to Multimedia 4
Digital Technology
Introduction to Multimedia 5
Sound (Wave) Representation
Introduction to Multimedia 6
Frequency
Frequency is expressed in cycles per second - 1 cycle = 1 hertz (Hz)
the higher the frequency, the higher the pitch of the sound.
For example, a violin = 2000 Hz, and a brass band = 100 Hz. A high
quality system will produce sounds in the range 20Hz to 22,050Hz
(Human range).
Introduction to Multimedia 7
A Low Frequency Sound Signal
Introduction to Multimedia 8
A High Frequency Sound Signal
Introduction to Multimedia 9
Amplitude
The amplitude of an analogue audio signal is measured in
decibels (dB).
Introduction to Multimedia 10
Amplitude
Introduction to Multimedia 11
Amplitude
Introduction to Multimedia 12
Human Sound
Introduction to Multimedia 13
Digitizing Sound
(Analogue to Digital Conversion)
Introduction to Multimedia 14
Sampling
Readings of the analogue voltage are taken at uniformly
spaced time intervals - this is called the sampling rate:
the number of samples taken per second.
Introduction to Multimedia 15
Sampling the Low Frequency
Signal
Introduction to Multimedia 16
Sampling the High Frequency
Signal
Introduction to Multimedia 18
Quantization
Introduction to Multimedia 19
Aliasing and Quantization Error
If we under sample, i.e., taking less samples than as
required by Nyquist sampling theorem, some of the
frequency components will be mistakenly converted into
other frequencies. This is known as aliasing.
On the other hand, if we use too few levels to represent
each sample value, there will be large amount of error
for each sample.
This is known as quantization error. These errors can be
thought of as noise on the signal.
Introduction to Multimedia 20
Quantization Interval
Introduction to Multimedia 21
Quantization Interval
It is better to use a larger number of bits for each
quantization interval.
For instance, when 16 bits are used, the number of
bands/quantization intervals is 216 = 65,536. Thus less
coarse (and therefore more accurate) than 8-bit
samples.
16-bit sampling is in fact the norm for sound digitization.
Introduction to Multimedia 23
Sampling and Sampling Rate
For example, telephone samples at 8kHz,
which effectively means that any frequency
higher than 4kHz is wiped out; which is precisely
why on the phone we sometimes cannot tell the
difference between certain letters (like "f" and
"s"), and why we need to spell our names (s-as-
in-Solid, and f-as-in-fast), and the listener still
manages to make mistakes when writing it
down.
Introduction to Multimedia 24
Sample Size
Another issue we have to care about when sampling
sound is how big to make each sample. Basically, how
many distinct values can a wave can take:
* We want to record 0 dB – 60 dB (Normal
Conversation)
60/8 = 7.5 8 bits needed
* To record from 60 dB – 140 dB (Machines and
Music)
140/8 =17.5 16 or 24 bits
Most sound is encoded at 8-bit or 16-bit. Some (very
rare) high end sound cards have 32-bit samples. Audio
CD samples are 16-bit.
Introduction to Multimedia 25
Sample Size
For example, a 22kHz stereo sound, with 16-
bit sampling will need to be sampled at 44.1kHz
or 44,100 times per second. Each sample will be
16-bits, and we'll have 2 channels (one left, and
one right---for stereo). Thus, we'll have
44,100 sample/sec * 2 bytes/sample * 2
channels = 1,411,200 bits/s
= 176,400 bytes/s
=173 kbyte/sec.
Introduction to Multimedia 26
Image Sampling & Quantization
Introduction to Multimedia 27
Basic Concepts
Introduction to Multimedia 28
RGB Channels
Introduction to Multimedia 29
Continuous Image
Introduction to Multimedia 30
Image Sampling and Quantization
Introduction to Multimedia 31
This is a plot of amplitute (gray level) values of the
continuous image along the line segment A B
To sample this function, we take equally spaced samples
along line AB.
Location of each sample is given by a vertical tick mark
in the bottom part of the figure.
Introduction to Multimedia 32
However, the values of the samples still span
(vertically) a continuous range of gray‑level
values.
In order to form a digital function, the gray‑level
values also must be converted (quantized) into
discrete quantities.
Introduction to Multimedia 33
Quantization
Introduction to Multimedia 34
The assignment is made depending on the
vertical proximity of a sample to a vertical tick
mark.
Introduction to Multimedia 35
Representing Digital Images
Introduction to Multimedia 36
Coordinate convention used to represent digital images
Introduction to Multimedia 37
A digital image of size M x N
Introduction to Multimedia 38
Representing Digital Images
Introduction to Multimedia 41
Introduction to Multimedia 42
High Data Volume of
Multimedia Information
Introduction to Multimedia 43