SlideShare a Scribd company logo
Multimedia
Information Systems
What is Multimedia?
• Derived from the word “Multi” and
“Media”
– Multi
• Many, Multiple,
– Media
• Tools that is used to represent or do a certain
things, delivery medium, a form of mass
communication – newspaper, magazine / TV.
• Distribution tool & information presentation –
text, graphic, voice, images, music and etc.
Definition of Multimedia
• Multimedia is a combination of text, graphic, sound,
animation, and video that is delivered interactively to
the user by electronic or digitally manipulated means.
TEXT
AUDIO
GRAPHIC
VIDEO
ANIMATION
IMAGE
What is Multimedia?
• Multimedia is used exclusively to describe
multiple forms of media and content.
–Multimedia concerns the representation of mixed modes
of information as digital signals.
–It includes a combination of text, audio and speech,
video, images and graphics content forms
• Multimedia represents the convergence of text,
image, video and sound into a single form.
–The power of multimedia and the Internet lies in the
way in which information is linked.
Course Outline
Topic Contents
Introduction
Overview of Multimedia Types of Multimedia; Why
Multimedia; Challenges in Multimedia
Multimedia
Data
Representation
Digital multimedia Characteristics; Audio Formats &
MIDI; Image Formats & Color Models; Video Formats
& Color Models
Multimedia
Data
Compression
Overview compression; Compression with Loss and
Lossless; Static Coding: Huffman & Entropy; Adaptive
Coding: LZW
Multimedia
Storage
Basics of Optical Storage; Technological progress of
Compact Disc(CD); Digital Video/Versatile Disc
(DVD)
Content-based
Multimedia
Retrieval
Issues in Searching; Segmentation & Feature extraction;
Similarity Measurement; Retrieval Effectiveness; Query
Languages; Relevance and Feedback Query Expansion
Evaluation
• Test/Quiz at the end of each chapter (20%)
• Assignments (10%)
• Project (15%)
• Final exam (45%)
• Attendance & participation (10%)
Reading Materials
•V. S. Subrahmanian, Principles of Multimedia Database Systems,
USA: Morgan Kaufmann Publishers, 1998.
•C. Faloutsos, Searching Multimedia Databases by Content,
Norwell, MA: Kluwer Academic Publisher, 1996.
•Ralf Steinmetz and Klara Nahrstedt, Multimedia Fundamentals:
Media Coding and Content Processing; Pearson Education, 2004.
•V. S. Subrahmanian, and S. K. Tripathi, Multimedia Information
Systems, Springer London, Limited, 1998.
Media Types: Based on the
Content
• Are all multimedia information printable?
• The content may be in the form of animation
based on which multimedia is divided into
conventional and new media
• Conventional media (text, image, …)
–The content is printable and present in paper or
hardcopy format
• New media (audio, video, …).
–The content is non-printable and present only in
softcopy format
Media Types: Based on Human
Perception
• How do human perceive information?
• Auditory media:
– A media that transmits what humans hear
– It includes sound, music and voice.
• Visual media:
– A media that transmits what humans see, observe
and visualize
– It includes text, still and moving pictures
Media Types: Based on Time Dimensions
• Discrete (or Static) media: it refers to text, graphics,
and images as they are composed of time independent
information item.
– Information in these media consist exclusively of a sequence
of individual elements without a time component. Indeed
they may be displayed according to a wide variety of timing
or even sequencing and still remain meaningful
• Continuous (or Dynamic) media: refers to time-dependent
media like sound, and video, where the presentation requires a
continuous play-out as time passes.
– Information is expressed as not only of its individual value,
but also by the time of its occurrence. In other word, time
dependency between information items is part of the
information itself.
– Thus if the timing of the items change, or the sequence is
modified, the meaning of the items is altered.
Multimedia System
• A Multimedia System is a system capable of processing
multimedia data and applications.
– A Multimedia System is characterized by the processing,
storage, generation, manipulation and rendition of Multimedia
information, such as Image, Audio, Video, Text and Graphics.
• Multimedia system represents a technology/tool used to
process and combine two or more categories of information
having different transport signal characteristics.
• Multiple forms of information content are often considered as
multimedia if they contain conventional media and new media,
say image and audio or video.
– Which of the following is a multimedia system?
• a word processor that handles embedded graphics/image along
text
• macromedia flash that helps to create animated objects
Properties of Multimedia System
• Multimedia system handles discrete & continuous media
– It is a system capable of handling at least one discrete and one
continuous media in digital form
– E.g. Multiple forms of information content are often not
considered multimedia if they don't contain, say, audio or video.
• It integrates and synchronizes the different medias
simultaneously into a coherent framework.
– Integrate and use minimal number of different devices for
presentation of multimedia
– Synchronize well the presentation of the result of the different
media such that information flows in the correct order
• Multimedia system must be computer controlled.
– A digital device, like computer must be involved in the
presentation of the multimedia information to users
Challenges of Multimedia Computing
Developing a successful multimedia system is non-trivial.
• Memory space requirement: multimedia data need a lot of
space to store
– GB’s of main memory; TB’s of secondary storage; PB’s of tertiary
storage
• Data transmission bandwidth: Multimedia needs very high
bandwidth to transmit.
–Faster network (up to 25Mbs per video stream) with very high
bandwidth to transmit
• Complexity of multimedia data management: Multimedia
needs more complex and more efficient algorithms, say for
–Automatically analyzing, indexing & organizing information in
audio, image & video is much harder than from text. They involve
many different research issues.
• Hardware platforms: Multimedia data need efficient
hardware platforms
–Better CPU, graphics card, video card, sound card
Research Issues in Multimedia Computing
•How can multimedia be efficiently stored and transmitted?
– The need for compression and indexing
•Can multimedia be retrieved by its content?
– The need for proper segmentation and representation of an object
from multimedia content through feature extraction and pattern
analysis
– The need for matching technique to effectively identify a
video/audio/image that satisfy users need
•How can we enhance quality of multimedia data?
– Is the image as high-quality as users need? What could we do if
the image is poor quality?
•How can a user formulate a query for video/audio/image
retrieval?
– How we enable users to search for multimedia information
retrieval using multimedia query, such that, for instance image
by image search takes place
Multimedia is a Multidisciplinary
subject
Image, audio, speech,
video processing
system
Computer vision,
pattern recognition
Operating
system,
Computer
networks
Hum
an-com
puter
interaction
Computer
graphics
Multimedia
computing
Digital Audio, Image and Video
Overview
• Audio: used to record sound.
– In the past 20 years, audio has moved from analog recording on tape cassettes to
totally digital recording using computers.
– Today, the Musical Instrument Digital Interface (MIDI) allow anyone to create
music right on their desktop. MIDI is a digital standard that defines how to code
musical scores, such as sequences of notes, timing conditions, and the instrument
to play each note.
• Image:
– It is a 2-D object, which is stored as a specific arrangement of dots, or pixels.
– It differs from graphics in that images can be captured from the real world, where
as graphics are created by software & internally represented as an assemblage of
primitive objects such as lines, curves, circles, polygons, and arcs.
– Unlike Images, graphics are usually editable or revisable.
• Video:
– A series of framed images put together, one after another, to simulate motion and
interactivity. A video can be transmitted by number of frames per second and/or
the amount of time between switching frames.
– The difference between video and animation is that video is broken down into
individual frames.
Digital Media
• In computers, audio, image and video are stored as files
just like other text files (e.g. DOC, TXT, TEX, etc.).
– For images, these files can have an extension like
• BMP, JPG/JPEG, GIF, TIF, PNG, PPM, …
– For audios, the file extensions include
• WAV, MP3, m4a, AMR, WMA…
– The videos files usually have extensions:
• MOV, AVI, MPEG, MP4, 3gp, …
• What about PDF file? PS file? DAT file?
Digital Media Capturing
• To get a digital image, an audio or a video clip, we need some
media capturing devices
•Image:
– is captured using devises such as a digital camera or a digital
scanner
•Audio:
– is recorded using a digital audio recorder (or Microphone), such as
Olympus Voice Recorder, MP3 digital recorder, SONY Voice
Recorder, etc.
•Video:
– is recorded using a digital camcorder.
– Camcorder is a video camera that records video and audio using a
built-in recorder unit. The camcorder contains both a video camera
and a video recorder in one unit and hence its compound name
Advantage of digital media over analog ?
• Is digital cameras do things that are not done by still
cameras?
• The following are some of the advantages of digital
media
– Displaying images/audios/videos on a screen immediately after
they are recorded
– Storing thousands of images/audios/videos on a single small
memory device
– Deleting images/audios/videos to free storage space
– Digital camera enables recording video with sound; and
camcorder enables capturing image.
– What else???
Convert Analog to Digital Media
• Once the media is captured, there is a need to process them to convert
the continuous signal to digital. Hence, all the devices used for
capturing and digitization of the digital media have to complete the
following tasks:
• Sampling: converts a continuous media (analog signal) into a
discrete set of values at regular time and/or space intervals.
–Given an analog media, sampling represents a mapping of the
media from a continuum of points in space (and possibly time, if it
is a moving image) to a discrete set.
• Quantization: converts a sampled signal into a signal that can
take only a limited number of values (or bit depth).
–E.g. an 8-bit quantization provides 256 possible values
• Compression: There are probably some further compression
process to reduce file size to save space.
–Compression is minimizing the size in bytes of a media file without
degrading the quality.
Sampling Audio
• Good sampling follows Nyquist sampling theorem
– If we have a signal with frequency components, f1 < f2 <…<fmax,
what is the sampling frequency we can use?
– Nyquist Theorem states that, the sampling rate must be at least
twice the highest analog frequency component, in hertz; that is. fs
>= 2*fmax (where fmax is the highest frequency components in the
signal).
– If the sampling rate is less than 2fmax, some of the highest frequency
components in the analog input signal will not be correctly
represented in the digitized output.
• When such a digital signal is converted back to analog form by a
digital-to-analog converter, false frequency components appear that
were not in the original analog signal. This undesirable condition is a
form of distortion called aliasing.
• Aliasing is a sampling effect that leads to spatial frequencies being
falsely interpreted as other spatial frequencies.
The problem of Sampling rate
• For time-domain signals like the waveforms for sound
(and other audio-visual content types), frequencies are
measured in hertz (Hz) or cycles per second.
– For example, if an audio signal has an upper limit of 20,000
Hz (the approximate upper limit of human hearing),
according to Nyquist theorem a sampling frequency greater
than 40,000 Hz (40 kHz) will avoid aliasing and allow
theoretically perfect reconstruction.
• For example,
– For a range of Human Hearing (Music): 20Hz – 20KHz
• We lose high frequency response with age; Women
generally have better response than men
• To reproduce 20 kHz requires a sampling rate of 40 kHz
– For speech (like telephony) signal frequency is 5Hz–4KHz
• According to Nyquist, it would take 8,000 samples (2
times 4,000) to capture a 4,000 Hz signal perfectly.
Digital Audio
• Music has more high frequency components than speech.
–44 KHz is the sampling frequency for music.
–8 kHz sampling is good enough for telephone quality speech,
since all the energy is contained in the 5Hz – 4 KHz ranges.
• Audio is typically recorded at 8-, 16-, and 20- bit depth.
CD quality audio is recorded at 16-bit
–You often hear an audio (music) which is quantized at 16 bits for
each sampled data at 44 kHz.
–16 bits means each sample is represented as a 16bit integer,
which results in 65, 536 possible values.
Sampling and Quantization of Image
• The sampling theorem applies to 2D signal (images) too.
Sampling on a grid
• During sampling we have to determine the sampling rate, like
every third pixel sampled. The intermediate pixels are filled in with
the sampled values.
Pixels are infinitely small point
samples
Types of Digital Images
• Grayscale image
– Usually we use 256 levels for each pixel.
That means, the numerical value for gray
levels range from 0 (for black pixels) to
FF (256) for white. Thus we need 8 bits
to represent each pixel (28
= 256)
– Gray scale ranges from black to grays
and finally to white.
• Binary Image
– A binary image has only two values (0 or
1). A numerical value may represent
either a black (0) or a white (1) dot/pixel.
– Binary image is quite important in image
analysis and object detection
applications.
A 8 bit grayscale
Image.
Color Image
R
G
B
• Characterization of light is central
to the science of color.
• There are different color models:
RGB, YUV, YIQ, HSV, CMYK,
etc. color model
24 bit image
RGB Color Model
•To form a color with RGB, three
separate color signals of one red, one
green, & one blue must be mixed.
Each of the three signals can have an
arbitrary intensity, from fully off to
fully on, in the mixture.
–The RGB color model is an additive
color mixing model using which every
color can be encoded as a combination
of red, green, & blue light.
–Projection of primary color lights on a
screen shows secondary colors where
they overlap; for instance, the
combination of all three of red, green, &
blue in appropriate intensities makes
white.
R
G
B
Red
Color Table
Image with 256 colors
Clusters of colors
•It is possible to use much
less colors to represent a
color image without
much degradation.
RGB Color Model
• The main purpose of the RGB color
model is for display of images in
electronic systems, such as televisions
and computers.
– Typical RGB input devices are color TV &
video cameras, image scanners, and digital
cameras.
– Typical RGB output devices are TV sets of
various technologies (CRT, LCD, plasma,
etc.), computer and mobile video projectors,
phone displays, etc.
– Color printers, on the other hand, are usually
not RGB devices, but subtractive color
devices (typically CMYK color model).
RGB color model
The figure shows an RGB image, along with its separate R,
G and B components. Note that,
–strong red, green, and blue produces white color; like
wise, strong red and green with little blue gives brown;
strong green with little red or blue gives dark green; strong
blue and moderately strong red and green provides light
blue sky.
The number of bits used to represent each pixel in RGB space is
called the pixel depth.
–Consider an RGB image in which each of the red, green, and
blue color is an 8-bit representation. Under these conditions
each RGB color pixel have a depth of 24 bits.
–Compute the total number of colors in a 24-bit RGB image ?
Representing an Image
• To represent an image without noticeable deterioration, we
would have to use a matrix of at least 640 x 480 pixels.
– How much space is required by the grey-scale image with
such specification ?
– Where each pixel is represented by an 8-bit integer, this image
specification results in a matrix containing 307, 200 eight-bit
numbers (or, a total of 2, 457, 600 bits or 307 KBs).
• This is also true for video Graphics Array
(VGA) or configuring graphics card of
computers.
Video Sampling and Quantization
Frame N-1
Frame 0
time
• Analog video signal is continuous in space and time and sampling
considers both time and space.
• Video sampling break the frame into 720 x 480 pixels (for US
NTSC) or 704 x 576 pixels (for UK PAL )
• Video quantization is
essentially the same as
image quantization
• During video
quantization each pixel
is represented by a bit
depth of, say 8-bits
representing luminance
and color information.
Color System in Video
• Video signals are often transmitted to the receiver over a
single television channel
–In order to encode color, a video signal is decomposed into three
sub-signals: a luminance signal and two color signals.
–Since human vision is more sensitive to brightness than to color, a
more suitable color encoding system separates the luminance from
color information. Such models include YUV, YIQ, etc.
Y U V
 The YUV color model: While RGB model
