TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Media IT - Coding
1. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
Faculty of Science, Technology and Communication (FSTC)
Bachelor en informatique (professionnel)
-- Media IT -–
¯_(ツ)_/¯
Unit 2
Signal basics and
digitalization
include slides: sampling with a tool
2. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 2
jakub
TU + FU-Berlin, Media IT
Bilderstellung:
(animated) GIF erstellen
Signal-Rauschverhältnis
Statistik Datenerhebung
Projekt: Medienerstellung
Podcast
Film
Stopmotion
3. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 3
origin of alphabet
https://www.ted.com/talks/wanis_kabbaj_how_nationalism_and_globalism_can_coexist
4. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
Find the errror:
1 2 3 4 5 6 7 8 9
5. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
5
2.1 Media
2.2 Coding
2.3 Analog signals
2.4 Fourier transform
2.5 Digitalization
2.6 Exercise
6. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.1 Media
Content uses different forms, e.g., text,
audio, images, animations, video and
interactive content
Multi- & mono-media
Multimedia Content is presented in one formMonomedia
Microsoft Minecraft Feierkrop
7. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.1 Media
Information can be perceived by our
nervous system using different inputs (or
senses), e.g., audio or visual
Multi- & mono-modal
Multimodal Information can be perceived by our
nervous system using a single input (or
sense)
Monomodal
Watching TV is a multimodal activity as your
see and hear sounds at the same time.
Reading a multimedia document with a braille-
reader is a tactile sense activity.
8. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.2 Coding
Information has to be expressed using a specific code in order to communicate with another human or a
machine
Coding of information
Coding
Coding for inter-human communication (examples) Coding for human-machine communication (examples)
Braille, NASA-Code...
9. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.2 Coding
A digital signal is a signal that is being used to
represent data as a sequence of discrete values; at any
given time it can only take on one of a finite number of
values.
Digital
Example: logical or binary signal
An analog signal is any continuous signal for which the
time-varying feature (variable) of the signal is a
representation of some other time varying quantity, i.e.,
analogous to another time varying signal.
Analog
Example: audio signal
The signal can be represented with two distinguishable levels of
the Boolean domain (1 and 0).
The signal can be represented with an infinite number of levels.
10. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.2 Coding
Interpretation of a digital signal
The decimal number 88 (64+16+8=88)
The symbol X in ASCII
A sample from an audio file
1.
2.
3.
11. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 11
2. Signal basics and digitalization
2.3 Analog signals
Sine wave
The oscillation of an undamped
spring-mass system around
the equilibrium is a sine wave
A lot of natural phenomes follow a sine wave
12. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 12
2. Signal basics and digitalization
Sine waves
A perfect signal is represented by a sine wave
t
wave period (T)
(one full sine wave)
Amplitude (A)
Frequency (f) with 𝑓 =
1
𝑇
t
phase ( 𝛗)
Two sine waves of same frequency but different phase
𝒚 𝒕 = 𝑨 ∙ 𝒔𝒊𝒏(𝟐 ∙ 𝝅 ∙ 𝒇 ∙ 𝒕 + 𝝋)
2.3 Analog signals
13. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 13
2. Signal basics and digitalization
2.3 Analog signals
Sinus waves
A perfect signal is represented by a sine wave
t
Two sine waves where the blue one has double frequency
t
Two sine waves where the blue one has double amplitude
14. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.3 Analog signals
Sinus waves
In nature, analog signals are commonly a combination (addition) of multiple sine waves
+
15. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 15
2. Signal basics and digitalization
2.3 Analog signals
Sinus waves
Two sinus waves with slightly different frequencies and the resulting frequency
16. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and Digitlization
2.3 Analog signals
Sinus waves
In nature, analog signals are commonly a combination (addition) of multiple sine waves
Sound (audio) is in nature
always a combination of
different sound waves. Humans hear frequencies from 20 Hz up to
20,000 Hz.
As we get older, or exposed to loud sounds which
damage our ears (such as loud concerts), the
upper limit decreases
17. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 17
2. Signal basics and digitalization
https://youtu.be/qNf9nzvnd1k
2.3 Analog signals
18. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 18
2. Signal basics and digitalization
2.4 Fourier transform
The Fourier analyze decomposes a function of time (a signal) into the frequencies
that make it up, i.e., in an (infinite) number of cosine waves
Fourier transform
𝒇 𝝃 =
−∞
∞
𝒇(𝒙) 𝒆−𝟐𝝅𝒊𝒙𝝃
𝒅𝝃
Jean-Baptiste
Joseph Fourier (21
March 1768 – 16
May 1830) was a
French
mathematician
and physicist born
in Auxerre
Applications:
• Decomposition of light into its different colors (frequency spectrum)
• Noise reduction or detection of very high or very low sounds
• Filtering in the context of images (color spectrum)
𝒙 𝒕 =
𝒌=𝟎
∞
𝒂 𝒌 ∙ cos 𝑘𝜔0 𝑡 + 𝜃 𝑘
The Fourier analyze requires a sample of a periodic signal. Therefore, the signal is
decomposed in frequency samples (Fourier transform)
19. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 19
2. Signal basics and digitalization
2.4 Fourier transform
Diagram illustrating the electromagnetic spectrum by NASA
20. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 20
2. Signal basics and digitalization
2.4 Fourier transform
Fourier transform
Original function showing oscillation 3 Hz Real and imaginary parts of integrand for Fourier
transform at 3 Hz
Fourier transform
21. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Digitalization is the process of transforming an analog signal into a digital signal.
Digitalization
Digitalization has two steps: sampling and quantization
Digital signal (red) is the sampled and rounded
representation of the grey analog signal
Sampling
A digital signal (red) that is produced by sampling may
be considered discrete in time as well as by value, and
is equivalent to a series of numbers, 4, 5, 4, 3, 4, 6, etc.
Quantization
Sampling: how often a sample of the analog signal is taken
Sampling rate (fs) is expressed in Hertz (Hz)
Quantization: the granularity of each sample or levels
Resolution (r) is expressed in bits
22. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
t
11
10
01
00
11
10
01
00
11
10
01
00
11
10
01
00
11
10
01
00
2. Signal basics and digitalization
2.5 Digitalization
The resulting discrete signal is
represented in red
Example
Let’s set fs = 5 Hz which means that we
take 5 samples per period (vertical lines)
Given is the blue signal which has a
duration of t = 1 s
Let’s set r = 2 bits which gives 4 different
levels (horizontal lines)
The resulting binary signal is:
1011111100 (10 Bits)
The result is a huge loss in data due to
the poor sampling rate and quantization
vector.
Result
10
11 11 11
00
23. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Example
Let’s set fs = 5 Hz which means that we
take 5 samples per period (vertical lines)
Given is the blue signal which has a
duration of t = 1 s
Let’s set use 3 bits for quantization
which gives 4 different levels (horizontal
lines)
t
The resulting discrete signal is
represented in red
The resulting binary signal is:
100111101110001 (15 bits)
Result
The result is a huge loss in data due to
the poor sampling rate and quantization
vector. 000
001
010
011
100
101
110
111
000
001
010
011
100
101
110
111
000
001
010
011
100
101
110
111
000
001
010
011
100
101
110
111
000
001
010
011
100
101
110
111
100
111
101
110
001
24. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Example
Let’s set fs = 10 Hz which means that we
take 5 samples per period (vertical lines)
Given is the blue signal which has a
duration of t = 1 s
Let’s set use 2 bits for quantization
which gives 4 different levels (horizontal
lines)
t
The resulting discrete signal is
represented in red
The resulting binary signal is:
10101111111011100100 (20
bits)
Result
The result is a huge loss in data due to
the poor sampling rate and quantization
vector.
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
00
01
10
11
10 10 10 10
11 11 11 11
01
00
25. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Example
t
fs = 20 Hz, 2 bits
Required memory: 40 bits
fs = 5 Hz, 2 bits
Required memory: 10 bits
t
t
fs = 10 Hz, 2 bits
Required memory: 20 bits
fs = 5 Hz, 3 bits
Required memory: 15 bits
t t
fs = 5 Hz, 4 bits
Required memory: 20 bits
reconstructed signal
original signal
26. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 26
2. Signal basics and digitalization
2.5 Digitalization
Sampling is the process of transforming a continuous
analog (time) signal into a set of discrete counterparts
Sampling theorem
t t
Any signal can be reconstructed if the sampling rate is at
least double the signal frequency
Nyquist theorem: any signal can be
reconstructed if the sampling rate (fa) is
at least double the signal frequency (fM)
𝒇 𝒂 = 𝟐 ∙ 𝒇 𝑴
Harry Nyquist
(1889 – 1976) was
a Swedish-born
American electronic
engineer
A perfect sine wave can be reconstructed with 2 samples
27. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Bit rate is the product of the sampling rate and the resolution (fs • r) expressed in bit per second (bps)
Bit rates
Examples of common bit rates:
Sampling rate Resolution Bit rate
Telephone, cassette 8 KHz 8 bit 64 Kbps
AM radio 11 KHz 8 bit 88 Kbps
FM radio 22 KHz 16 bit 352 Kbps
CD 44 KHz 16 bit 705 Kbps
DVD, digital TV 48 KHz
Professional recording systems > 96 KHz
Direct Stream Digital (DSD) for
Super Audio CD
2,2 Mhz 16 bit 45000 Kbps
The human ear can hear sounds up to 22 KHz. Therefore, the required sample rate is
double the signal frequency according Nyquist theorem
27
28. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 28
Why do the wheels
of coaches often
seem to spin
backwards in
movies?
Why do the wheels
of coaches often
seem to spin
backwards in
movies?
29. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 29
Why do the wheels
of coaches often
seem to spin
backwards in
movies?
Actual wheel movement
Nice illustration to watch:
https://www.spektrum.de/frage/warum-drehen-sich-die-raeder-von-kutschen-oder-autos-in-filmen-rueckwaerts-obwohl-die-fahrzeuge-doch/614132
Recording over time
30. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu :: 30
Why do the wheels
of coaches often
seem to spin
backwards in
movies?
31. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Aliasing
Sampled red signal with:
fs = 5 Hz
r = 2 bit
Given is the blue signal which has a
duration of t = 1 s
t
Sampling errors are:
• signals that are too high
• signals that are too low
Reconstructed
signal is too high
As these errors are the results of a
insufficient reconstruction but stand for
the original signal, they are commonly
called Aliasing
The result of aliasing is, e.g.:
• Audio sampling: high or low sounds
that are not present in the original
• Image sampling: Moiré effect
32. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.5 Digitalization
Moiré effect
In image processing, Moiré effect appears when the reconstructed results has errors due to Aliasing
Two sets of parallel
lines, one set inclined at
an angle of 5° to the
other
Line moiré with slow movement of
the revealing layer upward
https://youtu.be/jXEgnRWRJfg
33. Media IT :: Dr Serge Linckels :: http://www.linckels.lu/ :: serge@linckels.lu ::
2. Signal basics and digitalization
2.6 Exercise
Practical exercises
Calculate the required space to digitalize exactly 3 minutes of sound in DVD quality!
1.
How much music can you store on a 512 GB USB memory stick with the highest level of quality supported by
the MP3 standard?2.
How it works
• Try out the two exercises alone.
• Discuss your results with another student.
• This work is not considered for your final grade.
Memory units for a byte: kilo (K), mega (M), giga (G), tera (T), peta (P), exa (E), zetta (Z), yotta (Y)