You are on page 1of 63

PRX1032 Lecture 04

Digital Media
Sesi 2015/2016, Semester 2
Centre for Pre-University Studies
UNIMAS
Chong Chee Jiun / PRX1032 1
Lec04
Analog vs Digital
What does it mean when something is
labeled as DIGITAL?

Digital Watch
Digital Signature
Digital Video Player
Digital Camera

Chong Chee Jiun / PRX1032 2


Lec04
Which is Digital Image?

Chong Chee Jiun / PRX1032 3


Lec04
Content Outline

Chong Chee Jiun / PRX1032 4


Lec04
Learning Objectives

Chong Chee Jiun / PRX1032 5


Lec04
Vocabularies
One Medium (singular) Two Media (plural)
Digital Media:
Computer-based representation, storage, transmission
, or manipulation of digital data (Jens, 2014)
Pictures, sound, and video stored/processed in
computers using digital format (i.e. binary mumbers)
(Wang, 2012)
ADC = Analog to Digital Conversion
DAC = Digital to Analog Conversion

Chong Chee Jiun / PRX1032 6


Lec04
Media 1: Sound
Chong Chee Jiun / PRX1032 7
Lec04
Types of Sound Wave
1) Acoustic sound wave (sound in the air)
2) Analog sound (electrical voltages running
in electric cables)
3) Digital sound (information represented by
numerical values)

Chong Chee Jiun / PRX1032 8


Lec04
Digital Sound
A digital file generated by digitalizing the information
transmitted through vibration of molecules in the air

Chong Chee Jiun / PRX1032 9


Lec04
What you Need to Know about
Digital Sound
Capturing sound wave (Analog Signal Digital Signal)
Playback digital sound (Digital Signal Analog Signal)
Artificial Sound (Compose MIDI)

Chong Chee Jiun / PRX1032 10


Lec04
(Analog Signal Digital Signal)
Capturing sound wave
Acoustic Transducer (Microphone) Electric
voltages Sound card (ADC by Sampling) Digital
file (bits)

Chong Chee Jiun / PRX1032 11


Lec04
Essential Computer Hardware
Sound card
Digital Signal Processor / Audio Processor
= a circuitry in sound card that is used to process,
record and play back

Chong Chee Jiun / PRX1032 12


Lec04
Sampling Process
Sampling Rate = 6 samples per second = 6Hz

1 2 3 4 5 6

1 2 3 4 5 6 7 8 9 10

Sampling Rate = 10 samples per second = 10Hz


Chong Chee Jiun / PRX1032 13
Lec04
Bit Depth
bit depth = how many computer bits are used for each sample in a
waveform.
8-bit audio gives you 2^8 = 256 separate levels for each sample
16-bit audio gives you up to 2^16 = 65,536 levels,

2 bit 4 bit

= 2^2 = 2^4
= 4 levels = 16 levels

Chong Chee Jiun / PRX1032 14


Lec04
Sampling Sound Wave
Accuracy depends on:
Sampling rate: number of samples per second
(minimum 44.1 kHz for high quality)
Sampling resolution: Bit depth

= ?

Chong Chee Jiun / PRX1032 15


Lec04
Sampling Sound Wave

Chong Chee Jiun / PRX1032 16


Lec04
Comparing Files with
Different Sampling Rate

Chong Chee Jiun / PRX1032 17


Lec04
(Digital Signal Analog Signal)
Playback Digital Sound
Digital file (bits) Microprocessor Sound card (DAC)
Electric voltages Transducer (Speaker)
Acoustic

Chong Chee Jiun / PRX1032 18


Lec04
Common Sound File Format
What are the digital sound file format that you
know?
Why are there so many of them out there?

Chong Chee Jiun / PRX1032 19


Lec04
Making Choices

Chong Chee Jiun / PRX1032 20


Lec04
Conversion between Format
Possible?
Tools to convert?

Chong Chee Jiun / PRX1032 21


