Professional Documents
Culture Documents
Lecture4 Multimedia
Lecture4 Multimedia
Fundamentals of Multimedia
Lecture 4 –
MEDIA REPRESENTATION AND MEDIA FORMATS
(Cont.)
Fundamentals of Multimedia 2
Media Representation and Formats
Text
Digital Images
Digital Video
Digital Audio
Graphics
Fundamentals of Multimedia 3
Image Dithering
To get color to black and white, first turn into gray scale.
I=0.299R+0.587G+0.114B
This formula reflects the fact that green is more
representative of perceived brightness than blue is
Fundamentals of Multimedia 4
Image Dithering
Fundamentals of Multimedia 7
Floyd-Steinberg Error Diffusion Dithering
20<128
pixeln=0
error= 20-0=20
𝟕
𝟐𝟎 × + 𝟏𝟓𝟎 ≈ 𝟏𝟓𝟗
𝟏𝟔
𝟓
𝟐𝟎 × + 𝟏𝟓𝟎 ≈ 𝟏𝟓𝟔
𝟏𝟔
𝟏
𝟐𝟎 × + 𝟗𝟎 ≈ 𝟗𝟏
𝟏𝟔
159>=128
pixeln=255
error= 159-255=-96
𝟕
−𝟗𝟔 × + 𝟖𝟎 ≈ 𝟑𝟖
𝟏𝟔
𝟓
−𝟗𝟔 × + 𝟗𝟏 ≈ 𝟔𝟏
𝟏𝟔
𝟑
−𝟗𝟔 × + 𝟏𝟓𝟔 ≈ 𝟏𝟑𝟖
𝟏𝟔
𝟏
−𝟗𝟔 × + 𝟏𝟖𝟎 ≈ 𝟏𝟕𝟒
𝟏𝟔
38<128
pixeln=0
error= 38-0=38
𝟕
3𝟖 × + 𝟏𝟐𝟎 ≈ 𝟏𝟑𝟕
1. Threshold the pixel (if pixelo >=128 → pixeln=255 else pixeln=0) 𝟏𝟔
𝟓
2. Compute the error at that pixel: error = pixelo – pixeln 𝟑𝟖 ×
𝟏𝟔
+ 𝟏𝟕𝟒 ≈ 𝟏𝟖𝟔
3. Propagate the error to neighbors by adding some proportion of the error to 𝟑
𝟑𝟖 × + 𝟔𝟏 ≈ 𝟔𝟖
𝟏𝟔
each unprocessed neighbor 𝟏
𝟑𝟖 × + 𝟖𝟒 ≈ 𝟖𝟔
𝟏𝟔
Fundamentals of Multimedia 8
Ordered Dithering
Fundamentals of Multimedia 9
Example : Ordered Dithering
Fundamentals of Multimedia 10
Ordered Dithering
Fundamentals of Multimedia 11
Pattern Dithering
Fundamentals of Multimedia 12
Pattern Dithering
𝟏
For 2 x 2 → 𝟐𝟐 +1=5 subblocks → = 𝟎. 𝟐
𝟓
𝟏
For 3 x 3 → 𝟑𝟐 +1=10 subblocks → = 𝟎. 𝟏
𝟏𝟎
Fundamentals of Multimedia 13
Example: Pattern Dithering
Step 1: 4 block
0 255 0 255
→ 255 0 255 0
0 255 0 255
255
Fundamentals of Multimedia 14
Image Transition
Image\Video Transitions: can be used in multimedia presentations to
signal scene changes .
Many different types of transitions:
Cut: sudden change of image contents formed by abutting two images
consecutively. This is the simplest and most frequently used image or video
transition.
Wipe: a replacement of the pixels in a region of the viewport with those
from another image. Wipes can be left-to-right, right-to-left, vertical,
horizontal, swept out like the hands of a clock, etc.
Dissolve: replaces every pixel with a mixture over time of the two images,
gradually replacing the first by the second. Most dissolves can be classified as
two types: cross dissolve and dither dissolve.
Fade-in and fade-out are special types of cross dissolve. Wipes are special forms of
dither dissolve in which changing pixels follow a particular geometric pattern.
Fundamentals of Multimedia 15
Image Transitions
Cross Dissolve: every pixel is affected gradually. It can be defined by:-
𝑫 = 𝟏 − 𝜶 𝒕 . 𝐀 + 𝜶 𝒕 .B
where A and B are the color 3-vectors for image A and image B.
Here, 𝜶 𝒕 is a transition function, which is often linear.
Fundamentals of Multimedia 16
Example: Cross Dissolve and Dither Dissolve
Cross Dissolve
𝑫 = 𝟏 − 𝜶 𝒕 . 𝐀 + 𝜶 𝒕 .B
Dither Dissolve from left
A= 150
B= 140 Number of columns = 10
Change = 10 × 0.3= 3 Columns in left
D= (1-0.3)× 𝟏𝟓𝟎 + 𝟎. 𝟑 × 𝟏𝟒𝟎 = 𝟏𝟒𝟕
Replacement from Left 3 columns A
A= 54 By 3 columns from Left 3 columns B
B= 98
D= (1-0.3)× 𝟓𝟒 + 𝟎. 𝟑 × 𝟗𝟖 ≈ 𝟔𝟕
Introduction to Multimedia 17
Image Formats
GIF
Introduction to Multimedia 18
Image Formats
JPEG
Introduction to Multimedia 19
Image Formats
TIFF
Introduction to Multimedia 20
Image Formats
PNG
Introduction to Multimedia 21
System Dependent Format
Introduction to Multimedia 22