separates colors, YUV model separates
brightness (luminance) information from
the color information. Y is the luminance
component (brightness) and U and V are
color components
–It is obtained from RGB using the following
equations.
Y = 0.299 R + 0.587 G + 0.144 B
U = B – Y
V = R - Y
Color System in Video
YIQ color model
• YIQ color model is a similar encoding system
like YUV.
• It produces the I and Q colors and adds the
modulated signal to the luminance Y.
– It is obtained from RGB using the following
equations.
Y = 0.3 R + 0.59 G + 0.11 B
I = 0.60 R – 0.28 G – 0.32 B
Q = 0.21 R – 0.52 G + 0.31 B
I Q
Video Storing format & compression
• Each video formats support various resolutions and color
presentation. The following are the well-known video formats
• The Color Graphics Adaptor (CGA):
–Has a resolution of 320 x 200 pixels with simultaneous display of four
colors
–What the necessary storage capacity per frame ?
• The Enhanced Graphics Adaptor (EGA):
–Supports display resolution of 640 x 350 pixels with 16 simultaneous
display colors
–What the necessary storage capacity per frame ?
• The Video Graphics Array (VGA):
–Works mostly with a resolution of 640 x 480 pixels with 256
simultaneous display colors
–What the necessary storage capacity per frame ?
• The Supper Video Graphics Array (VGA):
–Can present 256 colors at a resolution of 1024 x 768 pixels.
–What the necessary storage capacity per frame ?
–Other SVGA modes include 1280 x 1024 pixels and 1600 x 1280 pixels.
Exercise
• Suppose we have 24 bits per pixel available for a color
image. We also note that humans are more sensitive to red
and green colors than to blue, by a factor of approximately
1.5 times. How may we design a simple color representation
to make use of the bits available?
• Quite a simple scheme:
– Since Blue is less perceptually important use less bits to represent
blue color. Use proportionately more bits for red and green rather
than blue
– Therefore Red and Green use 9 bits each and Blue 6 bits to
represent values
– Need to quantize at different levels for blue and Red/green
Multimedia Data Compression
Multimedia Data Compression
•Data compression is about finding ways to represent the
content in fewer bits or bytes
–It is the process of encoding information using fewer bits
–For example, the ZIP file format, which provides compression,
also acts as an archiver, storing many source files in a single
destination output file.
•As with any communication, compressed data
communication only works when both the sender and
receiver of the information understand the encoding
scheme.
–Thus, compressed data can only be understood if the decoding
method is known by the receiver.
Is compression useful?
•Compression is useful because it helps reduce the
consumption of expensive resources, such as hard disk
space or transmission bandwidth.
–save storage space requirement: handy for storing files as they
take up less room.
–speed up document transmission time: convenient for transferring
files across the Internet, as smaller files transfer faster.
•On the downside, compressed data must be decompressed
to be used, and this extra processing may be detrimental to
some applications.
–For instance, a compression scheme for video may require
expensive hardware for the video to be decompressed fast enough
to be viewed as it's being decompressed
–The option of decompressing the video in full before watching it
may be inconvenient, and requires storage space for the
decompressed video.
Trade offs in Data Compression
The design of data compression schemes therefore
involves trade-offs among various factors, including
• the degree of compression
– To what extent the data should be compressed?
• the amount of distortion introduced
– To what extent quality loss is tolerated?
• the computational resources required to compress and
uncompress the data.
– Do we have enough memory required for compressing and
uncompressing the data?
Types of Compression
Lossless Compression Lossy Compression
M
m
Lossless Compress
M
Uncompress
M
m
Compress with loss
M’
Uncompress
M’  M
M = Message/data
Transmitted
Data Compression
Raw image takes about 6M bytes
(without header information)
24k bytes with jpeg, Q=50
Lossy and Lossless Compression
•Lossless compression does not lose any data in the compression
process.
– Lossless compression is possible because most real-world data has statistical
redundancy. It packs data into a smaller file size by using a kind of internal
shorthand to signify redundant data. If an original file is 1.5MB, this technique
can reduce up to half of the original size.
– For example, in English text, the letter 'e' is more common than the letter 'z', and
the probability that the letter 'q' will be followed by the letter 'z' is very small.
– GIF image files and WinZip use lossless compression. For this reason zip
software is popular for compressing program and data files.
•Lossless compression has advantages and disadvantages.
– The advantage is that the compressed file will decompress to an exact duplicate
of the original file, mirroring its quality.
– The disadvantage is that the compression ratio is not all that high, precisely
because no data is lost.
•To get a higher compression ratio -- to reduce a file significantly
beyond 50% -- you must use lossy compression.
Lossy and Lossless Compression
•Lossy compression will strip a file of some of its redundant
data. Because of this data loss, only certain applications are
fit for lossy compression, like graphics, audio, and video.
–Lossy compression necessarily reduces the quality of the file to
arrive at the resulting highly compressed size.
•Lossy data compression will be guided by research on how
people perceive the data in question.
–For example, the human eye is more sensitive to subtle variations
in luminance (i.e. brightness) than it is to variations in color.
–JPEG image compression works in part by "rounding off" some of
this less-important information.
Human visual system
• What characteristics of the human visual system can be exploited
in related to compression of color images and video?
• The eye is basically sensitive to color intensity
– Each neuron is either a rod or a cone . Rods are not sensitive to color.
– Cones come in 3 types: red, green and blue.
– Each responds differently --- Non linearly and not equally for RGB
differently to various frequencies of light.
Lossless vs. Lossy compression
•Lossless & lossy compression have become part of our
every day vocabulary due to the popularity of MP3 music
file, JPEG image file, MPEG video file, …
–A sound file in WAV format, converted to a MP3 file will lose
much data as MP3 employs a lossy compression; resulting in a file
much smaller so that several dozen MP3 files can fit on a single
storage device, vs. a handful of WAV files. However the sound
quality of the MP3 file will be slightly lower than the original
WAV. Have you noticed that?
–JPEG uses lossy compression, while GIF follows lossless
compression techniques
• Hence GIF compresses only up to 25%; as a result of which converting a GIF
file to JPEG format will reduce it in size. It will also reduce the quality to
some extent.
•To compress video, graphics or audio, it is our personal
choice and good results depend heavily on the quality of the
original file.
Example: Lossless vs. lossy compression
•An example of lossless vs. lossy compression is the
following string:
–25.888888888
•This string can be compressed as: 25.9!8
• Interpreted as, "twenty five point 9 eights", the original string is
perfectly recreated, just written in a smaller form.
•In a lossy system it can be compressed as: 26
–In which case, the original data is lost, at the benefit of a smaller
file size
•The two simplest compression techniques are: Zero length
suppression & run length encoding.
–The above is a very simple example of run-length encoding,
Run length encoding compression
techniques
• Data often contains sequences of identical bytes. By
replacing these repeated byte sequences with the number of
occurrences, a substantial reduction of data can be
achieved.
• In Run-length encoding, large runs of consecutive
identical data values are replaced by a simple code with the
data value and length of the run, i.e.
(dataValue, LengthOfTheRun)
• This encoding scheme tries to tally occurrence of data
value (Xi) along with its run length, i.e.(Xi , Length_of_Xi)
Run-length Encoding (RLE)
• It compress data by storing runs of data (that is, sequences in which
the same data value occurs in many consecutive data elements) as a
single data value & count.
– This method is useful on data that contains many such runs. Otherwise, It is not
recommended for use with files that don't have many runs as it could
potentially double the file size.
• For example, consider the following image with long runs of white
pixels (W) and short runs of black pixels (B).
WWWWWWWWWWBWWWWWWWWWBBBWWWWWWWWWWWW
• If we apply the run-length encoding (RLE) data compression
algorithm, the compressed code is :
10W1B9W3B12W (Interpreted as ten W's, one B, nine W's, three
B's, …)
• Run-length encoding performs lossless data compression.
• It is used in fax machines (combined with Modified Huffman
coding). It is relatively efficient because faxed documents are mostly
white space, with occasional interruptions of black.
Zero length suppression compression
techniques
• Zero length suppression: if in a sequence a series on n
successive tokens appears we can replace these with a
token and a count of number of occurrences. we usually
need to have a special code to denote when the repeated
token appears
• Example: given the number
894000000 … 0 (where there are 32 zeros)
zero length replace it with
894f32
where f is the code of zero
Application: Lossless vs. lossy compression
• For symbolic data such as spreadsheets, text, executable programs,
etc., losslessness is essential because changing even a single bit
cannot be tolerated.
• For visual and audio data, some loss of quality can be tolerated
without losing the essential nature of the data.
–By taking advantage of the limitations of the human sensory system, a
great deal of space can be saved while producing an output which is
nearly indistinguishable from the original.
–In audio compression, for instance, non-audible (or less audible)
components of the signal are removed.
• Lossy compression is used for:
–image compression in digital cameras, to increase storage capacities with
minimal degradation of picture quality
–audio compression for Internet telephony and CD ripping, which is
decoded by audio players.
–video compression in DVDs with MPEG format.
Lossless vs. Lossy compression
• Generally, the difference between the two compression
technique is that:
– Lossless compression schemes are reversible so that the
original data can be reconstructed,
– Lossy schemes accept some loss of data in order to achieve
higher compression.
• These lossy data compression methods typically offer a
three-way tradeoff between
– Computer resource requirement (compression speed, memory
consumption)
– compressed data size and
– quality loss.
Common compression methods
•Statistical methods:
–It requires prior information about the occurrence of symbols
E.g. Huffman coding and Entropy coding
•Estimate probabilities of symbols, code one symbol at a time, shorter
codes for symbols with high probabilities
•Dictionary-based coding
–The previous algorithms (both entropy and Huffman) require the
statistical knowledge which is often not available (e.g., live audio,
video).
–Dictionary based coding, such as Lempel-Ziv (LZ) compression
techniques do not require prior information to compress strings.
•Rather, replace symbols with a pointer to dictionary entries
Common Compression Techniques
•Compression techniques are classified into static, adaptive
(or dynamic), and hybrid.
•Static coding requires two passes: one pass to compute
probabilities (or frequencies) and determine the mapping,
& a second pass to encode.
• Examples: Huffman Coding, entropy encoding
•Adaptive coding:
–It adapts to localized changes in the characteristics of the data, and
don't require a first pass over the data to calculate a probability
model. All of the adaptive methods are one-pass methods; only one
scan of the message is required.
–The cost paid for these advantages is that the encoder & decoder
must be complex to keep their states synchronized, & more
computational power is needed to keep adapting the
encoder/decoder state.
–Examples: Lempel-Ziv and Adaptive Huffman Coding
Adaptive coding
Adaptive method
• Encoder
Initialize the data model as per agreement.
While there is more data to send
– Encode the next symbol using the data model and send it.
– Modify the data model based on the last symbol.
• Decoder
Initialize the data model as per agreement.
While there is more data to receive
– Decode the next symbol using the data model and output it.
– Modify the data model based on the decoded symbol.
Static method
• Encoder
Initialize the data model based on a first pass over the data.
Transmit the data model.
While there is more data to send
– Encode the next symbol using the data model and send it.
• Decoder
Receive the data model.
While there is more data to receive
– Decode the next symbol using the data model and output it.
• The key in adaptive
model is that, both
encoder and
decoder use exactly
the same initialize
model and
encode/decode
model.
Compression model
•Almost all data compression methods involve the use of a
model, a prediction of the composition of the data.
–When the data matches the prediction made by the model, the
encoder can usually transmit the content of the data at a lower
information cost, by making reference to the model.
–In most methods the model is separate, and because both the
encoder and the decoder need to use the model, it must be
transmitted with the data.
•In adaptive coding, the encoder and decoder are instead
equipped with identical rules about how they will alter their
models in response to the actual content of the data
–both start with a blank slate, meaning that no initial model needs to
be transmitted.
–As the data is transmitted, both encoder and decoder adapt their
models, so that unless the character of the data changes radically,
the model becomes better-adapted to the data it's handling and
compresses it more efficiently.
Data Compression = Modeling + Coding
Data Compression consists of taking a stream of symbols
and transforming them into codes.
–The model is a collection of data and rules used to process input
symbols and determine their probabilities.
–A coder uses a model (probabilities) to assign codes for the given
input symbols
We will take Huffman coding to demonstrate the
distinction:
Input
Stream
Model Output
Stream
Symbols Probabilities Codes
Encode
r
Huffman coding
•Developed in 1950s by David Huffman,
widely used for text compression,
multimedia codec and message
transmission
•The problem: Given a set of n symbols
and their weights (or frequencies),
construct a tree structure (a binary tree for
binary code) with the objective of reducing
memory space and decoding time per
symbol.
•For instance, Huffman coding is
constructed based on frequency of
occurrence of letters in text documents
D3
D4
D1
D2
0
0
0
1
1
1
Code of:
D1 = 000
D2 = 001
D3 = 01
D4 = 1
Huffman coding
•The Model could determine raw probabilities of each
symbol occurring anywhere in the input stream.
pi = # of occurrences of Si
Total # of Symbols
•The output of the Huffman encoder is determined by the
Model (probabilities).
–The higher the probability of occurrence of the symbol, the
shorter the code assigned to that symbol and vice versa.
–This will enable to easily control the most frequently occurring
symbols in in a data and also reduce the time taken during
decoding each symbols.
How to construct Huffman coding
Step 1: Create forest of trees for each symbol, t1, t2,… tn
Step 2: Sort forest of trees according to falling probabilities of
symbol occurrence
Step 3: WHILE more than one tree exist DO
– Merge two trees t1 and t2 with least probabilities p1 and p2
– Label their root with sum p1 + p2
– Associate binary code: 1 with the right branch and 0 with the left branch
Step 4: Create a unique codeword for each symbol by traversing the
tree from the root to the leaf.
– Concatenate all encountered 0s and 1s together during traversal
• The resulting tree has a prob. of 1 in its root and symbols in its leaf
node.
Example
• Consider a 7-symbol alphabet given in the following
table to construct the Huffman coding.
Symbol Probability
a 0.05
b 0.05
c 0.1
d 0.2
e 0.3
f 0.2
g 0.1
• The Huffman encoding
algorithm picks each time two
symbols (with the smallest
frequency) to combine
Huffman code tree
• Using the Huffman coding a table can be constructed by
working down the tree, left to right. This gives the binary
equivalents for each symbol in terms of 1s and 0s.
• What is the Huffman binary representation for ‘café’?
d f
g
0
0
1
1
0 1
0
0
1
1
0 1
0.4 0.6
0.3
0.2
0.1
1
c
a b
e
Algorithm
procedure HuffmanCode(H,n)
// H is the Huffman tree
for i = 1 to n-1 do
r = new Nodetype
rlchild = least(H)
rrchild = least(H)
rfrequency = rlchildfrequency +
rrchildfrequency
insert(H,r)
end for
return (H)
end procedure
Word level example
• Given text: “for each rose, a rose is a rose”
– Construct the Huffman coding
Entropy encoding
• Information theory deals with the questions of
“information content” of a data source, also referred to
as the entropy of the source.
– the "information content" can be viewed as how much
useful information the message actually contains.
– The entropy, in this context, is the expected number of bits
of information contained in each message, taken over all
possibilities for the transmitted message.
• According to Shannon, the entropy of an information
source S is defined as:
H(S) = Σi (pi log 2 (1/pi ))
– log 2 (1/pi ) indicates the amount of information contained in
symbol Si
, i.e., the number of bits needed to code symbol Si
.
Entropy encoding
•Example. What is the entropy of a gray-scale image with
uniform distribution of gray-level intensity?
–The entropy of the image, H(S)= Σi (1/256 log 2 (1/1/256))= 8
bits, which indicates that 8 bits are needed to code each gray level
•Question 1: What is the entropy of a source with M
symbols where each symbol is equally likely?
• Entropy, H(S) = log2 M
•Question 2: How about an image in which half of the
pixels are white and half are black?
• Entropy, H(S) = 1
Entropy Encoding
• Entropy is a measure of how much information is encoded in a
message. Higher the entropy, higher the information content.
– We could also say entropy is a measure of uncertainty in a message.
Information and Uncertainty are equivalent concepts.
• The units (in coding theory) of entropy are bits per symbol. It is
determined by the base of the logarithm:
2: binary (bit);
10: decimal (digit).
• Entropy gives the actual number of bits of information contained in a
message source.
• Example: If the probability of the character ‘e’ appearing in this
slide is 1/16, compute the information content of this character?
– H(S) = 4 bits.
– So, the character string “eeeee” has a total content of 20 bits (in contrast the use
of an 8-bit ASCII coding result in 40 bits to represent “eeeee”).
The Shannon-Fano Encoding Algorithm
1. Calculate the frequencies of each of the symbols in
the list.
2. Sort the list in (decreasing) order of frequencies.
3. Divide the list into two half’s, with the total
frequency counts of each half being as close as
possible to the other.
4. The right half is assigned a code of 0 and the left half
with a code of 1.
5. Recursively apply steps 3 and 4 to each of the halves,
until each symbol has become a corresponding code
leaf on a tree.
The Shannon-Fano Encoding Algorithm
Symbol Count Info.
-log2(pi)
Code Number of
Bits
A 15 1.38 00 30
B 7 2.48 01 14
C 6 2.70 10 12
D 6 2.70 110 18
E 5 2.96 111 15
It takes a total of
89 bits to encode
85.25 bits of
information.
x
x
x
x
x
85.25 89
Symbol
Count
B
A D
C E
7
15 6 6 5
0 0 1 1 1
0 1 0 1
1
1
0
• Example: Given symbols A to E and their corresponding
frequency counts encode them using Shannon-Fano entropy
encoding
Exercise
• Given the following symbols and their corresponding
frequency of occurrence, find an optimal binary code for
compression:
a. Using the Huffman algorithm
b. Using Entropy coding scheme
Character: a b c d e t
Frequency: 16 5 12 17 10 25
Lempel-Ziv Encoding
• Data compression up until the late 1970's mainly directed towards
creating better methodologies for Huffman coding.
• An innovative, radically different method was introduced in1977 by Abraham
Lempel and Jacob Ziv.
• This technique (called Lempel-Ziv) actually consists of two
considerably different algorithms, LZ77 and LZ78.
• Due to patents, LZ77 and LZ78 led to many variants:
• The zip and unzip use the LZH technique while UNIX's compress
methods belong to the LZW and LZC classes.
LZ77 Variants LZR LZSS LZB LZH
LZ78 Variants LZW LZC LZT LZMW LZJ LZFG
Lempel-Ziv compression
•The problem with Huffman coding is that it requires
knowledge about the data before encoding takes place.
–Huffman coding requires frequencies of symbol occurrence
before codeword is assigned to symbols
•Lempel-Ziv compression:
–Not rely on previous knowledge about the data
–Rather builds this knowledge in the course of data
transmission/data storage
–Lempel-Ziv algorithm (called LZ) uses a table of code-words
created during data transmission;
•each time it replaces strings of characters with a reference to a previous
occurrence of the string.
Lempel-Ziv Compression Algorithm
• The multi-symbol patterns are of the form: C0C1 . . . Cn-
1Cn. The prefix of a pattern consists of all the pattern
symbols except the last: C0C1 . . . Cn-1
Lempel-Ziv Output: there are three options in assigning a code
to each symbol in the list
• If one-symbol pattern is not in dictionary, assign (0, symbol)
• If multi-symbol pattern is not in dictionary, assign
(dictionaryPrefixIndex, lastPatternSymbol)
• If the last input symbol or the last pattern is in the dictionary,
asign (dictionaryPrefixIndex, )
Example: LZ compression
• Example: Given a word, aaababbbaaabaaaaaaabaabb
containing only two letters, a and b, compress it using LZ
technique.
Steps in Compression
• First, split the given word into pieces of symbols
– In the example, the first piece of our sample text is a. The second
piece must then be aa. If we go on like this, we obtain the
breakdown of data as illustrated below:
– Note that, the shortest piece of data is the string of characters that
we have not seen so far.
seen unseen
LZ Compression
•Second, index the pieces of text obtained in the breaking-
down process from 1 to n.
– The empty string (start of text) has index 0, a has index 1, ...
•Third, number the pieces of data using the above indices.
–Thus a, with the initial string, is numbered Oa. String 2, aa, is
numbered 1a, because it contains a, whose index is 1, and the new
character a. Proceed numbering all the pieces in terms of those
preceding them.
•Is replacing characters by integers compress the given text ?
LZ Compression
•Now, compute how many bits needed to represent this coded
information.
–each piece of text is composed of an integer and an alphabet.
•The number of bits needed to represent each integer with index i is at
most equal to the number of bits used to represent the (i -1)th
index.
For example,
–the number of bits needed to represent 6 in piece 8 is equal to 3, because it takes
three bits to express 7 (the (n-1)th index) in binary.
•One of the advantages of Lempel-Ziv compression is that in a long
string of text, the number of bits needed to transmit the coded
information is peanuts compared to the actual length of the text.
–E.g. To transmit the actual text aab, 24 bits (8 + 8 + 8) needed, where as for the
code 2b, 12 bits needed.
LZ Compression Algorithm
Dictionary  empty ; Prefix  empty ; DictionaryIndex  1;
while(symbolStream is not empty)
Symbol  next symbol in symbolStream;
if(Prefix + Symbol exists in the Dictionary)
Prefix  Prefix + Symbol ;
else
if(Prefix is empty)
CodeWordForPrefix  0 ;
else
CodeWordForPrefix  DictionaryIndex for Prefix ;
Output: “CodeWordForPrefix, Symbol” ;
insertInDictionary( ( DictionaryIndex , Prefix + Symbol) );
DictionaryIndex++ ;
Prefix  empty ;
end else
end while
if(Prefix is not empty)
CodeWordForPrefix  DictionaryIndex for Prefix;
Output: “CodeWordForPrefix , “;
end if
Example 2: LZ Compression
Encode (i.e., compress) the string ABBCBCABABCAABCAAB
using the LZ algorithm.
The compressed message is: (0,A)(0,B)(2,C)(3,A)(2,A)(4,A)(6,B)
Note: The above is just a representation, the commas and parentheses
are not transmitted;
Example 2: Compute Number of bits transmitted
• Consider the string ABBCBCABABCAABCAAB given in example 2
(previous slide) and compute the number of bits transmitted:
Number of bits = Total No. of characters * 8 = 18 * 8 = 144 bits
• The compressed string consists of codewords and the corresponding
codeword index as shown below:
Codeword: (0, A) (0, B) (2, C) (3, A) (2, A) (4, A) (6, B)
Codeword index: 1 2 3 4 5 6 7
• Each code word consists of a character and an integer:
– The character is represented by 8 bits
– The number of bits n required to represent the integer part of the codeword with
index i is given by:
Codeword (0, A) (0, B) (2, C) (3, A) (2, A) (4, A) (6, B)
Index 1 2 3 4 5 6 7
Bits: 1 + 8) + (1 + 8) + (2 + 8) + (2 + 8) + (3 + 8) + (3 + 8) + (3 + 8) = 71 bits
• The actual compressed message is: 0A0B10C11A010A100A110B
– where each character is replaced by its binary 8-bit ASCII code.
Example 3: Decompression
Decode (i.e., decompress) the sequence (0, A) (0, B) (2, C) (3, A) (2,
A) (4, A) (6, B)
The decompressed message is:
ABBCBCABABCAABCAAB
Exercise
Encode (i.e., compress) the following strings using the
Lempel-Ziv algorithm.
1. ABBCBCABABCAABCAAB
2. SATATASACITASA.
Assignment
• Nowadays Huffman encoding is also modified
to adaptive Huffman encoding, modified
Huffman encoding and dynamic Huffman
encoding
• On the given one of the topic
– Provide an overview (What it means?)
– Show algorithm with example (How it works?)
– Explain significance (Why we need it?)
– Conclusion
– References
Optical Storage Media
Choice of storage
• Multimedia data needs more storage than others
• Choice of storage media depends on user’s
circumstances
–Quantity and type of information at stock,
–Required access time & transfer rate
–Stability of data
–Number of users & their skills
• Optical Storage media continues to be extremely
popular in computer systems, particularly for
Multimedia applications
Optical Storage
•Optical storage deals with data storage and is usually
considered as a type of tertiary storage.
–Tertiary storage comes in the form of low-cost
removable media, such as CD-ROMs and floppy disks,
while secondary storage comes in the form of the hard
disks found within your computer.
•Optical storage differs from other types of storage media,
such as floppy disks, hard disks, magnetic tapes and flash
memory:
–Optical storage vary in material composition, technology,
and storage capacity, and are mostly cheaper (cost per
data bit -wise).
–Optical media have higher recording densities. Though
hard disks can store larger amounts of data, one must
consider the bulkiness of a hard disk compared to the
slimness of optical media
Advantages of Optical Storage
•Storage Capacity
–It has huge capacity; a 4.7-inch CD can hold over 700 Megabytes
of data.
•Compatibility
–Readability of all varieties of CD by any of the huge number of
available CD drives
•Durability
–A laser is used to store and retrieve data on an optical disc, and
nothing comes into contact with the recording surface
–Optical discs can be accessed thousands of times and will last for
decades without deterioration
•Scalability
–Optical storage technology provides a variety of storage capacities
with room to grow from megabytes to terabytes
Advantages of Optical Storage
•Accessibility
–Unused data can be stored in an easily accessible optical library.
–This enables fast storage and retrieval of backup and archive data.
–About 100 times faster than magnetic tape
•Portability
–CDs are extremely robust and durable
–They are removable and portable
–They can be transported securely
•Affordability
–The cost of CDs is cheaper; it costs just a not more than three
BIRR to spend.
–How much CD-R and CD-RW costs? What about DVD?
Advantages over Magnetic disk
•Higher data density
–Store more data bit per inch
•Long-term storage
–Insensitive to scratch / dust
•Low probability of head crashes
–Distance between head & the disk is more than 1mm
•Adequate error correction
–Allows error handling
•Quality
–Holds high quality multimedia
History of optical storage
Types of Optical Storage
• Optical storage media can be classified according to their reading
technology:
–the read-only CD, CD-ROM, DVD-ROM, and DVD-Video;
–the write-once CD-R and DVD-R, both of which use WORM
(Write-Once, Read-Many-times) technology
–the rewritable CD-RW, DVD-RAM, and DVD-RW.
Thus, R in CD-R & DVD-R means "Recordable", RW means "Rewritable", ROM
means "Read Only Memory", RAM means "Random Access Memory".
• Most optical storage media are optical disks, such as CDs.
–The data on optical disks are usually accessed by a laser beam touching
the disc's surface.
–A 'sub-type' of optical disks is the phase-change disk, which uses a
material that can freeze into either a crystalline or amorphous state.
Phase-change disks allow rewritable optical media, such as CD-RWs and
DVD-RWs.
–On the other hand, magneto-optic disks straddle the line, as they're made
of magnetic recordable material but use optical technology (i.e. laser) to
record the data.
Basic CD technology
Basics
•The most common form of optical storage is the Compact
Disk (CD).
–Even with the arrival of DVDs and other more powerful optical
media, CDs remain a massively popular way for industries to
package software, games, music, and movies.
–Ordinary computer users often have a soft spot for CDs and the
CD burner hardware of their PCs, as these discs provide low-cost
and easy-to-use back-up for and physical transfer of data files.
–The CD is a thin wafer of polycarbonite plastic with a thin metal
layer
–120mm diameter (4.7 inches)
Basic CD technology
• Data storage:
– For data storage the CD is divided into logical sectors (max. 99). Normally
there are 75 sectors, and each sector can hold 2 Kbytes
– Capacity for a 74 minute CD is
74 X 60 secs X 75 sectors X 2 Kbytes
= 660,000 Kbytes = 650 Megabytes
• Because the CD is originally based on audio technology the track is
divided as: minutes:seconds:sectors
– Tracks contains sequential arrangement of pits & lands. The "holes" on the CD
are called pits, while the flat places (i.e. unburned areas) around these holes are
called lands.
– A continuous spiral of data is recorded starting at the inner edge to the outside
edge.
• How does a CD record data?
– Data is recorded on the disc using a laser beam which burns pits (a series of
holes) in the disc surface. Presence of a pit represents a 1, while Absence of a
pit (a ‘land’) represents 0
How does a CD record data
105
Table of Contents
• A CD-ROM has a table of contents (TOC) at the beginning.
It serves a similar purpose to the file allocation table and root
directory found on a hard disk, it allows the files to be found.
– A.k.a. index of the disc.
• Multi-session CDs allow data to be written in various sessions,
that is for data to be appended (not overwritten) at a later time.
– Such CDs have a table of contents for each session.
– The new TOC contains the old info plus the new.
– Such CDs cannot be read by ordinary drives unless they are
“finalized”.
• Single Session vs. Multiple Session
– With single-session CDs, the TOC is easily located by the drive.
Multi-session CDs drives need to be able to find the latest TOC.
– Many older CD drives do not have this capability.
– Reading a CD-RW requires a multi-session capability, so it is
becoming standard.
How does a CD record data
Channel bits are stored as pits and lands on a CD where
• a change between pit and land (or vice versa) corresponds to a ”1”
• no change corresponds to a ”0”
Example:
Optical Storage Types: Audio CD and CD-
ROM
•Audio CD
–The compact disc (CD) which is developed by Philips &
Sony Corporation in the 1980s, were audio CDs for
storing audio data.
–It had a capacity of
• 74Min play back
• 650 MB
•In 1984, CD-ROMs went beyond audio,
–It added software, computer games, encyclopedias,
movies, and more.
–It also boasted memory capacity to 747 MB & low
manufacturing cost.
Optical Storage Types: CD-ROM
•CD-ROMs mainly differ from audio CDs in terms of error-correcting
code.
–While it might be tolerable for an audio CD to have errors (e.g. from time to
time, the music skips while playing), it is definitely not tolerable for computer
programs, as even the smallest software defect can render the whole program
unusable. This means that CD-ROMs have to contain a larger amount of error-
correcting code needed to safely store data.
•Philips added graphics to the CD-ROM, as well as the ability to
interleave audio, video, and data. This made the CD into a true
"multimedia" medium.
–With the introduction of standardized CD-ROM file system called High Sierra,
any standards-conformant CD-ROM readable in any computer running
Windows/MS-DOS, Unix, etc.
•CD-ROM Drive Speeds
–It's good to remember that while CD-ROMs are economical, CD drives aren't up
to par with your computer's hard disk.
–Hard disks are at an entirely higher performance category, as these can transfer
and access data much faster than CD drives.
–Speed of most CD-ROM drives today hover around 50x
Optical Storage Types: CD-R
•CD-Rs and CD-RWs maintain a lot of the features of CDs
and CD-ROMs; that’s why they’re still called compact
discs and this pair highlights the improvements in optical
storage technology.
•CD-R (CD-Recordable)
–CD-Rs are WORM (Write Once, Read Many) discs that give
people a cheaper means of storing data in compact discs.
–It allows user to write once & read many times
• Enables CDs to be recorded when needed at the user’s local computer
• Once created cannot be overwritten
–Unfortunately, the arrival of these low-cost, easy to use CD-Rs also
helped spread software, music, and movie piracy.
–CD-Rs look like regular CD-ROMs except that they are gold-
colored instead of silver. This is due to the use of gold instead of
aluminum, which is used in regular CDs. These discs contain
0.6mm-wide grooves that guide the laser for writing data.
Optical Storage Types: CD-RW
•CD-RW (CD-Rewritable)
–CD-RWs represent the next step in CD technology after the CD-R.
These discs use the same standard size of CD-Rs but are more
expensive than them.
–CD-RWs allow many writes onto the compact disc, in contrast to
the WORM CD-R.
• CD rewritable means the data on the disc can be erased and new data written
to the disc
• Requires special CD-RW discs
–CD-Rs aren't obsolete with the availability of CD-RWs. CD-Rs can
still be used as cheaper backup media, as well as more secure
storage – unlike CD-RWs, CD-Rs can only be written once, which
means you can't accidentally erase the stored data with another
write process
111
Digital Versatile/Video Disk (DVD)
• The size of software and data files continues to grow, so
the CD with its 650 MB capacity is becoming too
limited.
• A higher capacity alternative is the DVD which stands
for either digital video disk or digital versatile disk.
– Although some will now say DVD doesn’t stand for
anything.
• A DVD is just a variation on a CD, information is read
from the disc by reflecting light from its surface.
– The differences between DVDs and CDs is a matter of speed
and capacity (DVDs are better on both counts) and logical
format.
– DVDs have a higher standard data transfer rate – 1.32 MB/s
compared to 150 KB/s for CD-DA – about nine times faster.
Optical Storage Types: DVD
•The beginnings of the DVD format may be traced back to
the 1990s, where two optical storage formats were in the
works;
–Multimedia Compact Disc (MMCD) and the Super Density Disc
(SDD).
•DVD (Digital Video Disc or Digital Versatile Disc) may
easily be mistaken for an ordinary compact disc, but what
sets it apart is
–the amount of data that can be stored in it (4.7 gigabytes), as well
as technology that makes this possible.
•Digital Video Disk
–Used to indicate a player for movies. It only plays video disks
•Digital Versatile Disk
–Used to indicate a computer drive. It will read computer disks and
play video disks
• To squeeze all this information onto
the CD-sized disc, the designers of the
DVD disc made several changes from
the compact disc.
• First they made pits and lands used to
record data and the track spacing
nearly half the size of the original CD
design.
• Then, they made the discs double sided
and added another data layer to each
side creating a potential for four layers
of data per disc.
DVD technology
Optical Storage Types: DVD
•Why we need DVD?
–Since DVDs can hold large amount of space (several gigabytes),
these optical discs were unmistakably built for the heightened
home movie experience.
–DVDs can hold around two hours of high-quality (with 700 x 480
video resolution) digital video (using MPEG-2 compression), plus
digital audio.
–One highlight of watching movies in DVDs is the ability to
display the natural scene in true widescreen format.
–These days DVDs have also made their way into video game
consoles. They enable to have impressive picture quality, realistic
PC games…more video into the multimedia productions, which
adds more traffic implications over the net.
Difference between CD & DVD disc
• CD is usually for computer files, music and pictures. DVD holds
more, because they're for movies, animations, etc.
– You can use DVD to store data and music if you want to, but they're just a tad
more expensive.
• DVDs are produced using the same concept of pits and lands applied
to CDs. The important difference incorporated into DVDs are:
– More compact packing of the pits/holes: 1.6 microns in between for CDs, 0.74
microns for DVDs.
– Writes data in smaller pits; such that for the same available area, more data can
be stored : 0.8 microns for CDs, 0.4 microns for DVDs.
– Use of a red laser at a smaller wavelength: 0.78 microns for CDs, 0.65 microns
for DVDs.
• Moreover, the available data area for DVD disc is larger than the one
of CD.
– A recordable CD disc has the capacity of 700MB, while a DVD-/+R disc has
about 4.7GB.
– The DVD is 6 fold increase in storage than the CD.
•Compared to CD, DVD
uses smaller pits and a
more closely spaced track.
The result is a significant
increase in data density.
Thus Bits are packed more
closely in DVD’s.
•Uses smaller pits and lands,
reduced track spacing
•Can also include another
data layer and/or made
double sided
DVD vs CD
118
Layers and Sides
DVD Technology
•High capacity storage medium
–Employs second layer of pits & lands on top of first layer, by
adjusting the focus of laser reading both layer is possible
 doubles the capacity (8.5 GB)