Lec04
Artificial Sound
Musical Instrument Digital Interface (MIDI)
What is it NOT?
MIDI isn't music
MIDI doesn't contain any actual sounds
MIDI isn't a digital music file format like MP3 or WAV
What is it REALLY?
MIDI is nothing more than data (.mid)
It contains a list of events or messages that tell an
electronic device (musical instrument, computer
sound card, cell phone, et cetera) how to generate a
certain sound.
Chong Chee Jiun / PRX1032 22
Lec04
Application of Digital Sound
Speech Synthesis
Text-to-Speech Software
Speech Recognition
Speech recognition software

Chong Chee Jiun / PRX1032 23


Lec04
Quiz 1 - Sound
Questions:
1) List three common audio codec.
2) Is voltage signal generated by microphone an
analog signal or digital signal?
3) What is the function of a sound card when a digital
sound file needs to be play backed?
4) What does sampling rate as high as 20kHz means?

Chong Chee Jiun / PRX1032 24


Lec04
Media 2: Image
Chong Chee Jiun / PRX1032 25
Lec04
A digital file generated by
digitalizing information
transmitted through light

Chong Chee Jiun / PRX1032 26


Lec04
Analog Signal Digital Signal
Capturing what we see
Light Transducer (Camera Image sensor such as
CCD/CMOS) Electrical Voltage ADC by
Sampling Digital file (bits)
Image Source:
https://books.google.com.my/books?i
d=cXXOBQAAQBAJ&pg=PA162&lpg
=PA162&dq=Essential+principle+of+i
mage+processing&source=bl&ots=7h
fXsi2ujb&sig=LxZnSAQ63u6sInf-
4lzx0dqFzIM&hl=en&sa=X&ei=TvyM
VZ34IY-
TuASJp4DwBQ&redir_esc=y#v=onep
age&q=Essential%20principle%20of
%20image%20processing&f=false

Chong Chee Jiun / PRX1032 27


Lec04
Types of Graphics
1) Bitmap / raster graphics
1) Black and white (1-bit)
2) Grayscale or indexed color (8-bit)
3) High color (16-bit)
4) True color (24-bit)
2) Vector graphics

Gif generated from:


https://www.youtube.com/watch?v=Jcgg7jq1W3o

Chong Chee Jiun / PRX1032 28


Lec04
Essential Computer Hardware
Graphics card
receives information from the CPU about what to display,
decides how to use the pixels on the screen to display that image, and
sends that information to the monitor.
For 3-D images, the graphics card first creates everything out of
straight lines, called a "wireframe," and then fills in all the lighting,
texture and color. In a fast-paced game, it has to do this around sixty
times per second.

Chong Chee Jiun / PRX1032 29


Lec04
Bitmap graphic vs Vector graphic

Chong Chee Jiun / PRX1032 30


Lec04
Vector-to-Bitmap Conversion

Vector Bitmap
Rasterization
Graphic Graphic

Chong Chee Jiun / PRX1032 31


Lec04
Bitmap-to-Vector Conversion

Bitmap Tracing Vector


Graphic Software Graphic

Chong Chee Jiun / PRX1032 32


Lec04
Digital Signal Analog Signal
Playback image file / graphics
Digital file (bits) Microprocessor Graphics card
(DAC) Display Device

Chong Chee Jiun / PRX1032 33


Lec04
Vocabularies
Pixel, Resolution
Color Depth
Color Palette blue
001

RGB Image Source:


http://www.georgehernandez.com/h/xzMisc/Color/Hue.asp

an additive color model in which red, green,


and blue light are added together in various
ways to reproduce a broad array of colors.

Chong Chee Jiun / PRX1032 34


Lec04
Picture Element = PicEle = Pixel
A single unit cell of a digital image
Stores a value proportional to the light intensity
one pixel

Chong Chee Jiun / PRX1032 35


Lec04
Resolution
Information of color is stored as a matrix of bits
Resolution = size of the matrix = 13(w) x 16(h)
one pixel one pixel with value 1

