SlideShare a Scribd company logo
Chapter Three
Graphics and Image Data Representations
1
Fundamentals of Multimedia, Chapter 3
3.1 Graphics/Image Data Types
• The number of file formats used in multimedia continues to
proliferate. For example, Table 3.1 shows a list of some file
formats used in the popular product Macromedia Director.
Table 3.1: Macromedia Director File Formats
2
File Import File Export Native
Image Palette Sound Video Anim. Image Video
.BMP,
.DIB, .GIF,
.JPG, .PICT,
.PNG,
.PNT, .PSD,
.TGA,
.TIFF, .WMF
.
PAL
.ACT
.
AIFF .
AU
.MP3 .
WAV
.
AVI .
MOV
.DIR
.FLA .
FLC
.FLI
.GIF
.PPT
.BMP .AVI
.MOV
.
DIR
.DXR .
EXE
Fundamentals of Multimedia, Chapter 3
1-bit Images
• Each pixel is stored as a single bit (0 or 1), so also referred to
as binary image.
• Such an image is also called a 1-bit monochrome image since
it contains no color.
• Fig. 3.1 shows a 1-bit monochrome image (called “Lena” by
multimedia scientists — this is a standard image used to
illustrate many algorithms).
3
Fig. 3.1: Monochrome 1-bit Lena image.
4
Fundamentals of Multimedia, Chapter 3
8-bit Gray-level Images
• Each pixel has a gray-value between 0 and 255. Each pixel is
represented by a single byte; e.g., a dark pixel might have a value
of 10, and a bright one might be 230.
• Bitmap: The two-dimensional array of pixel values that represents
the graphics/image data.
• Image resolution refers to the number of pixels in a digital image
(higher resolution always yields better quality).
• Fairly high resolution for such an image might be 1,600 x1,200, whereas
lower resolution might be 640 x 480.
• The resolution of the video card does not have to match the desired
resolution of the image, but if not enough video card memory is available
then the data has to be shifted around in RAM for display.
5
Fundamentals of Multimedia, Chapter 3
Multimedia Presentation
• Each pixel is usually stored as a byte (a value
between 0 to 255), so a 640 x 480 grayscale image
requires 300 kB of storage (640 x 480 = 307, 200).
• Fig. 3.3 shows the Lena image again, but this time in
grayscale.
• When an image is printed, the basic strategy of
dithering is used, which trades intensity resolution
for spatial resolution to provide ability to print multi-
level images on 2-level (1-bit) printers.
6
Fig. 3.3: Grayscale image of Lena.
7
Fundamentals of Multimedia, Chapter 3
Dithering
• Dithering is used to calculate patterns of dots such that values
from 0 to 255 correspond to patterns that are more and more
filled at darker pixel values, for printing on a 1-bit printer.
• The main strategy is to replace a pixel value by a larger pattern,
say 2 x 2 or 4 x 4, such that the number of printed dots
approximates the varying-sized disks of ink used in analog, in
halftone printing (e.g., for newspaper photos).
1. Half-tone printing is an analog process that uses smaller or larger
filled circles of black ink to represent shading, for newspaper
printing.
2. For example, if we use a 2 2 dither matrix
8
Fundamentals of Multimedia, Chapter 3
we can first re-map image values in 0..255 into the new range
0..4 by (integer) dividing by 256/5. Then, e.g., if the pixel
value is 0 we print nothing, in a 2 2 area of printer output.
But if the pixel value is 4 we print all four dots.
• The rule is:
If the intensity is > the dither matrix entry then print an
on dot at that entry location: replace each pixel by an n
x n matrix of dots.
• Note that the image size may be much larger, for a dithered
image, since replacing each pixel by a 4 x 4 array of dots,
makes an image 16 times as large.
9
Fundamentals of Multimedia, Chapter 3
• A clever trick can get around this problem. Suppose we wish to
use a larger, 4 x 4 dither matrix, such as
• An ordered dither consists of turning on the printer out-put
bit for a pixel if the intensity level is greater than the
particular matrix element just at that pixel position.
• Fig. 3.4 (a) shows a grayscale image of “Lena”. The ordered-
dither version is shown as Fig. 3.4 (b), with a detail of Lena's
right eye in Fig. 3.4 (c).
10
Fundamentals of Multimedia, Chapter 3
Fig. 3.4: Dithering of grayscale images.
(a): 8-bit grey image “lenagray.bmp”. (b): Dithered version of
the image. (c): Detail of dithered version.
11
(a) (b) (c)
Fundamentals of Multimedia, Chapter 3
Image Data Types
• The most common data types for graphics and image file
formats — 24-bit color and 8-bit color.
• Some formats are restricted to particular hardware /
operating system platforms, while others are “cross-platform”
formats.
• Even if some formats are not cross-platform, there are
conversion applications that will recognize and translate
formats from one system to another.
• Most image formats incorporate some variation of a
compression technique due to the large storage size of image
files. Compression techniques can be classified into either
lossless or lossy.
12
Fundamentals of Multimedia, Chapter 3
24-bit Color Images
• In a color 24-bit image, each pixel is represented by three
bytes, usually representing RGB.
 - This format supports 256 x 256 x 256 possible combined colors,
or a total of 16,777,216 possible colors.
 - However such flexibility does result in a storage penalty: A 640 x