–Two sided
doubles the capacity (17 GB)
•DVD Formats
–Single sided single layer (SS/SL): Can hold 4.7 GB worth of data
= 2 hours video
–Single sided dual layer (SS/DL) : Can hold 8.5 GB = 4 hours video
–Double sided single layer : Can hold 9.4 GB = 4.5 hours video
–Double sided dual layer: Can hold 17 GB = 8 hours video
DVD Types
•DVD-Video
– Released in 1996 by the DVD Forum, DVD-V is used primarily for
viewing movies and other visual entertainment, prerecorded on
these discs.
– They are interactive and contain features that enhance your movie-
viewing experience.
– Total capacity 17 gigabytes (double-sided)
– Another characteristic of DVD-Video is its support for copy-
protective measures, such as Regional Protection and CSS
(content scrambling system). Such measures were implemented to
prevent piracy.
•DVD-ROM
– Basic technology same as DVD Video, but also includes computer-
friendly file formats.
– Used to store data
DVD Types
• DVD-R
–DVD-Recordables, or DVD-Rs, or DVD-dash-Rs, are the first
and most popular formats of recordable DVDs. As with CD-R,
users can write only once to this disk.
–They are highly expensive and uncommon discs used for
professional needs, as they allow recording of any data;
–DVD-R are more available to consumers, but do not allow
copying of protected DVDs.
–Capacity 4.7 gigabytes.
•DVD-RAM
–This makes DVD a virtual hard disk, with random read-write
access.
–Capacity 4.7 gigabyte-per-side.
–Can be re-written more than 100,000 times.
–The DVD-RAM works like a hard disk.
DVD Types
• DVD-RW
– Just like CD-RWs, DVD-RW discs change state under a laser for it to be
rewritten on. DVD-RWs reach up to 1000 instances of rewritings.
– One drawback of these discs is that because they have relatively lower
reflectivity and are consequently mistaken as dual-layer DVDs, DVD-RWs are
compatible with only around 70% of the players out there.
– It is similar to DVD-RAM
– Features a sequential read-write access more like a phonograph than a hard
disk.
– Capacity is 4.7 gigabytes per side.
– Can be re-written up to about 1,000 times.
• DVD-Audio
– The latest audio format with more than double the fidelity of a standard CD.
– Because of its much higher capacity, DVDs can make space for much higher
audio quality.
– However, audio on DVD has never really caught up with audio CDs because
people don’t need extremely high-quality music, as they are content even with
compressed MP3 formats.
DVD Types
DVD+R and DVD+RW (plus-Rs or plus-RWs)
•DVD+R and DVD+RWs provide for:
– lossless linking:
• no need to re-record a whole disc if only part of it needs updating,
– better error handling,
– Easy Write or Mount:
• twice the maximum writing speed of DVD-RWs
– Rainier technology
• transforming the disc into an ordinary floppy or hard drive
•Compatibility issues: support for DVD+R and DVD+RW
may only be found in specialized or high-end hardware and
software.
DVD Types
DVD-VR and DVD+VR (DVD Video Recording discs)
•Like most DVD discs, DVD-VRs & DVD+VRs were made for videos.
•This is taken a step further, though, as these Video Recording formats
allow you to create videos on these discs so that they can be edited
fully.
•Possible Features with the DVD VRs:
– adding new video content,
– changing menu backgrounds,
– inserting chapters,
– splitting clips, or
– removing unwanted scenes.
•Compatibility issues: As for the "minus" versus "plus" formats, the
same rule of thumb regarding incompatibility applies: DVD-VRs and
DVD+VRs are not usually playable in ordinary DVD players and must
be used compatible devices with DVD VRs.
Blu-ray Technology
• Blu-ray Disc (BD) is a digital optical disc data
storage format.
• It was designed to supersede the DVD format, in that it is
developed to enable recording, storing, rewriting, and
playback of high-definition and ultra high-definition video
with up to 2160p resolution (3840×2160 pixels).
• In 1997, DVDs revolutionized the movie industry.
• Now, the Blu-ray technology is having the same effect on
DVDs. With a smaller wavelength, one can distinguish
smaller/closer objects. In this case, the smaller wavelength
allows the pits and the lands to be smaller and closer together
on a Blu-Ray than on a DVD.
BD construction
• While current optical disc technologies such as DVD rely on a red
laser to read and write data, BD uses a blue-violet laser instead, hence
it’s name Blu-ray
• Blu-ray Disc
come in single
layer (25 GB
capacity), dual
layer (50 GB).
Triple-layer discs
(100 GB) and
quadruple-layers
(128 GB) are
available for BD-
XL re-writer
drives.
How BD works
• The benefit of using a blue-violet laser is that it has
a shorter wavelength than a red laser, which makes
it possible to focus the laser spot with even greater
precision.
– This allows data to be packed more tightly and stored in
less space, so it's possible to fit more data on the disc
even though it's the same size as a CD/DVD.
– The shorter wavelength can be focused to a smaller area,
thus enabling it to read information recorded in pits that
are less than half the size of those on a DVD, and can
consequently be spaced more closely, resulting in a
shorter track pitch, enabling a Blu-ray Disc to hold
about five times the amount of information that can be
stored on a DVD.
Writing Effect