Chong Chee Jiun / PRX1032 36


Lec04
Color Depth
Determines the number of bits to be stored in a
pixel 8
8
Byte
unit used to represent 8 bits 8
used in RGB system 24

Chong Chee Jiun / PRX1032 37


Lec04
Color Combination in Action
Source:
http://www.google.co
m/url?sa=t&rct=j&q=
&esrc=s&source=we
b&cd=4&ved=0CCw
QFjAD&url=ftp%3A%
2F%2Fftp.trend.ru%2
Fmarket-
ctc%2FI_Vorobyov%
2FVBA%2520_%252
0Excel%25202010%
2FSample_Files%2F
Chapter%252030%2
Frgb%2520color%25
20demo.xlsm&ei=Bo
uLVd3wOs22uATOw
oJY&usg=AFQjCNE
oXwwPEm8LhzHMa
2pha09UfVhxtA&bv
m=bv.96782255,d.c2
E&cad=rja

Chong Chee Jiun / PRX1032 38


Lec04
Color Palette
Set of colors available is dependent to the
environment of a system

Chong Chee Jiun / PRX1032 39


Lec04
Image Compression
Lossless vs Lossy
Very
Lossless Lossy
lossy

Source: http://www.cs.cityu.edu.hk/~jia/cs1102/cs1102.html
Chong Chee Jiun / PRX1032 40
Lec04
Source: http://www.cs.cityu.edu.hk/~jia/cs1102/cs1102.html

Chong Chee Jiun / PRX1032 41


Lec04
Making ChoicesWhy?

Chong Chee Jiun / PRX1032 42


Lec04
Conversion between Format
Possible?
Tools to convert?

Chong Chee Jiun / PRX1032 43


Lec04
Artificial Image
Scalable Vector Graphics (SVG)
Made up of many vector object
No grids
No pixels .
Point Arc Circle

Bezier curve
Line Polyline Polygon

Chong Chee Jiun / PRX1032 44


Lec04
3D Graphics
http://www.jiscdigitalmedia.ac.uk/infokit/3d/3d-home
A digital 3D model is essentially a set of instructions,
interpreted by a computer and displayed as an object which
appears to have length, breadth and depth.

Image Source: http://www.cs.cityu.edu.hk/~jia/cs1102/cs1102.html


Chong Chee Jiun / PRX1032 45
Lec04
Application of 3D Graphics

Source: https://www.youtube.com/watch?v=JkModCwIj0g
Chong Chee Jiun / PRX1032 46
Lec04
Quiz 2 - Image
Questions:
1) How would the color of a graphic be modified?
2) Is voltage signal generated by photosites an analog
signal or digital signal?
3) Describe the tasks of a graphic card when a digital
graphic in computer needs to be displayed?
4) What distinguishes GIF from other graphic format?

Chong Chee Jiun / PRX1032 47


Lec04
Media 3: Video
Chong Chee Jiun / PRX1032 48
Lec04
Video
Motion pictures with sound

Chong Chee Jiun / PRX1032 49


Lec04
Digital Video
Audio/visual in a binary format
container format term is MORE
commonly used compare to file format
Codec Container

Chong Chee Jiun / PRX1032 50


Lec04
Vocabulary
Codec vs Container
Bitrate
amount of data used to encode a single
second of audio and video (kbps or Mbps)
Compression ratio
<compressed size> : <original size>

Chong Chee Jiun / PRX1032 51