480 24-bit color image would require 921.6 kB of storage without
any compression.
• An important point: many 24-bit color images are actually
stored as 32-bit images, with the extra byte of data for each
pixel used to store an alpha value representing special effect
information (e.g., transparency).
• Fig. 3.5 shows the image forestfire.bmp, a 24-bit image in
Microsoft Windows BMP format. Also shown are the grayscale
images for just the Red, Green, and Blue channels, for this
image.
13
Fig. 3.5: High-resolution color and separate R, G, B color channel images.
(a): Example of 24-bit color image “forestfire.bmp”. (b, c, d): R, G, and
B color channels for this image
14
(a)
(c)
(b)
(d)
Fundamentals of Multimedia, Chapter 3
8-bit Color Images
• Many systems can make use of 8 bits of color information
(the so-called “256 colors”) in producing a screen image.
• Such image files use the concept of a lookup table to store
color information.
 - Basically, the image stores not color, but instead just a set of
bytes, each of which is actually an index into a table with 3-
byte values that specify the color for a pixel with that lookup
table index.
• Since humans are more sensitive to R and G than to B, we
could shrink the R range and G range 0..255 into the 3-bit
range 0..7 and shrink the B range down to the 2-bit range
0..3, thus making up a total of 8 bits.
• To shrink R and G, we could simply divide the R or G byte
value by (256/8)=32 and then truncate. Then each pixel in
the image gets replaced by its 8-bit index and the color
LUT serves to generate 24-bit color.
15
Fundamentals of Multimedia, Chapter 3
• Fig. 3.7 shows the resulting 8-bit image, in GIF format.
Fig. 3.7 Example of 8-bit color image.
• Note the great savings in space for 8-bit images, over 24-bit ones:
a 640 x 480 8-bit color image only requires 300 kB of storage,
compared to 921.6 kB for a color image (again, without any
compression applied).
16
Fundamentals of Multimedia, Chapter 3
Color Look-up Tables (LUTs)
• The idea used in 8-bit color images is to store only the index,
or code value, for each pixel. Then, e.g., if a pixel stores the
value 25, the meaning is to go to row 25 in a color look-up
table (LUT).
17
Fig. 3.8: Color LUT for 8-bit color images.
Fundamentals of Multimedia, Chapter 3
18
• A Color-picker consists of an array of fairly large blocks of color (or a
semi-continuous range of colors) such that a mouse-click will select the
color indicated.
- In reality, a color-picker displays the palette colors associated with index
values from 0 to 255.
- Fig. 3.9 displays the concept of a color-picker: if the user selects the color
block with index value 2, then the color meant is cyan, with RGB values (0,
255, 255).
Fundamentals of Multimedia, Chapter 3
Fig. 3.9: Color-picker for 8-bit color: each block of the color-
picker corresponds to one row of the color LUT
19
Fundamentals of Multimedia, Chapter 3
3.2 Digital Audio and MIDI
What is sound?
 Sound is a wave phenomenon like light, but is
macroscopic and involves molecules of air being
compressed and expanded under the action of
some physical device.
 For example, a speaker in an audio system vibrates
back and forth and produces a longitudinal
pressure wave that we perceive as sound.
 Since sound is a pressure wave, it takes on
continuous values, as opposed to digitized ones.
20
Fundamentals of Multimedia, Chapter 3
Sound Wave
21
Fundamentals of Multimedia, Chapter 3
Digitization
 Digitization means conversion to a stream
of numbers, and preferably these
numbers should be integers for efficiency.
 More on Digital Audio will be discussed in
Chapter Six
22
Fundamentals of Multimedia, Chapter 3
MIDI: Musical Instrument Digital Interface
 • MIDI Overview
 (a) MIDI is a protocol adopted by the electronic
music industry in the early 80s for controlling
devices, such as synthesizers and sound cards,
that produce music and allowing them to
communicate with each other.
 (b) MIDI is a scripting language — it codes
“events” that stand for the production of
sounds. E.g., a MIDI event might include values
for the pitch of a single note, its duration, and
its volume.
23
Fundamentals of Multimedia, Chapter 3
 (c) The MIDI standard is supported by most synthesizers, so
sounds created on one synthesizer can be played and
manipulated on another synthesizer and sound reasonably
close.
 (d) Computers must have a special MIDI interface, but this is
incorporated into most sound cards.
 (3) A MIDI file consists of a sequence of MIDI instructions
(messages). So, would be quite small in comparison to a
standard audio file.
24
Fundamentals of Multimedia, Chapter 3
MIDI Concepts
 MIDI channels are used to separate
messages.
 (a) There are 16 channels numbered from 0
to 15. The channel forms the last 4 bits (the
least significant bits) of the message.
 (b) Usually a channel is associated with a
particular instrument: e.g., channel 1 is the
piano, channel 10 is the drums, etc.
 (c) Nevertheless, one can switch instruments
midstream, if desired, and associate another
instrument with any channel.
25
Fundamentals of Multimedia, Chapter 3
 System messages
(a) Several other types of messages, e.g. a general message
for all instruments indicating a change in tuning or
timing.
 The way a synthetic musical instrument responds to a
MIDI message is usually by simply ignoring any play
sound message that is not for its channel.
 If several messages are for its channel (say play
multiple notes on the piano), then the instrument
responds, provided it is multi-voice, i.e., can play more
than a single note at once (as opposed to violins).
26
Fundamentals of Multimedia, Chapter 3
 General MIDI: A standard mapping specifying what