More Related Content

PPT
Introduction to Multimedia Technologies
PPTX
Chapter_1_Introduction_to_Multimedia.pptx
PPT
Lecture # 1
PPT
lecture-1_introudcution to multimedia communication.ppt
PDF
Mms intro
PPT
multimedia_technology.ppt
PPTX
L#1 Multimedia systems telecomunication.pptx
PPTX
6_2021_05_09!12_48_12_PM.ppt Nix
Introduction to Multimedia Technologies
Chapter_1_Introduction_to_Multimedia.pptx
Lecture # 1
lecture-1_introudcution to multimedia communication.ppt
Mms intro
multimedia_technology.ppt
L#1 Multimedia systems telecomunication.pptx
6_2021_05_09!12_48_12_PM.ppt Nix

Similar to Multimedia Information Systems in Information Technology (20)

PPT
Chapter 1-Introduction to Media-Past, Present and Future.ppt
PPTX
fdfffffffffffffffgggggggggggggggggg.pptx
PPSX
Multimedia Presentation
PPTX
MUTIMEDIA in empowerment technologies.pptx
PPTX
PPTX
PPTX
UNIT-4-CGM.pptx
PPTX
MultimediaSystem_Sistemamultimedia_.pptx
PDF
Multi media mca_sem5_notes
PDF
Multimedia 110526120716-phpapp01
PPTX
Multimedia tech.sec a & b
PPTX
1 introduction multimedia
PDF
Multimedia
PPTX
multimedia_ presetation_about______.pptx
PPTX
Presentation on Multimedia
PPT
31. Multimedia System
PPT
4 multimedia basics
PPTX
Cs8092 computer graphics and multimedia unit 4
PPTX
Multimedia IT Presentation
PPTX
Multimedia: Multimedia technology
Chapter 1-Introduction to Media-Past, Present and Future.ppt
fdfffffffffffffffgggggggggggggggggg.pptx
Multimedia Presentation
MUTIMEDIA in empowerment technologies.pptx
UNIT-4-CGM.pptx
MultimediaSystem_Sistemamultimedia_.pptx
Multi media mca_sem5_notes
Multimedia 110526120716-phpapp01
Multimedia tech.sec a & b
1 introduction multimedia
Multimedia
multimedia_ presetation_about______.pptx
Presentation on Multimedia
31. Multimedia System
4 multimedia basics
Cs8092 computer graphics and multimedia unit 4
Multimedia IT Presentation
Multimedia: Multimedia technology
Ad

Recently uploaded (20)

PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Structure & Organelles in detailed.
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Pharma ospi slides which help in ospi learning
PDF
RMMM.pdf make it easy to upload and study
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Pre independence Education in Inndia.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Classroom Observation Tools for Teachers
Cell Structure & Organelles in detailed.
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharma ospi slides which help in ospi learning
RMMM.pdf make it easy to upload and study
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
Pre independence Education in Inndia.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Ad