Lec04
Codec
compresses and decompresses data.
interprets the video file and determines how to play it on
your screen.
some examples of codecs:
FFmpeg (which includes formats like MPEG-2, the format in which
DVDs are stored, and MPEG-4, the format Apple uses for movies in the
iTunes store)
DivX, which works with a certain type of MPEG-4 file, and was often
used to rip DVDs in the pre-HD era
XviD, an open source version of DivX, popular among movie pirates
x264, which compresses H.264 videos (Also known as MPEG-4 AVC),
and is very popular for high definition videos
Source: http://lifehacker.com/5893250/whats-the-difference-between-all-these-video-formats-
and-which-one-should-i-use
Chong Chee Jiun / PRX1032 52
Lec04
Container = a bundle of files
consists of a video codec and an audio codec
it can also contain things like subtitles.
allow you to choose one codec for your video and one for your audio
gives you a bit more control over how you record your videos or rip
your movies. you can choose to use the high-quality DTS audio, or
compress your audio to something like MP3 for even more space
savings.
Popular containers include:
AVI
Matroska (which uses the extension MKV)
MP4 (which has been popularized by Apple in the iTunes Storenote that this
can also come with the M4V extension, but the container is the exact same)
MOV (which was created by Apple)

Source: http://lifehacker.com/5893250/whats-the-difference-between-all-these-video-formats-
Chong Chee Jiun / PRX1032 and-which-one-should-i-use 53
Lec04
Why need Different Containers?
The main difference between different containers is not
only the codecs they support but what other features
they supportlike subtitles or chapters.
MKV is an extremely popular container, mainly because
it supports nearly any video codec under the sun, as well
as a ton of extra features (plus it's open source).

Source: http://lifehacker.com/5893250/whats-the-difference-between-all-these-video-formats-
and-which-one-should-i-use

Chong Chee Jiun / PRX1032 54


Lec04
Bitrate

Chong Chee Jiun / PRX1032 55


Lec04
Video Compression
Similar to repeating image compression on
each frame
Compress pictures that appear similarly
between frames
Compress by reduce frame rate

Chong Chee Jiun / PRX1032 56


Lec04
DIGITAL RIGHTS
MANAGEMENT
Source of Image:
http://icdn1.digitaltrends.com/image/illegal_downloading
-665x325.jpg?ver=1

Chong Chee Jiun / PRX1032 57


Lec04
Digital Rights Management (DRM)
What is DRM?
a collection of techniques used by copyright holders
to limit access to and use of digital content
Authentication
a very simple form of digital rights management that
allows content to be accessed only by authorized
individuals
Digital watermark
a pattern of bits, inserted at various places in an
image or a content stream, that can be used to track,
identify, verify, and control content use
Chong Chee Jiun / PRX1032 58
Lec04
When using digital content
Make sure you know the rules
The copyright owner is entitled to recover
monetary damages resulting from
infringement, and any profits made from
illegal sales of the work
Copyright holders periodically crack down
on infringers

Chong Chee Jiun / PRX1032 59


Lec04
Instead of All Rights Reserved
Creative Commons is a non-profit that offers an
alternative to full copyright.
Every Creative Commons license works around the
world and lasts as long as applicable copyright lasts
(because they are built on copyright). It ensures
licensors get the credit for their work they deserve.
For more info: https://creativecommons.org/licenses/

Chong Chee Jiun / PRX1032 60


Lec04
Sharing Media Online
The benefit of a Creative Commons license is that you can give any
Web site access to your photos and they'll attribute it to you.
YouTube allows users to mark their videos with a Creative
Commons CC BY license. These videos are then accessible to
YouTube users for use, even commercially, in their own videos via
the YouTube Video Editor.
To release your Instagram photos to the Web with Creative
Common license, I Am CC webapp.can be used.

Source: http://lifehacker.com/5937560/i-am-cc-releases-your-instagram-photos-
under-a-creative-commons-license

https://support.google.com/youtube/answer/2797468?hl=en

Chong Chee Jiun / PRX1032 61


Lec04
Quiz 3 - Video
Questions:
1) .mp4 is not MPEG-4. True/False?
2) The file size of digital video is compressed by
reducing frame rate. True/False?
3) Codec contains subtitle. True/False?
4) Bit rate = Bit depth. True/False?

Chong Chee Jiun / PRX1032 62


Lec04
The End
Any question?

Chong Chee Jiun / PRX1032 63


Lec04

You might also like