instruments will be associated with what channels.
 (a) For most instruments, a typical message might be a Note
On message (meaning, e.g., a keypress and release), consisting
of what channel, what pitch, and what “velocity” (i.e.,
volume).
 (b) For percussion instruments, however, the pitch data means
which kind of drum.
 (c) A Note On message consists of “status” byte — which
channel, what pitch — followed by two data bytes. It is
followed by a Note Off message, which also has a pitch (which
note to turn off) and a velocity (often set to zero).
27
Fundamentals of Multimedia, Chapter 3
 The data in a MIDI status byte is between 128 and
255; each of the data bytes is between 0 and 127.
Actual MIDI bytes are 10-bit, including a 0 start and 0
stop bit.
28
Fundamentals of Multimedia, Chapter 3
 • A MIDI device often is capable of programmability, and
also can change the envelope describing how the amplitude
of a sound changes over time.
 The following figure shows a model of the response of a
digital instrument to a Note On message:
Stages of amplitude versus time for a music note
29
Fundamentals of Multimedia, Chapter 3
3.2 Popular File Formats
• 8-bit GIF : one of the most important formats
because of its historical connection to the WWW
and HTML markup language as the first image type
recognized by net browsers.
• JPEG: currently the most important common file
format.
30
Fundamentals of Multimedia, Chapter 3
GIF
• GIF standard (Graphics Interchange Format): (We examine
GIF standard because it is so simple! yet contains many
common elements.)
 Limited to 8-bit (256) color images only, which, while
producing acceptable color images, is best suited for images
with few distinctive colors (e.g., graphics or drawing).
• GIF standard supports interlacing — successive display of
pixels in widely-spaced rows by a 4-pass display process.
31
Fundamentals of Multimedia, Chapter 3
GIF
Li & Drew32
Fundamentals of Multimedia, Chapter 3
GIF87
• For the standard specification, the general file format of a
GIF87 file is as in Fig. 3.12.
33
Fig. 3.12: GIF file
format.
Fundamentals of Multimedia, Chapter 3
• Screen Descriptor comprises a set of attributes that belong to
every image in the file. According to the GIF87 standard, it is
defined as in Fig. 3.13.
34
Fig. 3.13: GIF screen
descriptor.
Fundamentals of Multimedia, Chapter 3
• Color Map is set up in a very simple fashion as in Fig. 3.14.
However, the actual length of the table equals 2(pixel+1)
as given in
the Screen Descriptor.
35
Fig. 3.14: GIF color map.
Fundamentals of Multimedia, Chapter 3
• Each image in the file has its own Image Descriptor, defined
as in Fig. 3.15.
36
Fig. 3.15: GIF image
descriptor.
Fundamentals of Multimedia, Chapter 3
JPEG
• JPEG (Joint Photographic Experts Group): The most important
current standard for image compression (.jpg, .jpeg, .jpe).
• The human vision system has some specific limitations and JPEG
takes advantage of these to achieve high rates of compression.
• JPEG allows the user to set a desired level of quality, or
compression ratio (input divided by output).
• As an example, Fig. 3.17 shows our forestfire image, with a
quality factor Q=10%.
 - This image is a mere 1.5% of the original size. In comparison, a JPEG
image with Q=75% yields an image size 5.6% of the original, whereas a
GIF version of this image compresses down to 23.0% of uncompressed
image size.
37
Fundamentals of Multimedia, Chapter 3
A photo of a flower compressed with successively more lossy
compression ratios from left to right.
Li & Drew38
Fundamentals of Multimedia, Chapter 3
Fig. 3.17: JPEG image with low quality specified by user.
39
Fundamentals of Multimedia, Chapter 3
PNG
• PNG format: standing for Portable Network Graphics — meant to
supersede the GIF standard, and extends it in important ways.
• Special features of PNG files include:
1. Support for up to 48 bits of color information — a large
increase.
2. Files may contain gamma-correction information for correct
display of color images, as well as alpha-channel information for
such uses as control of transparency.
3. The display progressively displays pixels in a 2-dimensional
fashion by showing a few pixels at a time over seven passes
through each 8 8 block of an image.
40
Fundamentals of Multimedia, Chapter 3
TIFF
• TIFF: stands for Tagged Image File Format.
• The support for attachment of additional information (referred to
as “tags”) provides a great deal of flexibility.
1. The most important tag is a format signifier: what type of
compression etc. is in use in the stored image.
2. TIFF can store many different types of image: 1-bit, grayscale,
8-bit color, 24-bit RGB, etc.
3. TIFF was originally a lossless format but now a new JPEG tag
allows one to opt for JPEG compression.
4. The TIFF format was developed by the Aldus Corporation in the
1980's and was later supported by Microsoft.
41

More Related Content

What's hot

multimedia authorizing tools
multimedia authorizing toolsmultimedia authorizing tools
multimedia authorizing tools
Santosh Jhansi
 
Chapter 4 : SOUND
Chapter 4 : SOUNDChapter 4 : SOUND
Chapter 4 : SOUND
azira96
 
Chapter 2 multimedia authoring and tools
Chapter 2 multimedia authoring and toolsChapter 2 multimedia authoring and tools
Chapter 2 multimedia authoring and tools
ABDUmomo
 