Multimedia Information Systems in Information Technology

  • 2. What is Multimedia? • Derived from the word “Multi” and “Media” – Multi • Many, Multiple, – Media • Tools that is used to represent or do a certain things, delivery medium, a form of mass communication – newspaper, magazine / TV. • Distribution tool & information presentation – text, graphic, voice, images, music and etc.
  • 3. Definition of Multimedia • Multimedia is a combination of text, graphic, sound, animation, and video that is delivered interactively to the user by electronic or digitally manipulated means. TEXT AUDIO GRAPHIC VIDEO ANIMATION IMAGE
  • 4. What is Multimedia? • Multimedia is used exclusively to describe multiple forms of media and content. –Multimedia concerns the representation of mixed modes of information as digital signals. –It includes a combination of text, audio and speech, video, images and graphics content forms • Multimedia represents the convergence of text, image, video and sound into a single form. –The power of multimedia and the Internet lies in the way in which information is linked.
  • 5. Course Outline Topic Contents Introduction Overview of Multimedia Types of Multimedia; Why Multimedia; Challenges in Multimedia Multimedia Data Representation Digital multimedia Characteristics; Audio Formats & MIDI; Image Formats & Color Models; Video Formats & Color Models Multimedia Data Compression Overview compression; Compression with Loss and Lossless; Static Coding: Huffman & Entropy; Adaptive Coding: LZW Multimedia Storage Basics of Optical Storage; Technological progress of Compact Disc(CD); Digital Video/Versatile Disc (DVD) Content-based Multimedia Retrieval Issues in Searching; Segmentation & Feature extraction; Similarity Measurement; Retrieval Effectiveness; Query Languages; Relevance and Feedback Query Expansion
  • 6. Evaluation • Test/Quiz at the end of each chapter (20%) • Assignments (10%) • Project (15%) • Final exam (45%) • Attendance & participation (10%) Reading Materials •V. S. Subrahmanian, Principles of Multimedia Database Systems, USA: Morgan Kaufmann Publishers, 1998. •C. Faloutsos, Searching Multimedia Databases by Content, Norwell, MA: Kluwer Academic Publisher, 1996. •Ralf Steinmetz and Klara Nahrstedt, Multimedia Fundamentals: Media Coding and Content Processing; Pearson Education, 2004. •V. S. Subrahmanian, and S. K. Tripathi, Multimedia Information Systems, Springer London, Limited, 1998.
  • 7. Media Types: Based on the Content • Are all multimedia information printable? • The content may be in the form of animation based on which multimedia is divided into conventional and new media • Conventional media (text, image, …) –The content is printable and present in paper or hardcopy format • New media (audio, video, …). –The content is non-printable and present only in softcopy format
  • 8. Media Types: Based on Human Perception • How do human perceive information? • Auditory media: – A media that transmits what humans hear – It includes sound, music and voice. • Visual media: – A media that transmits what humans see, observe and visualize – It includes text, still and moving pictures
  • 9. Media Types: Based on Time Dimensions • Discrete (or Static) media: it refers to text, graphics, and images as they are composed of time independent information item. – Information in these media consist exclusively of a sequence of individual elements without a time component. Indeed they may be displayed according to a wide variety of timing or even sequencing and still remain meaningful • Continuous (or Dynamic) media: refers to time-dependent media like sound, and video, where the presentation requires a continuous play-out as time passes. – Information is expressed as not only of its individual value, but also by the time of its occurrence. In other word, time dependency between information items is part of the information itself. – Thus if the timing of the items change, or the sequence is modified, the meaning of the items is altered.
  • 10. Multimedia System • A Multimedia System is a system capable of processing multimedia data and applications. – A Multimedia System is characterized by the processing, storage, generation, manipulation and rendition of Multimedia information, such as Image, Audio, Video, Text and Graphics. • Multimedia system represents a technology/tool used to process and combine two or more categories of information having different transport signal characteristics. • Multiple forms of information content are often considered as multimedia if they contain conventional media and new media, say image and audio or video. – Which of the following is a multimedia system? • a word processor that handles embedded graphics/image along text • macromedia flash that helps to create animated objects
  • 11. Properties of Multimedia System • Multimedia system handles discrete & continuous media – It is a system capable of handling at least one discrete and one continuous media in digital form – E.g. Multiple forms of information content are often not considered multimedia if they don't contain, say, audio or video. • It integrates and synchronizes the different medias simultaneously into a coherent framework. – Integrate and use minimal number of different devices for presentation of multimedia – Synchronize well the presentation of the result of the different media such that information flows in the correct order • Multimedia system must be computer controlled. – A digital device, like computer must be involved in the presentation of the multimedia information to users
  • 12. Challenges of Multimedia Computing Developing a successful multimedia system is non-trivial. • Memory space requirement: multimedia data need a lot of space to store – GB’s of main memory; TB’s of secondary storage; PB’s of tertiary storage • Data transmission bandwidth: Multimedia needs very high bandwidth to transmit. –Faster network (up to 25Mbs per video stream) with very high bandwidth to transmit • Complexity of multimedia data management: Multimedia needs more complex and more efficient algorithms, say for –Automatically analyzing, indexing & organizing information in audio, image & video is much harder than from text. They involve many different research issues. • Hardware platforms: Multimedia data need efficient hardware platforms –Better CPU, graphics card, video card, sound card
  • 13. Research Issues in Multimedia Computing •How can multimedia be efficiently stored and transmitted? – The need for compression and indexing •Can multimedia be retrieved by its content? – The need for proper segmentation and representation of an object from multimedia content through feature extraction and pattern analysis – The need for matching technique to effectively identify a video/audio/image that satisfy users need •How can we enhance quality of multimedia data? – Is the image as high-quality as users need? What could we do if the image is poor quality? •How can a user formulate a query for video/audio/image retrieval? – How we enable users to search for multimedia information retrieval using multimedia query, such that, for instance image by image search takes place
  • 14. Multimedia is a Multidisciplinary subject Image, audio, speech, video processing system Computer vision, pattern recognition Operating system, Computer networks Hum an-com puter interaction Computer graphics Multimedia computing
  • 15. Digital Audio, Image and Video
  • 16. Overview • Audio: used to record sound. – In the past 20 years, audio has moved from analog recording on tape cassettes to totally digital recording using computers. – Today, the Musical Instrument Digital Interface (MIDI) allow anyone to create music right on their desktop. MIDI is a digital standard that defines how to code musical scores, such as sequences of notes, timing conditions, and the instrument to play each note. • Image: – It is a 2-D object, which is stored as a specific arrangement of dots, or pixels. – It differs from graphics in that images can be captured from the real world, where as graphics are created by software & internally represented as an assemblage of primitive objects such as lines, curves, circles, polygons, and arcs. – Unlike Images, graphics are usually editable or revisable. • Video: – A series of framed images put together, one after another, to simulate motion and interactivity. A video can be transmitted by number of frames per second and/or the amount of time between switching frames. – The difference between video and animation is that video is broken down into individual frames.
  • 17. Digital Media • In computers, audio, image and video are stored as files just like other text files (e.g. DOC, TXT, TEX, etc.). – For images, these files can have an extension like • BMP, JPG/JPEG, GIF, TIF, PNG, PPM, … – For audios, the file extensions include • WAV, MP3, m4a, AMR, WMA… – The videos files usually have extensions: • MOV, AVI, MPEG, MP4, 3gp, … • What about PDF file? PS file? DAT file?
  • 18. Digital Media Capturing • To get a digital image, an audio or a video clip, we need some media capturing devices •Image: – is captured using devises such as a digital camera or a digital scanner •Audio: – is recorded using a digital audio recorder (or Microphone), such as Olympus Voice Recorder, MP3 digital recorder, SONY Voice Recorder, etc. •Video: – is recorded using a digital camcorder. – Camcorder is a video camera that records video and audio using a built-in recorder unit. The camcorder contains both a video camera and a video recorder in one unit and hence its compound name
  • 19. Advantage of digital media over analog ? • Is digital cameras do things that are not done by still cameras? • The following are some of the advantages of digital media – Displaying images/audios/videos on a screen immediately after they are recorded – Storing thousands of images/audios/videos on a single small memory device – Deleting images/audios/videos to free storage space – Digital camera enables recording video with sound; and camcorder enables capturing image. – What else???
  • 20. Convert Analog to Digital Media • Once the media is captured, there is a need to process them to convert the continuous signal to digital. Hence, all the devices used for capturing and digitization of the digital media have to complete the following tasks: • Sampling: converts a continuous media (analog signal) into a discrete set of values at regular time and/or space intervals. –Given an analog media, sampling represents a mapping of the media from a continuum of points in space (and possibly time, if it is a moving image) to a discrete set. • Quantization: converts a sampled signal into a signal that can take only a limited number of values (or bit depth). –E.g. an 8-bit quantization provides 256 possible values • Compression: There are probably some further compression process to reduce file size to save space. –Compression is minimizing the size in bytes of a media file without degrading the quality.
  • 21. Sampling Audio • Good sampling follows Nyquist sampling theorem – If we have a signal with frequency components, f1 < f2 <…<fmax, what is the sampling frequency we can use? – Nyquist Theorem states that, the sampling rate must be at least twice the highest analog frequency component, in hertz; that is. fs >= 2*fmax (where fmax is the highest frequency components in the signal). – If the sampling rate is less than 2fmax, some of the highest frequency components in the analog input signal will not be correctly represented in the digitized output. • When such a digital signal is converted back to analog form by a digital-to-analog converter, false frequency components appear that were not in the original analog signal. This undesirable condition is a form of distortion called aliasing. • Aliasing is a sampling effect that leads to spatial frequencies being falsely interpreted as other spatial frequencies.
  • 22. The problem of Sampling rate • For time-domain signals like the waveforms for sound (and other audio-visual content types), frequencies are measured in hertz (Hz) or cycles per second. – For example, if an audio signal has an upper limit of 20,000 Hz (the approximate upper limit of human hearing), according to Nyquist theorem a sampling frequency greater than 40,000 Hz (40 kHz) will avoid aliasing and allow theoretically perfect reconstruction. • For example, – For a range of Human Hearing (Music): 20Hz – 20KHz • We lose high frequency response with age; Women generally have better response than men • To reproduce 20 kHz requires a sampling rate of 40 kHz – For speech (like telephony) signal frequency is 5Hz–4KHz • According to Nyquist, it would take 8,000 samples (2 times 4,000) to capture a 4,000 Hz signal perfectly.
  • 23. Digital Audio • Music has more high frequency components than speech. –44 KHz is the sampling frequency for music. –8 kHz sampling is good enough for telephone quality speech, since all the energy is contained in the 5Hz – 4 KHz ranges. • Audio is typically recorded at 8-, 16-, and 20- bit depth. CD quality audio is recorded at 16-bit –You often hear an audio (music) which is quantized at 16 bits for each sampled data at 44 kHz. –16 bits means each sample is represented as a 16bit integer, which results in 65, 536 possible values.
  • 24. Sampling and Quantization of Image • The sampling theorem applies to 2D signal (images) too. Sampling on a grid • During sampling we have to determine the sampling rate, like every third pixel sampled. The intermediate pixels are filled in with the sampled values. Pixels are infinitely small point samples
  • 25. Types of Digital Images • Grayscale image – Usually we use 256 levels for each pixel. That means, the numerical value for gray levels range from 0 (for black pixels) to FF (256) for white. Thus we need 8 bits to represent each pixel (28 = 256) – Gray scale ranges from black to grays and finally to white. • Binary Image – A binary image has only two values (0 or 1). A numerical value may represent either a black (0) or a white (1) dot/pixel. – Binary image is quite important in image analysis and object detection applications. A 8 bit grayscale Image.
  • 26. Color Image R G B • Characterization of light is central to the science of color. • There are different color models: RGB, YUV, YIQ, HSV, CMYK, etc. color model 24 bit image
  • 27. RGB Color Model •To form a color with RGB, three separate color signals of one red, one green, & one blue must be mixed. Each of the three signals can have an arbitrary intensity, from fully off to fully on, in the mixture. –The RGB color model is an additive color mixing model using which every color can be encoded as a combination of red, green, & blue light. –Projection of primary color lights on a screen shows secondary colors where they overlap; for instance, the combination of all three of red, green, & blue in appropriate intensities makes white. R G B Red
  • 28. Color Table Image with 256 colors Clusters of colors •It is possible to use much less colors to represent a color image without much degradation.
  • 29. RGB Color Model • The main purpose of the RGB color model is for display of images in electronic systems, such as televisions and computers. – Typical RGB input devices are color TV & video cameras, image scanners, and digital cameras. – Typical RGB output devices are TV sets of various technologies (CRT, LCD, plasma, etc.), computer and mobile video projectors, phone displays, etc. – Color printers, on the other hand, are usually not RGB devices, but subtractive color devices (typically CMYK color model).
  • 30. RGB color model The figure shows an RGB image, along with its separate R, G and B components. Note that, –strong red, green, and blue produces white color; like wise, strong red and green with little blue gives brown; strong green with little red or blue gives dark green; strong blue and moderately strong red and green provides light blue sky. The number of bits used to represent each pixel in RGB space is called the pixel depth. –Consider an RGB image in which each of the red, green, and blue color is an 8-bit representation. Under these conditions each RGB color pixel have a depth of 24 bits. –Compute the total number of colors in a 24-bit RGB image ?
  • 31. Representing an Image • To represent an image without noticeable deterioration, we would have to use a matrix of at least 640 x 480 pixels. – How much space is required by the grey-scale image with such specification ? – Where each pixel is represented by an 8-bit integer, this image specification results in a matrix containing 307, 200 eight-bit numbers (or, a total of 2, 457, 600 bits or 307 KBs). • This is also true for video Graphics Array (VGA) or configuring graphics card of computers.
  • 32. Video Sampling and Quantization Frame N-1 Frame 0 time • Analog video signal is continuous in space and time and sampling considers both time and space. • Video sampling break the frame into 720 x 480 pixels (for US NTSC) or 704 x 576 pixels (for UK PAL ) • Video quantization is essentially the same as image quantization • During video quantization each pixel is represented by a bit depth of, say 8-bits representing luminance and color information.
  • 33. Color System in Video • Video signals are often transmitted to the receiver over a single television channel –In order to encode color, a video signal is decomposed into three sub-signals: a luminance signal and two color signals. –Since human vision is more sensitive to brightness than to color, a more suitable color encoding system separates the luminance from color information. Such models include YUV, YIQ, etc. Y U V  The YUV color model: While RGB model separates colors, YUV model separates brightness (luminance) information from the color information. Y is the luminance component (brightness) and U and V are color components –It is obtained from RGB using the following equations. Y = 0.299 R + 0.587 G + 0.144 B U = B – Y V = R - Y
  • 34. Color System in Video YIQ color model • YIQ color model is a similar encoding system like YUV. • It produces the I and Q colors and adds the modulated signal to the luminance Y. – It is obtained from RGB using the following equations. Y = 0.3 R + 0.59 G + 0.11 B I = 0.60 R – 0.28 G – 0.32 B Q = 0.21 R – 0.52 G + 0.31 B I Q
  • 35. Video Storing format & compression • Each video formats support various resolutions and color presentation. The following are the well-known video formats • The Color Graphics Adaptor (CGA): –Has a resolution of 320 x 200 pixels with simultaneous display of four colors –What the necessary storage capacity per frame ? • The Enhanced Graphics Adaptor (EGA): –Supports display resolution of 640 x 350 pixels with 16 simultaneous display colors –What the necessary storage capacity per frame ? • The Video Graphics Array (VGA): –Works mostly with a resolution of 640 x 480 pixels with 256 simultaneous display colors –What the necessary storage capacity per frame ? • The Supper Video Graphics Array (VGA): –Can present 256 colors at a resolution of 1024 x 768 pixels. –What the necessary storage capacity per frame ? –Other SVGA modes include 1280 x 1024 pixels and 1600 x 1280 pixels.
  • 36. Exercise • Suppose we have 24 bits per pixel available for a color image. We also note that humans are more sensitive to red and green colors than to blue, by a factor of approximately 1.5 times. How may we design a simple color representation to make use of the bits available? • Quite a simple scheme: – Since Blue is less perceptually important use less bits to represent blue color. Use proportionately more bits for red and green rather than blue – Therefore Red and Green use 9 bits each and Blue 6 bits to represent values – Need to quantize at different levels for blue and Red/green
  • 38. Multimedia Data Compression •Data compression is about finding ways to represent the content in fewer bits or bytes –It is the process of encoding information using fewer bits –For example, the ZIP file format, which provides compression, also acts as an archiver, storing many source files in a single destination output file. •As with any communication, compressed data communication only works when both the sender and receiver of the information understand the encoding scheme. –Thus, compressed data can only be understood if the decoding method is known by the receiver.
  • 39. Is compression useful? •Compression is useful because it helps reduce the consumption of expensive resources, such as hard disk space or transmission bandwidth. –save storage space requirement: handy for storing files as they take up less room. –speed up document transmission time: convenient for transferring files across the Internet, as smaller files transfer faster. •On the downside, compressed data must be decompressed to be used, and this extra processing may be detrimental to some applications. –For instance, a compression scheme for video may require expensive hardware for the video to be decompressed fast enough to be viewed as it's being decompressed –The option of decompressing the video in full before watching it may be inconvenient, and requires storage space for the decompressed video.
  • 40. Trade offs in Data Compression The design of data compression schemes therefore involves trade-offs among various factors, including • the degree of compression – To what extent the data should be compressed? • the amount of distortion introduced – To what extent quality loss is tolerated? • the computational resources required to compress and uncompress the data. – Do we have enough memory required for compressing and uncompressing the data?
  • 41. Types of Compression Lossless Compression Lossy Compression M m Lossless Compress M Uncompress M m Compress with loss M’ Uncompress M’  M M = Message/data Transmitted
  • 42. Data Compression Raw image takes about 6M bytes (without header information) 24k bytes with jpeg, Q=50
  • 43. Lossy and Lossless Compression •Lossless compression does not lose any data in the compression process. – Lossless compression is possible because most real-world data has statistical redundancy. It packs data into a smaller file size by using a kind of internal shorthand to signify redundant data. If an original file is 1.5MB, this technique can reduce up to half of the original size. – For example, in English text, the letter 'e' is more common than the letter 'z', and the probability that the letter 'q' will be followed by the letter 'z' is very small. – GIF image files and WinZip use lossless compression. For this reason zip software is popular for compressing program and data files. •Lossless compression has advantages and disadvantages. – The advantage is that the compressed file will decompress to an exact duplicate of the original file, mirroring its quality. – The disadvantage is that the compression ratio is not all that high, precisely because no data is lost. •To get a higher compression ratio -- to reduce a file significantly beyond 50% -- you must use lossy compression.
  • 44. Lossy and Lossless Compression •Lossy compression will strip a file of some of its redundant data. Because of this data loss, only certain applications are fit for lossy compression, like graphics, audio, and video. –Lossy compression necessarily reduces the quality of the file to arrive at the resulting highly compressed size. •Lossy data compression will be guided by research on how people perceive the data in question. –For example, the human eye is more sensitive to subtle variations in luminance (i.e. brightness) than it is to variations in color. –JPEG image compression works in part by "rounding off" some of this less-important information.
  • 45. Human visual system • What characteristics of the human visual system can be exploited in related to compression of color images and video? • The eye is basically sensitive to color intensity – Each neuron is either a rod or a cone . Rods are not sensitive to color. – Cones come in 3 types: red, green and blue. – Each responds differently --- Non linearly and not equally for RGB differently to various frequencies of light.
  • 46. Lossless vs. Lossy compression •Lossless & lossy compression have become part of our every day vocabulary due to the popularity of MP3 music file, JPEG image file, MPEG video file, … –A sound file in WAV format, converted to a MP3 file will lose much data as MP3 employs a lossy compression; resulting in a file much smaller so that several dozen MP3 files can fit on a single storage device, vs. a handful of WAV files. However the sound quality of the MP3 file will be slightly lower than the original WAV. Have you noticed that? –JPEG uses lossy compression, while GIF follows lossless compression techniques • Hence GIF compresses only up to 25%; as a result of which converting a GIF file to JPEG format will reduce it in size. It will also reduce the quality to some extent. •To compress video, graphics or audio, it is our personal choice and good results depend heavily on the quality of the original file.
  • 47. Example: Lossless vs. lossy compression •An example of lossless vs. lossy compression is the following string: –25.888888888 •This string can be compressed as: 25.9!8 • Interpreted as, "twenty five point 9 eights", the original string is perfectly recreated, just written in a smaller form. •In a lossy system it can be compressed as: 26 –In which case, the original data is lost, at the benefit of a smaller file size •The two simplest compression techniques are: Zero length suppression & run length encoding. –The above is a very simple example of run-length encoding,
  • 48. Run length encoding compression techniques • Data often contains sequences of identical bytes. By replacing these repeated byte sequences with the number of occurrences, a substantial reduction of data can be achieved. • In Run-length encoding, large runs of consecutive identical data values are replaced by a simple code with the data value and length of the run, i.e. (dataValue, LengthOfTheRun) • This encoding scheme tries to tally occurrence of data value (Xi) along with its run length, i.e.(Xi , Length_of_Xi)
  • 49. Run-length Encoding (RLE) • It compress data by storing runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) as a single data value & count. – This method is useful on data that contains many such runs. Otherwise, It is not recommended for use with files that don't have many runs as it could potentially double the file size. • For example, consider the following image with long runs of white pixels (W) and short runs of black pixels (B). WWWWWWWWWWBWWWWWWWWWBBBWWWWWWWWWWWW • If we apply the run-length encoding (RLE) data compression algorithm, the compressed code is : 10W1B9W3B12W (Interpreted as ten W's, one B, nine W's, three B's, …) • Run-length encoding performs lossless data compression. • It is used in fax machines (combined with Modified Huffman coding). It is relatively efficient because faxed documents are mostly white space, with occasional interruptions of black.
  • 50. Zero length suppression compression techniques • Zero length suppression: if in a sequence a series on n successive tokens appears we can replace these with a token and a count of number of occurrences. we usually need to have a special code to denote when the repeated token appears • Example: given the number 894000000 … 0 (where there are 32 zeros) zero length replace it with 894f32 where f is the code of zero
  • 51. Application: Lossless vs. lossy compression • For symbolic data such as spreadsheets, text, executable programs, etc., losslessness is essential because changing even a single bit cannot be tolerated. • For visual and audio data, some loss of quality can be tolerated without losing the essential nature of the data. –By taking advantage of the limitations of the human sensory system, a great deal of space can be saved while producing an output which is nearly indistinguishable from the original. –In audio compression, for instance, non-audible (or less audible) components of the signal are removed. • Lossy compression is used for: –image compression in digital cameras, to increase storage capacities with minimal degradation of picture quality –audio compression for Internet telephony and CD ripping, which is decoded by audio players. –video compression in DVDs with MPEG format.
  • 52. Lossless vs. Lossy compression • Generally, the difference between the two compression technique is that: – Lossless compression schemes are reversible so that the original data can be reconstructed, – Lossy schemes accept some loss of data in order to achieve higher compression. • These lossy data compression methods typically offer a three-way tradeoff between – Computer resource requirement (compression speed, memory consumption) – compressed data size and – quality loss.
  • 53. Common compression methods •Statistical methods: –It requires prior information about the occurrence of symbols E.g. Huffman coding and Entropy coding •Estimate probabilities of symbols, code one symbol at a time, shorter codes for symbols with high probabilities •Dictionary-based coding –The previous algorithms (both entropy and Huffman) require the statistical knowledge which is often not available (e.g., live audio, video). –Dictionary based coding, such as Lempel-Ziv (LZ) compression techniques do not require prior information to compress strings. •Rather, replace symbols with a pointer to dictionary entries
  • 54. Common Compression Techniques •Compression techniques are classified into static, adaptive (or dynamic), and hybrid. •Static coding requires two passes: one pass to compute probabilities (or frequencies) and determine the mapping, & a second pass to encode. • Examples: Huffman Coding, entropy encoding •Adaptive coding: –It adapts to localized changes in the characteristics of the data, and don't require a first pass over the data to calculate a probability model. All of the adaptive methods are one-pass methods; only one scan of the message is required. –The cost paid for these advantages is that the encoder & decoder must be complex to keep their states synchronized, & more computational power is needed to keep adapting the encoder/decoder state. –Examples: Lempel-Ziv and Adaptive Huffman Coding
  • 55. Adaptive coding Adaptive method • Encoder Initialize the data model as per agreement. While there is more data to send – Encode the next symbol using the data model and send it. – Modify the data model based on the last symbol. • Decoder Initialize the data model as per agreement. While there is more data to receive – Decode the next symbol using the data model and output it. – Modify the data model based on the decoded symbol. Static method • Encoder Initialize the data model based on a first pass over the data. Transmit the data model. While there is more data to send – Encode the next symbol using the data model and send it. • Decoder Receive the data model. While there is more data to receive – Decode the next symbol using the data model and output it. • The key in adaptive model is that, both encoder and decoder use exactly the same initialize model and encode/decode model.
  • 56. Compression model •Almost all data compression methods involve the use of a model, a prediction of the composition of the data. –When the data matches the prediction made by the model, the encoder can usually transmit the content of the data at a lower information cost, by making reference to the model. –In most methods the model is separate, and because both the encoder and the decoder need to use the model, it must be transmitted with the data. •In adaptive coding, the encoder and decoder are instead equipped with identical rules about how they will alter their models in response to the actual content of the data –both start with a blank slate, meaning that no initial model needs to be transmitted. –As the data is transmitted, both encoder and decoder adapt their models, so that unless the character of the data changes radically, the model becomes better-adapted to the data it's handling and compresses it more efficiently.
  • 57. Data Compression = Modeling + Coding Data Compression consists of taking a stream of symbols and transforming them into codes. –The model is a collection of data and rules used to process input symbols and determine their probabilities. –A coder uses a model (probabilities) to assign codes for the given input symbols We will take Huffman coding to demonstrate the distinction: Input Stream Model Output Stream Symbols Probabilities Codes Encode r
  • 58. Huffman coding •Developed in 1950s by David Huffman, widely used for text compression, multimedia codec and message transmission •The problem: Given a set of n symbols and their weights (or frequencies), construct a tree structure (a binary tree for binary code) with the objective of reducing memory space and decoding time per symbol. •For instance, Huffman coding is constructed based on frequency of occurrence of letters in text documents D3 D4 D1 D2 0 0 0 1 1 1 Code of: D1 = 000 D2 = 001 D3 = 01 D4 = 1
  • 59. Huffman coding •The Model could determine raw probabilities of each symbol occurring anywhere in the input stream. pi = # of occurrences of Si Total # of Symbols •The output of the Huffman encoder is determined by the Model (probabilities). –The higher the probability of occurrence of the symbol, the shorter the code assigned to that symbol and vice versa. –This will enable to easily control the most frequently occurring symbols in in a data and also reduce the time taken during decoding each symbols.
  • 60. How to construct Huffman coding Step 1: Create forest of trees for each symbol, t1, t2,… tn Step 2: Sort forest of trees according to falling probabilities of symbol occurrence Step 3: WHILE more than one tree exist DO – Merge two trees t1 and t2 with least probabilities p1 and p2 – Label their root with sum p1 + p2 – Associate binary code: 1 with the right branch and 0 with the left branch Step 4: Create a unique codeword for each symbol by traversing the tree from the root to the leaf. – Concatenate all encountered 0s and 1s together during traversal • The resulting tree has a prob. of 1 in its root and symbols in its leaf node.
  • 61. Example • Consider a 7-symbol alphabet given in the following table to construct the Huffman coding. Symbol Probability a 0.05 b 0.05 c 0.1 d 0.2 e 0.3 f 0.2 g 0.1 • The Huffman encoding algorithm picks each time two symbols (with the smallest frequency) to combine
  • 62. Huffman code tree • Using the Huffman coding a table can be constructed by working down the tree, left to right. This gives the binary equivalents for each symbol in terms of 1s and 0s. • What is the Huffman binary representation for ‘café’? d f g 0 0 1 1 0 1 0 0 1 1 0 1 0.4 0.6 0.3 0.2 0.1 1 c a b e
  • 63. Algorithm procedure HuffmanCode(H,n) // H is the Huffman tree for i = 1 to n-1 do r = new Nodetype rlchild = least(H) rrchild = least(H) rfrequency = rlchildfrequency + rrchildfrequency insert(H,r) end for return (H) end procedure
  • 64. Word level example • Given text: “for each rose, a rose is a rose” – Construct the Huffman coding
  • 65. Entropy encoding • Information theory deals with the questions of “information content” of a data source, also referred to as the entropy of the source. – the "information content" can be viewed as how much useful information the message actually contains. – The entropy, in this context, is the expected number of bits of information contained in each message, taken over all possibilities for the transmitted message. • According to Shannon, the entropy of an information source S is defined as: H(S) = Σi (pi log 2 (1/pi )) – log 2 (1/pi ) indicates the amount of information contained in symbol Si , i.e., the number of bits needed to code symbol Si .
  • 66. Entropy encoding •Example. What is the entropy of a gray-scale image with uniform distribution of gray-level intensity? –The entropy of the image, H(S)= Σi (1/256 log 2 (1/1/256))= 8 bits, which indicates that 8 bits are needed to code each gray level •Question 1: What is the entropy of a source with M symbols where each symbol is equally likely? • Entropy, H(S) = log2 M •Question 2: How about an image in which half of the pixels are white and half are black? • Entropy, H(S) = 1
  • 67. Entropy Encoding • Entropy is a measure of how much information is encoded in a message. Higher the entropy, higher the information content. – We could also say entropy is a measure of uncertainty in a message. Information and Uncertainty are equivalent concepts. • The units (in coding theory) of entropy are bits per symbol. It is determined by the base of the logarithm: 2: binary (bit); 10: decimal (digit). • Entropy gives the actual number of bits of information contained in a message source. • Example: If the probability of the character ‘e’ appearing in this slide is 1/16, compute the information content of this character? – H(S) = 4 bits. – So, the character string “eeeee” has a total content of 20 bits (in contrast the use of an 8-bit ASCII coding result in 40 bits to represent “eeeee”).
  • 68. The Shannon-Fano Encoding Algorithm 1. Calculate the frequencies of each of the symbols in the list. 2. Sort the list in (decreasing) order of frequencies. 3. Divide the list into two half’s, with the total frequency counts of each half being as close as possible to the other. 4. The right half is assigned a code of 0 and the left half with a code of 1. 5. Recursively apply steps 3 and 4 to each of the halves, until each symbol has become a corresponding code leaf on a tree.
  • 69. The Shannon-Fano Encoding Algorithm Symbol Count Info. -log2(pi) Code Number of Bits A 15 1.38 00 30 B 7 2.48 01 14 C 6 2.70 10 12 D 6 2.70 110 18 E 5 2.96 111 15 It takes a total of 89 bits to encode 85.25 bits of information. x x x x x 85.25 89 Symbol Count B A D C E 7 15 6 6 5 0 0 1 1 1 0 1 0 1 1 1 0 • Example: Given symbols A to E and their corresponding frequency counts encode them using Shannon-Fano entropy encoding
  • 70. Exercise • Given the following symbols and their corresponding frequency of occurrence, find an optimal binary code for compression: a. Using the Huffman algorithm b. Using Entropy coding scheme Character: a b c d e t Frequency: 16 5 12 17 10 25
  • 71. Lempel-Ziv Encoding • Data compression up until the late 1970's mainly directed towards creating better methodologies for Huffman coding. • An innovative, radically different method was introduced in1977 by Abraham Lempel and Jacob Ziv. • This technique (called Lempel-Ziv) actually consists of two considerably different algorithms, LZ77 and LZ78. • Due to patents, LZ77 and LZ78 led to many variants: • The zip and unzip use the LZH technique while UNIX's compress methods belong to the LZW and LZC classes. LZ77 Variants LZR LZSS LZB LZH LZ78 Variants LZW LZC LZT LZMW LZJ LZFG
  • 72. Lempel-Ziv compression •The problem with Huffman coding is that it requires knowledge about the data before encoding takes place. –Huffman coding requires frequencies of symbol occurrence before codeword is assigned to symbols •Lempel-Ziv compression: –Not rely on previous knowledge about the data –Rather builds this knowledge in the course of data transmission/data storage –Lempel-Ziv algorithm (called LZ) uses a table of code-words created during data transmission; •each time it replaces strings of characters with a reference to a previous occurrence of the string.
  • 73. Lempel-Ziv Compression Algorithm • The multi-symbol patterns are of the form: C0C1 . . . Cn- 1Cn. The prefix of a pattern consists of all the pattern symbols except the last: C0C1 . . . Cn-1 Lempel-Ziv Output: there are three options in assigning a code to each symbol in the list • If one-symbol pattern is not in dictionary, assign (0, symbol) • If multi-symbol pattern is not in dictionary, assign (dictionaryPrefixIndex, lastPatternSymbol) • If the last input symbol or the last pattern is in the dictionary, asign (dictionaryPrefixIndex, )
  • 74. Example: LZ compression • Example: Given a word, aaababbbaaabaaaaaaabaabb containing only two letters, a and b, compress it using LZ technique. Steps in Compression • First, split the given word into pieces of symbols – In the example, the first piece of our sample text is a. The second piece must then be aa. If we go on like this, we obtain the breakdown of data as illustrated below: – Note that, the shortest piece of data is the string of characters that we have not seen so far. seen unseen
  • 75. LZ Compression •Second, index the pieces of text obtained in the breaking- down process from 1 to n. – The empty string (start of text) has index 0, a has index 1, ... •Third, number the pieces of data using the above indices. –Thus a, with the initial string, is numbered Oa. String 2, aa, is numbered 1a, because it contains a, whose index is 1, and the new character a. Proceed numbering all the pieces in terms of those preceding them. •Is replacing characters by integers compress the given text ?
  • 76. LZ Compression •Now, compute how many bits needed to represent this coded information. –each piece of text is composed of an integer and an alphabet. •The number of bits needed to represent each integer with index i is at most equal to the number of bits used to represent the (i -1)th index. For example, –the number of bits needed to represent 6 in piece 8 is equal to 3, because it takes three bits to express 7 (the (n-1)th index) in binary. •One of the advantages of Lempel-Ziv compression is that in a long string of text, the number of bits needed to transmit the coded information is peanuts compared to the actual length of the text. –E.g. To transmit the actual text aab, 24 bits (8 + 8 + 8) needed, where as for the code 2b, 12 bits needed.
  • 77. LZ Compression Algorithm Dictionary  empty ; Prefix  empty ; DictionaryIndex  1; while(symbolStream is not empty) Symbol  next symbol in symbolStream; if(Prefix + Symbol exists in the Dictionary) Prefix  Prefix + Symbol ; else if(Prefix is empty) CodeWordForPrefix  0 ; else CodeWordForPrefix  DictionaryIndex for Prefix ; Output: “CodeWordForPrefix, Symbol” ; insertInDictionary( ( DictionaryIndex , Prefix + Symbol) ); DictionaryIndex++ ; Prefix  empty ; end else end while if(Prefix is not empty) CodeWordForPrefix  DictionaryIndex for Prefix; Output: “CodeWordForPrefix , “; end if
  • 78. Example 2: LZ Compression Encode (i.e., compress) the string ABBCBCABABCAABCAAB using the LZ algorithm. The compressed message is: (0,A)(0,B)(2,C)(3,A)(2,A)(4,A)(6,B) Note: The above is just a representation, the commas and parentheses are not transmitted;
  • 79. Example 2: Compute Number of bits transmitted • Consider the string ABBCBCABABCAABCAAB given in example 2 (previous slide) and compute the number of bits transmitted: Number of bits = Total No. of characters * 8 = 18 * 8 = 144 bits • The compressed string consists of codewords and the corresponding codeword index as shown below: Codeword: (0, A) (0, B) (2, C) (3, A) (2, A) (4, A) (6, B) Codeword index: 1 2 3 4 5 6 7 • Each code word consists of a character and an integer: – The character is represented by 8 bits – The number of bits n required to represent the integer part of the codeword with index i is given by: Codeword (0, A) (0, B) (2, C) (3, A) (2, A) (4, A) (6, B) Index 1 2 3 4 5 6 7 Bits: 1 + 8) + (1 + 8) + (2 + 8) + (2 + 8) + (3 + 8) + (3 + 8) + (3 + 8) = 71 bits • The actual compressed message is: 0A0B10C11A010A100A110B – where each character is replaced by its binary 8-bit ASCII code.
  • 80. Example 3: Decompression Decode (i.e., decompress) the sequence (0, A) (0, B) (2, C) (3, A) (2, A) (4, A) (6, B) The decompressed message is: ABBCBCABABCAABCAAB
  • 81. Exercise Encode (i.e., compress) the following strings using the Lempel-Ziv algorithm. 1. ABBCBCABABCAABCAAB 2. SATATASACITASA.
  • 82. Assignment • Nowadays Huffman encoding is also modified to adaptive Huffman encoding, modified Huffman encoding and dynamic Huffman encoding • On the given one of the topic – Provide an overview (What it means?) – Show algorithm with example (How it works?) – Explain significance (Why we need it?) – Conclusion – References
  • 84. Choice of storage • Multimedia data needs more storage than others • Choice of storage media depends on user’s circumstances –Quantity and type of information at stock, –Required access time & transfer rate –Stability of data –Number of users & their skills • Optical Storage media continues to be extremely popular in computer systems, particularly for Multimedia applications
  • 85. Optical Storage •Optical storage deals with data storage and is usually considered as a type of tertiary storage. –Tertiary storage comes in the form of low-cost removable media, such as CD-ROMs and floppy disks, while secondary storage comes in the form of the hard disks found within your computer. •Optical storage differs from other types of storage media, such as floppy disks, hard disks, magnetic tapes and flash memory: –Optical storage vary in material composition, technology, and storage capacity, and are mostly cheaper (cost per data bit -wise). –Optical media have higher recording densities. Though hard disks can store larger amounts of data, one must consider the bulkiness of a hard disk compared to the slimness of optical media
  • 86. Advantages of Optical Storage •Storage Capacity –It has huge capacity; a 4.7-inch CD can hold over 700 Megabytes of data. •Compatibility –Readability of all varieties of CD by any of the huge number of available CD drives •Durability –A laser is used to store and retrieve data on an optical disc, and nothing comes into contact with the recording surface –Optical discs can be accessed thousands of times and will last for decades without deterioration •Scalability –Optical storage technology provides a variety of storage capacities with room to grow from megabytes to terabytes
  • 87. Advantages of Optical Storage •Accessibility –Unused data can be stored in an easily accessible optical library. –This enables fast storage and retrieval of backup and archive data. –About 100 times faster than magnetic tape •Portability –CDs are extremely robust and durable –They are removable and portable –They can be transported securely •Affordability –The cost of CDs is cheaper; it costs just a not more than three BIRR to spend. –How much CD-R and CD-RW costs? What about DVD?
  • 88. Advantages over Magnetic disk •Higher data density –Store more data bit per inch •Long-term storage –Insensitive to scratch / dust •Low probability of head crashes –Distance between head & the disk is more than 1mm •Adequate error correction –Allows error handling •Quality –Holds high quality multimedia
  • 90. Types of Optical Storage • Optical storage media can be classified according to their reading technology: –the read-only CD, CD-ROM, DVD-ROM, and DVD-Video; –the write-once CD-R and DVD-R, both of which use WORM (Write-Once, Read-Many-times) technology –the rewritable CD-RW, DVD-RAM, and DVD-RW. Thus, R in CD-R & DVD-R means "Recordable", RW means "Rewritable", ROM means "Read Only Memory", RAM means "Random Access Memory". • Most optical storage media are optical disks, such as CDs. –The data on optical disks are usually accessed by a laser beam touching the disc's surface. –A 'sub-type' of optical disks is the phase-change disk, which uses a material that can freeze into either a crystalline or amorphous state. Phase-change disks allow rewritable optical media, such as CD-RWs and DVD-RWs. –On the other hand, magneto-optic disks straddle the line, as they're made of magnetic recordable material but use optical technology (i.e. laser) to record the data.
  • 91. Basic CD technology Basics •The most common form of optical storage is the Compact Disk (CD). –Even with the arrival of DVDs and other more powerful optical media, CDs remain a massively popular way for industries to package software, games, music, and movies. –Ordinary computer users often have a soft spot for CDs and the CD burner hardware of their PCs, as these discs provide low-cost and easy-to-use back-up for and physical transfer of data files. –The CD is a thin wafer of polycarbonite plastic with a thin metal layer –120mm diameter (4.7 inches)
  • 92. Basic CD technology • Data storage: – For data storage the CD is divided into logical sectors (max. 99). Normally there are 75 sectors, and each sector can hold 2 Kbytes – Capacity for a 74 minute CD is 74 X 60 secs X 75 sectors X 2 Kbytes = 660,000 Kbytes = 650 Megabytes • Because the CD is originally based on audio technology the track is divided as: minutes:seconds:sectors – Tracks contains sequential arrangement of pits & lands. The "holes" on the CD are called pits, while the flat places (i.e. unburned areas) around these holes are called lands. – A continuous spiral of data is recorded starting at the inner edge to the outside edge. • How does a CD record data? – Data is recorded on the disc using a laser beam which burns pits (a series of holes) in the disc surface. Presence of a pit represents a 1, while Absence of a pit (a ‘land’) represents 0
  • 93. How does a CD record data
  • 94. 105 Table of Contents • A CD-ROM has a table of contents (TOC) at the beginning. It serves a similar purpose to the file allocation table and root directory found on a hard disk, it allows the files to be found. – A.k.a. index of the disc. • Multi-session CDs allow data to be written in various sessions, that is for data to be appended (not overwritten) at a later time. – Such CDs have a table of contents for each session. – The new TOC contains the old info plus the new. – Such CDs cannot be read by ordinary drives unless they are “finalized”. • Single Session vs. Multiple Session – With single-session CDs, the TOC is easily located by the drive. Multi-session CDs drives need to be able to find the latest TOC. – Many older CD drives do not have this capability. – Reading a CD-RW requires a multi-session capability, so it is becoming standard.
  • 95. How does a CD record data Channel bits are stored as pits and lands on a CD where • a change between pit and land (or vice versa) corresponds to a ”1” • no change corresponds to a ”0” Example:
  • 96. Optical Storage Types: Audio CD and CD- ROM •Audio CD –The compact disc (CD) which is developed by Philips & Sony Corporation in the 1980s, were audio CDs for storing audio data. –It had a capacity of • 74Min play back • 650 MB •In 1984, CD-ROMs went beyond audio, –It added software, computer games, encyclopedias, movies, and more. –It also boasted memory capacity to 747 MB & low manufacturing cost.
  • 97. Optical Storage Types: CD-ROM •CD-ROMs mainly differ from audio CDs in terms of error-correcting code. –While it might be tolerable for an audio CD to have errors (e.g. from time to time, the music skips while playing), it is definitely not tolerable for computer programs, as even the smallest software defect can render the whole program unusable. This means that CD-ROMs have to contain a larger amount of error- correcting code needed to safely store data. •Philips added graphics to the CD-ROM, as well as the ability to interleave audio, video, and data. This made the CD into a true "multimedia" medium. –With the introduction of standardized CD-ROM file system called High Sierra, any standards-conformant CD-ROM readable in any computer running Windows/MS-DOS, Unix, etc. •CD-ROM Drive Speeds –It's good to remember that while CD-ROMs are economical, CD drives aren't up to par with your computer's hard disk. –Hard disks are at an entirely higher performance category, as these can transfer and access data much faster than CD drives. –Speed of most CD-ROM drives today hover around 50x
  • 98. Optical Storage Types: CD-R •CD-Rs and CD-RWs maintain a lot of the features of CDs and CD-ROMs; that’s why they’re still called compact discs and this pair highlights the improvements in optical storage technology. •CD-R (CD-Recordable) –CD-Rs are WORM (Write Once, Read Many) discs that give people a cheaper means of storing data in compact discs. –It allows user to write once & read many times • Enables CDs to be recorded when needed at the user’s local computer • Once created cannot be overwritten –Unfortunately, the arrival of these low-cost, easy to use CD-Rs also helped spread software, music, and movie piracy. –CD-Rs look like regular CD-ROMs except that they are gold- colored instead of silver. This is due to the use of gold instead of aluminum, which is used in regular CDs. These discs contain 0.6mm-wide grooves that guide the laser for writing data.
  • 99. Optical Storage Types: CD-RW •CD-RW (CD-Rewritable) –CD-RWs represent the next step in CD technology after the CD-R. These discs use the same standard size of CD-Rs but are more expensive than them. –CD-RWs allow many writes onto the compact disc, in contrast to the WORM CD-R. • CD rewritable means the data on the disc can be erased and new data written to the disc • Requires special CD-RW discs –CD-Rs aren't obsolete with the availability of CD-RWs. CD-Rs can still be used as cheaper backup media, as well as more secure storage – unlike CD-RWs, CD-Rs can only be written once, which means you can't accidentally erase the stored data with another write process
  • 100. 111 Digital Versatile/Video Disk (DVD) • The size of software and data files continues to grow, so the CD with its 650 MB capacity is becoming too limited. • A higher capacity alternative is the DVD which stands for either digital video disk or digital versatile disk. – Although some will now say DVD doesn’t stand for anything. • A DVD is just a variation on a CD, information is read from the disc by reflecting light from its surface. – The differences between DVDs and CDs is a matter of speed and capacity (DVDs are better on both counts) and logical format. – DVDs have a higher standard data transfer rate – 1.32 MB/s compared to 150 KB/s for CD-DA – about nine times faster.
  • 101. Optical Storage Types: DVD •The beginnings of the DVD format may be traced back to the 1990s, where two optical storage formats were in the works; –Multimedia Compact Disc (MMCD) and the Super Density Disc (SDD). •DVD (Digital Video Disc or Digital Versatile Disc) may easily be mistaken for an ordinary compact disc, but what sets it apart is –the amount of data that can be stored in it (4.7 gigabytes), as well as technology that makes this possible. •Digital Video Disk –Used to indicate a player for movies. It only plays video disks •Digital Versatile Disk –Used to indicate a computer drive. It will read computer disks and play video disks
  • 102. • To squeeze all this information onto the CD-sized disc, the designers of the DVD disc made several changes from the compact disc. • First they made pits and lands used to record data and the track spacing nearly half the size of the original CD design. • Then, they made the discs double sided and added another data layer to each side creating a potential for four layers of data per disc. DVD technology
  • 103. Optical Storage Types: DVD •Why we need DVD? –Since DVDs can hold large amount of space (several gigabytes), these optical discs were unmistakably built for the heightened home movie experience. –DVDs can hold around two hours of high-quality (with 700 x 480 video resolution) digital video (using MPEG-2 compression), plus digital audio. –One highlight of watching movies in DVDs is the ability to display the natural scene in true widescreen format. –These days DVDs have also made their way into video game consoles. They enable to have impressive picture quality, realistic PC games…more video into the multimedia productions, which adds more traffic implications over the net.
  • 104. Difference between CD & DVD disc • CD is usually for computer files, music and pictures. DVD holds more, because they're for movies, animations, etc. – You can use DVD to store data and music if you want to, but they're just a tad more expensive. • DVDs are produced using the same concept of pits and lands applied to CDs. The important difference incorporated into DVDs are: – More compact packing of the pits/holes: 1.6 microns in between for CDs, 0.74 microns for DVDs. – Writes data in smaller pits; such that for the same available area, more data can be stored : 0.8 microns for CDs, 0.4 microns for DVDs. – Use of a red laser at a smaller wavelength: 0.78 microns for CDs, 0.65 microns for DVDs. • Moreover, the available data area for DVD disc is larger than the one of CD. – A recordable CD disc has the capacity of 700MB, while a DVD-/+R disc has about 4.7GB. – The DVD is 6 fold increase in storage than the CD.
  • 105. •Compared to CD, DVD uses smaller pits and a more closely spaced track. The result is a significant increase in data density. Thus Bits are packed more closely in DVD’s. •Uses smaller pits and lands, reduced track spacing •Can also include another data layer and/or made double sided
  • 108. DVD Technology •High capacity storage medium –Employs second layer of pits & lands on top of first layer, by adjusting the focus of laser reading both layer is possible  doubles the capacity (8.5 GB) –Two sided doubles the capacity (17 GB) •DVD Formats –Single sided single layer (SS/SL): Can hold 4.7 GB worth of data = 2 hours video –Single sided dual layer (SS/DL) : Can hold 8.5 GB = 4 hours video –Double sided single layer : Can hold 9.4 GB = 4.5 hours video –Double sided dual layer: Can hold 17 GB = 8 hours video
  • 109. DVD Types •DVD-Video – Released in 1996 by the DVD Forum, DVD-V is used primarily for viewing movies and other visual entertainment, prerecorded on these discs. – They are interactive and contain features that enhance your movie- viewing experience. – Total capacity 17 gigabytes (double-sided) – Another characteristic of DVD-Video is its support for copy- protective measures, such as Regional Protection and CSS (content scrambling system). Such measures were implemented to prevent piracy. •DVD-ROM – Basic technology same as DVD Video, but also includes computer- friendly file formats. – Used to store data
  • 110. DVD Types • DVD-R –DVD-Recordables, or DVD-Rs, or DVD-dash-Rs, are the first and most popular formats of recordable DVDs. As with CD-R, users can write only once to this disk. –They are highly expensive and uncommon discs used for professional needs, as they allow recording of any data; –DVD-R are more available to consumers, but do not allow copying of protected DVDs. –Capacity 4.7 gigabytes. •DVD-RAM –This makes DVD a virtual hard disk, with random read-write access. –Capacity 4.7 gigabyte-per-side. –Can be re-written more than 100,000 times. –The DVD-RAM works like a hard disk.
  • 111. DVD Types • DVD-RW – Just like CD-RWs, DVD-RW discs change state under a laser for it to be rewritten on. DVD-RWs reach up to 1000 instances of rewritings. – One drawback of these discs is that because they have relatively lower reflectivity and are consequently mistaken as dual-layer DVDs, DVD-RWs are compatible with only around 70% of the players out there. – It is similar to DVD-RAM – Features a sequential read-write access more like a phonograph than a hard disk. – Capacity is 4.7 gigabytes per side. – Can be re-written up to about 1,000 times. • DVD-Audio – The latest audio format with more than double the fidelity of a standard CD. – Because of its much higher capacity, DVDs can make space for much higher audio quality. – However, audio on DVD has never really caught up with audio CDs because people don’t need extremely high-quality music, as they are content even with compressed MP3 formats.
  • 112. DVD Types DVD+R and DVD+RW (plus-Rs or plus-RWs) •DVD+R and DVD+RWs provide for: – lossless linking: • no need to re-record a whole disc if only part of it needs updating, – better error handling, – Easy Write or Mount: • twice the maximum writing speed of DVD-RWs – Rainier technology • transforming the disc into an ordinary floppy or hard drive •Compatibility issues: support for DVD+R and DVD+RW may only be found in specialized or high-end hardware and software.
  • 113. DVD Types DVD-VR and DVD+VR (DVD Video Recording discs) •Like most DVD discs, DVD-VRs & DVD+VRs were made for videos. •This is taken a step further, though, as these Video Recording formats allow you to create videos on these discs so that they can be edited fully. •Possible Features with the DVD VRs: – adding new video content, – changing menu backgrounds, – inserting chapters, – splitting clips, or – removing unwanted scenes. •Compatibility issues: As for the "minus" versus "plus" formats, the same rule of thumb regarding incompatibility applies: DVD-VRs and DVD+VRs are not usually playable in ordinary DVD players and must be used compatible devices with DVD VRs.
  • 114. Blu-ray Technology • Blu-ray Disc (BD) is a digital optical disc data storage format. • It was designed to supersede the DVD format, in that it is developed to enable recording, storing, rewriting, and playback of high-definition and ultra high-definition video with up to 2160p resolution (3840×2160 pixels). • In 1997, DVDs revolutionized the movie industry. • Now, the Blu-ray technology is having the same effect on DVDs. With a smaller wavelength, one can distinguish smaller/closer objects. In this case, the smaller wavelength allows the pits and the lands to be smaller and closer together on a Blu-Ray than on a DVD.
  • 115. BD construction • While current optical disc technologies such as DVD rely on a red laser to read and write data, BD uses a blue-violet laser instead, hence it’s name Blu-ray • Blu-ray Disc come in single layer (25 GB capacity), dual layer (50 GB). Triple-layer discs (100 GB) and quadruple-layers (128 GB) are available for BD- XL re-writer drives.
  • 116. How BD works • The benefit of using a blue-violet laser is that it has a shorter wavelength than a red laser, which makes it possible to focus the laser spot with even greater precision. – This allows data to be packed more tightly and stored in less space, so it's possible to fit more data on the disc even though it's the same size as a CD/DVD. – The shorter wavelength can be focused to a smaller area, thus enabling it to read information recorded in pits that are less than half the size of those on a DVD, and can consequently be spaced more closely, resulting in a shorter track pitch, enabling a Blu-ray Disc to hold about five times the amount of information that can be stored on a DVD.

