Transcript file
ITEC2110, Digital Media
Chapter 1
Background & Fundamentals
1
GGC -- ITEC2110 -- Digital Media
Content
Analog vs. Digital
Digitization (Sampling & Quantization)
Bits basic concepts
How bits represent information
2
Types of Information
• Analog information
• Digital information
3
Analog Information
(continuous information)
Examples:
time
weight
temperature
Brightness of a light
Loudness of your voice
…
4
Accuracy of Analog information:
difficult to achieve
How long is the black bar?
5
Digital Information
(discrete information)
Examples:
The number of students in this class
The number of cars in the parking lot
The number of characters in your
name
…
6
Phenomena in the Real world:
discrete vs continuous
Things in the real world can be discrete
These things can be counted
Examples:
The number of cars GM produced each year
The number of beans in a jar
Phenomena in the Real world:
discrete vs continuous
Things in the real world can be continuous
Continuous can’t be counted, it must be
measured
Examples:
Air pressure
Height of an ocean wave
Frequency of a sound wave
characteristics of
Analog vs. Digital
Analog information
Continuous
Cannot be counted, must be measured
made up of infinite number of data points
Difficult to be accurate
Digital information
Discrete
Countable
Can be Accurate
9
computers can only deal with
digital information
Discrete data is easy for a computer
count it and store it as a number
Continuous data
How?
Question...
If computers only store 0s and 1s...
How does all this continuous stuff end up in a
computer so that we can save it and play it back?
Answer
Continuous data must be converted to discrete data
Sampling:
from continuous to discrete
Converting continuous information to digital data:
-You must SAMPLE to convert it to discrete
Sampling rate
the number of samples per time period is
called the sample rate
Sample and Hold:
from digital to continuous
Digital data back to continuous information:
Digitization
Digitization is the process of converting analog
information into digital data that computers can
handle
2-step process:
1.
2.
sampling
quantization
16
Wave height
Wave height
single sample
single sample
single sample
(sample and hold)
two samples
two samples
two samples
(sample and hold)
three samples
three samples
three samples
(sample and hold)
four samples
four samples
four samples
(sample and hold)
five samples
five samples
five samples
(sample and hold)
Taking it a lot farther…
Taking it a lot farther…
How frequently should I sample?
too few
small file size (good)
not a faithful representation when replayed
too many
large file size (bad)
excellent representation when replayed
The Nyquist rate
twice as many samples as the frequency being
captured
Results in an ok file size
Results in faithful representation when replayed
CD quality is
44,100 samples per second
Why?
Human hearing response is in the range of 20 to 22,000 cycles
per second
Nyquist sample rate =
highest frequency to be captured = 22,050 CPS
2 x 22,050 = 44,100 samples per second
Further reading
http://en.wikipedia.org/wiki/Nyquist_rate
http://en.wikipedia.org/wiki/Sampling_%28signal_proc
essing%29
http://en.wikipedia.org/wiki/Mp3
Quantization
• Quantization is the process of representing the
sample data using only given number of values.
• The given number of values determines the bit depth
of the quantization.
• In other words, bit depth refers to the number of
allowable levels you map (or round) the sample data
to.
39
Example: 10 levels
For 10 discrete levels, you may have the 10 allowable
values as
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
0, 5, 10, 15, 20, 25, 30, 35, 40, 45
2, 4, 6, 8, 10, 12, 14, 16, 18, 20
0, 100, 200, 300, 400, 500,600,700,800, 900
... and so forth
40
Suppose you choose
1,2,3,4,5,6,7,8,9,10
For 1,2,3,4,5,6,7,8,9,10
Any value below 1.0 will be recorded as 1.0.
Any value higher than 10 will be capped at 10.
Any value will be rounded to closest decimal value
It works well if all data fall in this range. But it may not
be always the case.
41
Increase Number of Allowable Levels
Will achieve better accuracy when more levels are
used for quantization.
However, for digitization, increasing the number of
allowable levels (i.e. increasing bit depth) will
increase the file size.
42
The side effects of sampling:
sampling artifacts
Sampling Artifacts
are the negative side effects
caused by having to sample
continuous data
Sampling Artifacts
Under-sampling: not enough samples being taken of
continuous data can produce undesired artifacts
Sampling Artifacts (cont.)
Not enough quantization levels when sampling continuous
data can produce undesired artifacts
Examples might be:
too few grey levels: gradients become steps
too few brightness levels: posterization
Sampling Artifacts
Retrograde Motion
2 samples/cycle, 2 cycles
Sampling Artifacts
Overview of how sampling rate and
bit depth affect digital media file
quality
Sampling rate is
related to:
Bit depth is related to:
digital images
image resolution, or
number of pixels
number of allowable
colors in an image
digital video
number of pixels in the
video, frame rate
number of allowable
colors
digital audio
sampling rate of the
audio (it limits how
high the pitch of the
audio can be captured)
number of allowable
levels of amplitude
Details will be covered in chapters for each media type.
48
Now you should be able to answer
the following questions
• Computers store and transmit information using digital
data. What exactly is digital data?
• Is there anything not digital?
• Why do we bother to learn about anything not digital in a
digital media course?
• What does digitizing mean?
49
Review Questions
50
Review Question
Digital data is _____ and analog information is _____.
A. continuous; discrete
B. discrete; continuous
51
Review Question
Digitization means converting _____ into _____.
52
Review Question
Converting from analog to digital involves a two-step
process: _____ and _____.
53
Review Question
When analog information is converted to digital data,
two properties affect the exactness of the digital
representation, one from sampling and one from
quantizing. Which of the following is a result of
quantization?
A. sampling rate
B. bit depth
54
Review Question
Which of the following refers to the number of
allowable levels of digitized data?
A. sampling rate
B. bit depth
55
Review Question
Which of the following can reduce file size of digital
media? (More than one choice)
A. decrease sampling rate
B. increase sampling rate
C. decrease bit depth
D. increase big depth
56