Chapter 7 : MAKING MULTIMEDIA
Chapter 7 : MAKING MULTIMEDIAChapter 7 : MAKING MULTIMEDIA
Chapter 7 : MAKING MULTIMEDIA
azira96
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
anuragjagetiya
 
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.pptChapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
BinyamBekele3
 
Multimedia chapter 4
Multimedia chapter 4Multimedia chapter 4
Multimedia chapter 4
PrathimaBaliga
 
Multimedia chapter 5
Multimedia chapter 5Multimedia chapter 5
Multimedia chapter 5
PrathimaBaliga
 
Sound
SoundSound
Computer animation Computer Graphics
Computer animation Computer Graphics Computer animation Computer Graphics
Computer animation Computer Graphics
University of Potsdam
 
Chapter 5 : ANIMATION
Chapter 5 : ANIMATIONChapter 5 : ANIMATION
Chapter 5 : ANIMATION
azira96
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
Poonam Seth
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGE
azira96
 
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
pavishkumarsingh
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
kavitha muneeshwaran
 
multimedia technologies Introduction
multimedia technologies Introductionmultimedia technologies Introduction
multimedia technologies Introduction
Mohammed Fareed
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKS
Kathirvel Ayyaswamy
 
Lecture# 7 midi file format
Lecture#  7 midi file formatLecture#  7 midi file format
Lecture# 7 midi file formatMr SMAK
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
Pratik Pradhan
 
Ppt on audio file formats
Ppt on audio file formatsPpt on audio file formats
Ppt on audio file formats
Ishank Ranjan
 

What's hot (20)

multimedia authorizing tools
multimedia authorizing toolsmultimedia authorizing tools
multimedia authorizing tools
 
Chapter 4 : SOUND
Chapter 4 : SOUNDChapter 4 : SOUND
Chapter 4 : SOUND
 
Chapter 2 multimedia authoring and tools
Chapter 2 multimedia authoring and toolsChapter 2 multimedia authoring and tools
Chapter 2 multimedia authoring and tools
 
Chapter 7 : MAKING MULTIMEDIA
Chapter 7 : MAKING MULTIMEDIAChapter 7 : MAKING MULTIMEDIA
Chapter 7 : MAKING MULTIMEDIA
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.pptChapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
 
Multimedia chapter 4
Multimedia chapter 4Multimedia chapter 4
Multimedia chapter 4
 
Multimedia chapter 5
Multimedia chapter 5Multimedia chapter 5
Multimedia chapter 5
 
Sound
SoundSound
Sound
 
Computer animation Computer Graphics
Computer animation Computer Graphics Computer animation Computer Graphics
Computer animation Computer Graphics
 
Chapter 5 : ANIMATION
Chapter 5 : ANIMATIONChapter 5 : ANIMATION
Chapter 5 : ANIMATION
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGE
 
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
Multimedia system(OPEN DOCUMENT ARCHITECTURE AND INTERCHANGING FORMAT)
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
 
multimedia technologies Introduction
multimedia technologies Introductionmultimedia technologies Introduction
multimedia technologies Introduction
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKS
 
Lecture# 7 midi file format
Lecture#  7 midi file formatLecture#  7 midi file format
Lecture# 7 midi file format
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
 
Ppt on audio file formats
Ppt on audio file formatsPpt on audio file formats
Ppt on audio file formats
 

Viewers also liked

Chapter 1 introduction to multimedia
Chapter 1 introduction to multimediaChapter 1 introduction to multimedia
Chapter 1 introduction to multimedia
ABDUmomo
 
Multimedia ppt
Multimedia pptMultimedia ppt
Multimedia ppt
Danny Oliveros
 
Introduction To Multimedia
Introduction To MultimediaIntroduction To Multimedia
Introduction To MultimediaJomel Penalba
 
Chapter 1 : INTRODUCTION TO MULTIMEDIA
Chapter 1 : INTRODUCTION TO MULTIMEDIAChapter 1 : INTRODUCTION TO MULTIMEDIA
Chapter 1 : INTRODUCTION TO MULTIMEDIA
azira96
 
Data mining chapter04and5-best
Data mining chapter04and5-bestData mining chapter04and5-best
Data mining chapter04and5-best
ABDUmomo
 
Multimedia Products
Multimedia ProductsMultimedia Products
Multimedia Products
Tamanna Sehgal
 
Mmc manual
Mmc manualMmc manual
Mmc manual
Urvi Surat
 
Chapter 9 : INTERNET
Chapter 9 : INTERNETChapter 9 : INTERNET
Chapter 9 : INTERNET
azira96
 
Importance of Multimedia
Importance of MultimediaImportance of Multimedia
Importance of MultimediaSaíful Íslam
 
Importance of multimedia
Importance of multimediaImportance of multimedia
Importance of multimedia
Online
 
Chapter 02 multimedia systems hardware and software
Chapter 02   multimedia systems hardware and softwareChapter 02   multimedia systems hardware and software
Chapter 02 multimedia systems hardware and software
Urvi Surat
 
Interactive Multimedia
Interactive MultimediaInteractive Multimedia
Interactive MultimediaJason Hando
 
hardware, editing software, authoring tools
hardware, editing software, authoring toolshardware, editing software, authoring tools
hardware, editing software, authoring toolsCma Mohd
 
Interactive media
Interactive mediaInteractive media
Interactive media
sorayouth ngamchanpli
 