Editor's Notes

  • #20: In film and video, footage is the raw, unedited material as it had been originally recorded by video camera, which usually must be edited to create a motion picture, video clip, television show or similar completed work.
  • #52: Before we look at Information theory lets make a clear distinction between lossless compression and compression with loss, or sometimes referred to as lossy compression. Notice from the two figures: When lossless compression is used the compressed media, M, does not loose any content, therefore, uncompressing it restores the media to its native state, M. On the other hand with a lossy compression, the compressed media when uncompressed is different from the original media. Depending on the mechanism used the difference might be too subtle to notice.
  • #68: Information theory has motivated the idea that a Data source has an entropy that gives us the inherent information content it possess. If we can find codes to assign to symbols that will result in the data source being encoded in the fewest number of bits as indicated by their entropy then we can achieve maximum compression. That is, if the encoding of the data source reflects its entropy then we would have reached the optimal (minimal) coding for the source. There are two components to compression: Modeling and Coding. The model involves reasoning that does into capturing the
  • #69: Information theory has motivated the idea that a Data source has an entropy that gives us the inherent information content it possess. If we can find codes to assign to symbols that will result in the data source being encoded in the fewest number of bits as indicated by their entropy then we can achieve maximum compression. That is, if the encoding of the data source reflects its entropy then we would have reached the optimal (minimal) coding for the source. There are two components to compression: Modeling and Coding. The model involves reasoning that does into capturing the
  • #76: Information theory deals with the questions of “information content” of a data source, also referred to as the entropy of the source. The entropy H of a source S is given by the formula H(S)…, where, P sub I is the probability of occurrence of symbol S sub I The formula simply states that the information content of a source is given by the sum of the logarithms of the information content of each symbol weighed by its probability. The information content of a given symbol S sub I is given by log 1 over P sub I to the base 2. The units are bits. The term (log1 over P_I) is sometimes referred to as the uncertainty of the symbol S_I. The greater the probability of occurrence of a symbol lower its uncertainty and hence fewer bits are needed to represent it. Similarly lower the probability of occurrence of a symbol higher its uncertainty and hence more bits are needed to represent it. Observe that the entropy of a source is highest when all symbols are equally likely. Work the two questions out while you are on this slide, they are simple applications of the Entropy formula.
  • #77: Information theory deals with the questions of “information content” of a data source, also referred to as the entropy of the source. The entropy H of a source S is given by the formula H(S)…, where, P sub I is the probability of occurrence of symbol S sub I The formula simply states that the information content of a source is given by the sum of the logarithms of the information content of each symbol weighed by its probability. The information content of a given symbol S sub I is given by log 1 over P sub I to the base 2. The units are bits. The term (log1 over P_I) is sometimes referred to as the uncertainty of the symbol S_I. The greater the probability of occurrence of a symbol lower its uncertainty and hence fewer bits are needed to represent it. Similarly lower the probability of occurrence of a symbol higher its uncertainty and hence more bits are needed to represent it. Observe that the entropy of a source is highest when all symbols are equally likely. Work the two questions out while you are on this slide, they are simple applications of the Entropy formula.
  • #78: Lets try to get some more insight into the purport of the Entropy equation Entropy is a measure of information content or uncertainty. Example: 4 bits because the information content of the letter e is log (1/1/16) which is log 16, which is 4. Refer to the Information theory primer for a quick brush up on logarithms and their properties.
  • #79: Screen1: Say, we are given that there are five symbols (A thru E) that can occur in a source with their frequencies being 15 7 6 6 and 5. First sort the symbols in decreasing order of frequency. Screen2: Divide the list into two equal halves. That is, the counts of both halves are as close as possible to each other. So in this case we split the list between B and C. The upper half of the list is assigned a code 0 and the lower part is assigned a 1. Screen3: We recursively repeat the steps of splitting and assigning code till each symbol become a code leaf on the tree. That is, treat each split as a list and apply splitting and code assigning till you are left with lists of single elements. Screen 4: Note that we split the list containing C, D and E between C and D because the difference between the split lists is 11 minus 6 which is 5, if we were to have divided between D and E we would get a difference of 12-5 which is 7. Screen 5: We complete the algorithm and as a result have codes assigned to the symbols. Screen 6, 7, 8: Lets do a little analysis. The table shows the entropy of each symbol along with the codes assigned by the Shannon-Fano Coding. We also compute the contribution in bits of each symbol.. We note that it takes a total of 89 bits using the Shannon-Fano Algorithm to encode 85.25 bits of information. I encourage you to compute what it would take if we used ASCII.
  • #80: Screen1: Say, we are given that there are five symbols (A thru E) that can occur in a source with their frequencies being 15 7 6 6 and 5. First sort the symbols in decreasing order of frequency. Screen2: Divide the list into two equal halves. That is, the counts of both halves are as close as possible to each other. So in this case we split the list between B and C. The upper half of the list is assigned a code 0 and the lower part is assigned a 1. Screen3: We recursively repeat the steps of splitting and assigning code till each symbol become a code leaf on the tree. That is, treat each split as a list and apply splitting and code assigning till you are left with lists of single elements. Screen 4: Note that we split the list containing C, D and E between C and D because the difference between the split lists is 11 minus 6 which is 5, if we were to have divided between D and E we would get a difference of 12-5 which is 7. Screen 5: We complete the algorithm and as a result have codes assigned to the symbols. Screen 6, 7, 8: Lets do a little analysis. The table shows the entropy of each symbol along with the codes assigned by the Shannon-Fano Coding. We also compute the contribution in bits of each symbol.. We note that it takes a total of 89 bits using the Shannon-Fano Algorithm to encode 85.25 bits of information. I encourage you to compute what it would take if we used ASCII.