5 Types Of Interactive Media
5 Types Of Interactive Media5 Types Of Interactive Media
5 Types Of Interactive Media
Nick Kelly
 
Text-Elements of multimedia
Text-Elements of multimediaText-Elements of multimedia
Text-Elements of multimedia
Vanitha Chandru
 
Chapter 2 : TEXT
Chapter 2 : TEXTChapter 2 : TEXT
Chapter 2 : TEXT
azira96
 
Introduction to multimedia
Introduction to multimediaIntroduction to multimedia
Introduction to multimedia
Southern Leyte State University
 

Viewers also liked (20)

Chapter 1 introduction to multimedia
Chapter 1 introduction to multimediaChapter 1 introduction to multimedia
Chapter 1 introduction to multimedia
 
Multimedia ppt
Multimedia pptMultimedia ppt
Multimedia ppt
 
Introduction To Multimedia
Introduction To MultimediaIntroduction To Multimedia
Introduction To Multimedia
 
Chapter 1 : INTRODUCTION TO MULTIMEDIA
Chapter 1 : INTRODUCTION TO MULTIMEDIAChapter 1 : INTRODUCTION TO MULTIMEDIA
Chapter 1 : INTRODUCTION TO MULTIMEDIA
 
Data mining chapter04and5-best
Data mining chapter04and5-bestData mining chapter04and5-best
Data mining chapter04and5-best
 
Multimedia Products
Multimedia ProductsMultimedia Products
Multimedia Products
 
Mmc manual
Mmc manualMmc manual
Mmc manual
 
SE - System Models
SE - System ModelsSE - System Models
SE - System Models
 
Chapter 9 : INTERNET
Chapter 9 : INTERNETChapter 9 : INTERNET
Chapter 9 : INTERNET
 
Multimedia
MultimediaMultimedia
Multimedia
 
Importance of Multimedia
Importance of MultimediaImportance of Multimedia
Importance of Multimedia
 
Importance of multimedia
Importance of multimediaImportance of multimedia
Importance of multimedia
 
Chapter 02 multimedia systems hardware and software
Chapter 02   multimedia systems hardware and softwareChapter 02   multimedia systems hardware and software
Chapter 02 multimedia systems hardware and software
 
Interactive Multimedia
Interactive MultimediaInteractive Multimedia
Interactive Multimedia
 
hardware, editing software, authoring tools
hardware, editing software, authoring toolshardware, editing software, authoring tools
hardware, editing software, authoring tools
 
Interactive media
Interactive mediaInteractive media
Interactive media
 
5 Types Of Interactive Media
5 Types Of Interactive Media5 Types Of Interactive Media
5 Types Of Interactive Media
 
Text-Elements of multimedia
Text-Elements of multimediaText-Elements of multimedia
Text-Elements of multimedia
 
Chapter 2 : TEXT
Chapter 2 : TEXTChapter 2 : TEXT
Chapter 2 : TEXT
 
Introduction to multimedia
Introduction to multimediaIntroduction to multimedia
Introduction to multimedia
 

Similar to Chapter 3 data representations

Unit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representationUnit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representation
Eellekwameowusu
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representation
Mazin Alwaaly
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Ankur Nanda
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
Elsayed Hemayed
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
ssuserff72e4
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
ssuserff72e4
 
Multimedia
MultimediaMultimedia
Multimedia
MR Z
 
Multimedia
MultimediaMultimedia
Multimedia
janani thirupathi
 
P1.1
P1.1 P1.1
Mathematics in the Digital Age
Mathematics in the Digital AgeMathematics in the Digital Age
Mathematics in the Digital Age
Reva Narasimhan
 
Unit1_File Size Calculation.pptx
Unit1_File Size Calculation.pptxUnit1_File Size Calculation.pptx
Unit1_File Size Calculation.pptx
ChitraKanna2
 
Dip
DipDip
Unit ii
Unit iiUnit ii
Unit ii
swapnasalil
 
Introduction to computer graphics
Introduction to computer graphics Introduction to computer graphics
Introduction to computer graphics Priyodarshini Dhar
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاج
maaz hamed
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
minhtaispkt
 
Scct2013 topic 3_graphics
Scct2013 topic 3_graphicsScct2013 topic 3_graphics
Scct2013 topic 3_graphicsAnies Syahieda
 

Similar to Chapter 3 data representations (20)

Unit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representationUnit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representation
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
 
Graphics
GraphicsGraphics
Graphics
 
Multimedia
MultimediaMultimedia
Multimedia
 
graphics
graphicsgraphics
graphics
 
Multimedia
MultimediaMultimedia
Multimedia
 
P1.1
P1.1 P1.1
P1.1
 
Mathematics in the Digital Age
Mathematics in the Digital AgeMathematics in the Digital Age
Mathematics in the Digital Age
 
Unit1_File Size Calculation.pptx
Unit1_File Size Calculation.pptxUnit1_File Size Calculation.pptx
Unit1_File Size Calculation.pptx
 
Dip
DipDip
Dip
 
Unit ii
Unit iiUnit ii
Unit ii
 
Lecture 10 Image Format
Lecture 10  Image FormatLecture 10  Image Format
Lecture 10 Image Format
 
Introduction to computer graphics
Introduction to computer graphics Introduction to computer graphics
Introduction to computer graphics
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاج
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Scct2013 topic 3_graphics
Scct2013 topic 3_graphicsScct2013 topic 3_graphics
Scct2013 topic 3_graphics
 

Recently uploaded

一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
9a93xvy
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
jyz59f4j
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
cy0krjxt
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
madhavlakhanpal29
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
PlanitIsrael
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
boryssutkowski
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
Confidence Ago
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
h7j5io0
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
ameli25062005
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
AlecAnidul
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
smpc3nvg
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
fabianavillanib
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
ameli25062005
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
ResDraft
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdf
SudhanshuMandlik
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
708pb191
 

Recently uploaded (20)

一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdf
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
 

Chapter 3 data representations

  • 1. Chapter Three Graphics and Image Data Representations 1
  • 2. Fundamentals of Multimedia, Chapter 3 3.1 Graphics/Image Data Types • The number of file formats used in multimedia continues to proliferate. For example, Table 3.1 shows a list of some file formats used in the popular product Macromedia Director. Table 3.1: Macromedia Director File Formats 2 File Import File Export Native Image Palette Sound Video Anim. Image Video .BMP, .DIB, .GIF, .JPG, .PICT, .PNG, .PNT, .PSD, .TGA, .TIFF, .WMF . PAL .ACT . AIFF . AU .MP3 . WAV . AVI . MOV .DIR .FLA . FLC .FLI .GIF .PPT .BMP .AVI .MOV . DIR .DXR . EXE
  • 3. Fundamentals of Multimedia, Chapter 3 1-bit Images • Each pixel is stored as a single bit (0 or 1), so also referred to as binary image. • Such an image is also called a 1-bit monochrome image since it contains no color. • Fig. 3.1 shows a 1-bit monochrome image (called “Lena” by multimedia scientists — this is a standard image used to illustrate many algorithms). 3
  • 4. Fig. 3.1: Monochrome 1-bit Lena image. 4
  • 5. Fundamentals of Multimedia, Chapter 3 8-bit Gray-level Images • Each pixel has a gray-value between 0 and 255. Each pixel is represented by a single byte; e.g., a dark pixel might have a value of 10, and a bright one might be 230. • Bitmap: The two-dimensional array of pixel values that represents the graphics/image data. • Image resolution refers to the number of pixels in a digital image (higher resolution always yields better quality). • Fairly high resolution for such an image might be 1,600 x1,200, whereas lower resolution might be 640 x 480. • The resolution of the video card does not have to match the desired resolution of the image, but if not enough video card memory is available then the data has to be shifted around in RAM for display. 5
  • 6. Fundamentals of Multimedia, Chapter 3 Multimedia Presentation • Each pixel is usually stored as a byte (a value between 0 to 255), so a 640 x 480 grayscale image requires 300 kB of storage (640 x 480 = 307, 200). • Fig. 3.3 shows the Lena image again, but this time in grayscale. • When an image is printed, the basic strategy of dithering is used, which trades intensity resolution for spatial resolution to provide ability to print multi- level images on 2-level (1-bit) printers. 6
  • 7. Fig. 3.3: Grayscale image of Lena. 7
  • 8. Fundamentals of Multimedia, Chapter 3 Dithering • Dithering is used to calculate patterns of dots such that values from 0 to 255 correspond to patterns that are more and more filled at darker pixel values, for printing on a 1-bit printer. • The main strategy is to replace a pixel value by a larger pattern, say 2 x 2 or 4 x 4, such that the number of printed dots approximates the varying-sized disks of ink used in analog, in halftone printing (e.g., for newspaper photos). 1. Half-tone printing is an analog process that uses smaller or larger filled circles of black ink to represent shading, for newspaper printing. 2. For example, if we use a 2 2 dither matrix 8
  • 9. Fundamentals of Multimedia, Chapter 3 we can first re-map image values in 0..255 into the new range 0..4 by (integer) dividing by 256/5. Then, e.g., if the pixel value is 0 we print nothing, in a 2 2 area of printer output. But if the pixel value is 4 we print all four dots. • The rule is: If the intensity is > the dither matrix entry then print an on dot at that entry location: replace each pixel by an n x n matrix of dots. • Note that the image size may be much larger, for a dithered image, since replacing each pixel by a 4 x 4 array of dots, makes an image 16 times as large. 9
  • 10. Fundamentals of Multimedia, Chapter 3 • A clever trick can get around this problem. Suppose we wish to use a larger, 4 x 4 dither matrix, such as • An ordered dither consists of turning on the printer out-put bit for a pixel if the intensity level is greater than the particular matrix element just at that pixel position. • Fig. 3.4 (a) shows a grayscale image of “Lena”. The ordered- dither version is shown as Fig. 3.4 (b), with a detail of Lena's right eye in Fig. 3.4 (c). 10
  • 11. Fundamentals of Multimedia, Chapter 3 Fig. 3.4: Dithering of grayscale images. (a): 8-bit grey image “lenagray.bmp”. (b): Dithered version of the image. (c): Detail of dithered version. 11 (a) (b) (c)
  • 12. Fundamentals of Multimedia, Chapter 3 Image Data Types • The most common data types for graphics and image file formats — 24-bit color and 8-bit color. • Some formats are restricted to particular hardware / operating system platforms, while others are “cross-platform” formats. • Even if some formats are not cross-platform, there are conversion applications that will recognize and translate formats from one system to another. • Most image formats incorporate some variation of a compression technique due to the large storage size of image files. Compression techniques can be classified into either lossless or lossy. 12
  • 13. Fundamentals of Multimedia, Chapter 3 24-bit Color Images • In a color 24-bit image, each pixel is represented by three bytes, usually representing RGB.  - This format supports 256 x 256 x 256 possible combined colors, or a total of 16,777,216 possible colors.  - However such flexibility does result in a storage penalty: A 640 x 480 24-bit color image would require 921.6 kB of storage without any compression. • An important point: many 24-bit color images are actually stored as 32-bit images, with the extra byte of data for each pixel used to store an alpha value representing special effect information (e.g., transparency). • Fig. 3.5 shows the image forestfire.bmp, a 24-bit image in Microsoft Windows BMP format. Also shown are the grayscale images for just the Red, Green, and Blue channels, for this image. 13
  • 14. Fig. 3.5: High-resolution color and separate R, G, B color channel images. (a): Example of 24-bit color image “forestfire.bmp”. (b, c, d): R, G, and B color channels for this image 14 (a) (c) (b) (d)
  • 15. Fundamentals of Multimedia, Chapter 3 8-bit Color Images • Many systems can make use of 8 bits of color information (the so-called “256 colors”) in producing a screen image. • Such image files use the concept of a lookup table to store color information.  - Basically, the image stores not color, but instead just a set of bytes, each of which is actually an index into a table with 3- byte values that specify the color for a pixel with that lookup table index. • Since humans are more sensitive to R and G than to B, we could shrink the R range and G range 0..255 into the 3-bit range 0..7 and shrink the B range down to the 2-bit range 0..3, thus making up a total of 8 bits. • To shrink R and G, we could simply divide the R or G byte value by (256/8)=32 and then truncate. Then each pixel in the image gets replaced by its 8-bit index and the color LUT serves to generate 24-bit color. 15
  • 16. Fundamentals of Multimedia, Chapter 3 • Fig. 3.7 shows the resulting 8-bit image, in GIF format. Fig. 3.7 Example of 8-bit color image. • Note the great savings in space for 8-bit images, over 24-bit ones: a 640 x 480 8-bit color image only requires 300 kB of storage, compared to 921.6 kB for a color image (again, without any compression applied). 16
  • 17. Fundamentals of Multimedia, Chapter 3 Color Look-up Tables (LUTs) • The idea used in 8-bit color images is to store only the index, or code value, for each pixel. Then, e.g., if a pixel stores the value 25, the meaning is to go to row 25 in a color look-up table (LUT). 17 Fig. 3.8: Color LUT for 8-bit color images.
  • 18. Fundamentals of Multimedia, Chapter 3 18 • A Color-picker consists of an array of fairly large blocks of color (or a semi-continuous range of colors) such that a mouse-click will select the color indicated. - In reality, a color-picker displays the palette colors associated with index values from 0 to 255. - Fig. 3.9 displays the concept of a color-picker: if the user selects the color block with index value 2, then the color meant is cyan, with RGB values (0, 255, 255).
  • 19. Fundamentals of Multimedia, Chapter 3 Fig. 3.9: Color-picker for 8-bit color: each block of the color- picker corresponds to one row of the color LUT 19
  • 20. Fundamentals of Multimedia, Chapter 3 3.2 Digital Audio and MIDI What is sound?  Sound is a wave phenomenon like light, but is macroscopic and involves molecules of air being compressed and expanded under the action of some physical device.  For example, a speaker in an audio system vibrates back and forth and produces a longitudinal pressure wave that we perceive as sound.  Since sound is a pressure wave, it takes on continuous values, as opposed to digitized ones. 20
  • 21. Fundamentals of Multimedia, Chapter 3 Sound Wave 21
  • 22. Fundamentals of Multimedia, Chapter 3 Digitization  Digitization means conversion to a stream of numbers, and preferably these numbers should be integers for efficiency.  More on Digital Audio will be discussed in Chapter Six 22
  • 23. Fundamentals of Multimedia, Chapter 3 MIDI: Musical Instrument Digital Interface  • MIDI Overview  (a) MIDI is a protocol adopted by the electronic music industry in the early 80s for controlling devices, such as synthesizers and sound cards, that produce music and allowing them to communicate with each other.  (b) MIDI is a scripting language — it codes “events” that stand for the production of sounds. E.g., a MIDI event might include values for the pitch of a single note, its duration, and its volume. 23
  • 24. Fundamentals of Multimedia, Chapter 3  (c) The MIDI standard is supported by most synthesizers, so sounds created on one synthesizer can be played and manipulated on another synthesizer and sound reasonably close.  (d) Computers must have a special MIDI interface, but this is incorporated into most sound cards.  (3) A MIDI file consists of a sequence of MIDI instructions (messages). So, would be quite small in comparison to a standard audio file. 24
  • 25. Fundamentals of Multimedia, Chapter 3 MIDI Concepts  MIDI channels are used to separate messages.  (a) There are 16 channels numbered from 0 to 15. The channel forms the last 4 bits (the least significant bits) of the message.  (b) Usually a channel is associated with a particular instrument: e.g., channel 1 is the piano, channel 10 is the drums, etc.  (c) Nevertheless, one can switch instruments midstream, if desired, and associate another instrument with any channel. 25
  • 26. Fundamentals of Multimedia, Chapter 3  System messages (a) Several other types of messages, e.g. a general message for all instruments indicating a change in tuning or timing.  The way a synthetic musical instrument responds to a MIDI message is usually by simply ignoring any play sound message that is not for its channel.  If several messages are for its channel (say play multiple notes on the piano), then the instrument responds, provided it is multi-voice, i.e., can play more than a single note at once (as opposed to violins). 26
  • 27. Fundamentals of Multimedia, Chapter 3  General MIDI: A standard mapping specifying what instruments will be associated with what channels.  (a) For most instruments, a typical message might be a Note On message (meaning, e.g., a keypress and release), consisting of what channel, what pitch, and what “velocity” (i.e., volume).  (b) For percussion instruments, however, the pitch data means which kind of drum.  (c) A Note On message consists of “status” byte — which channel, what pitch — followed by two data bytes. It is followed by a Note Off message, which also has a pitch (which note to turn off) and a velocity (often set to zero). 27
  • 28. Fundamentals of Multimedia, Chapter 3  The data in a MIDI status byte is between 128 and 255; each of the data bytes is between 0 and 127. Actual MIDI bytes are 10-bit, including a 0 start and 0 stop bit. 28
  • 29. Fundamentals of Multimedia, Chapter 3  • A MIDI device often is capable of programmability, and also can change the envelope describing how the amplitude of a sound changes over time.  The following figure shows a model of the response of a digital instrument to a Note On message: Stages of amplitude versus time for a music note 29
  • 30. Fundamentals of Multimedia, Chapter 3 3.2 Popular File Formats • 8-bit GIF : one of the most important formats because of its historical connection to the WWW and HTML markup language as the first image type recognized by net browsers. • JPEG: currently the most important common file format. 30
  • 31. Fundamentals of Multimedia, Chapter 3 GIF • GIF standard (Graphics Interchange Format): (We examine GIF standard because it is so simple! yet contains many common elements.)  Limited to 8-bit (256) color images only, which, while producing acceptable color images, is best suited for images with few distinctive colors (e.g., graphics or drawing). • GIF standard supports interlacing — successive display of pixels in widely-spaced rows by a 4-pass display process. 31
  • 32. Fundamentals of Multimedia, Chapter 3 GIF Li & Drew32
  • 33. Fundamentals of Multimedia, Chapter 3 GIF87 • For the standard specification, the general file format of a GIF87 file is as in Fig. 3.12. 33 Fig. 3.12: GIF file format.
  • 34. Fundamentals of Multimedia, Chapter 3 • Screen Descriptor comprises a set of attributes that belong to every image in the file. According to the GIF87 standard, it is defined as in Fig. 3.13. 34 Fig. 3.13: GIF screen descriptor.
  • 35. Fundamentals of Multimedia, Chapter 3 • Color Map is set up in a very simple fashion as in Fig. 3.14. However, the actual length of the table equals 2(pixel+1) as given in the Screen Descriptor. 35 Fig. 3.14: GIF color map.
  • 36. Fundamentals of Multimedia, Chapter 3 • Each image in the file has its own Image Descriptor, defined as in Fig. 3.15. 36 Fig. 3.15: GIF image descriptor.
  • 37. Fundamentals of Multimedia, Chapter 3 JPEG • JPEG (Joint Photographic Experts Group): The most important current standard for image compression (.jpg, .jpeg, .jpe). • The human vision system has some specific limitations and JPEG takes advantage of these to achieve high rates of compression. • JPEG allows the user to set a desired level of quality, or compression ratio (input divided by output). • As an example, Fig. 3.17 shows our forestfire image, with a quality factor Q=10%.  - This image is a mere 1.5% of the original size. In comparison, a JPEG image with Q=75% yields an image size 5.6% of the original, whereas a GIF version of this image compresses down to 23.0% of uncompressed image size. 37
  • 38. Fundamentals of Multimedia, Chapter 3 A photo of a flower compressed with successively more lossy compression ratios from left to right. Li & Drew38
  • 39. Fundamentals of Multimedia, Chapter 3 Fig. 3.17: JPEG image with low quality specified by user. 39
  • 40. Fundamentals of Multimedia, Chapter 3 PNG • PNG format: standing for Portable Network Graphics — meant to supersede the GIF standard, and extends it in important ways. • Special features of PNG files include: 1. Support for up to 48 bits of color information — a large increase. 2. Files may contain gamma-correction information for correct display of color images, as well as alpha-channel information for such uses as control of transparency. 3. The display progressively displays pixels in a 2-dimensional fashion by showing a few pixels at a time over seven passes through each 8 8 block of an image. 40
  • 41. Fundamentals of Multimedia, Chapter 3 TIFF • TIFF: stands for Tagged Image File Format. • The support for attachment of additional information (referred to as “tags”) provides a great deal of flexibility. 1. The most important tag is a format signifier: what type of compression etc. is in use in the stored image. 2. TIFF can store many different types of image: 1-bit, grayscale, 8-bit color, 24-bit RGB, etc. 3. TIFF was originally a lossless format but now a new JPEG tag allows one to opt for JPEG compression. 4. The TIFF format was developed by the Aldus Corporation in the 1980's and was later supported by Microsoft. 41

Editor's Notes

  1. Amplitude changes over time. Amplitude corresponds to pressure increasing or decreasing over time.