Professional Documents
Culture Documents
MM Unit-II
MM Unit-II
(UNIT-II)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.1
Animation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.2
Animation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.3
Principles of Animation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.4
Principles of Animation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.5
Principles of Animation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.6
Animation Techniques
• Traditional Animation or Classical 2D Animation:
In this animation, every picture for a scene is created by hand if anyone loves to paint then
traditional animation is very interesting for those people.
In this animation, an individual draw painting in a sheet or paper and also the pictures that
create a scene will be created by the hand and frame them together to create a proper
scene.
The drawings are displayed in a certain sequence, so the viewer can pre-visualize the
animation.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.7
Animation Techniques
• Digital 2D Animation:
This animation technique is widely used in the market to form a better animation with digital technologies.
It does not include to draw the painting by hand but we can draw them by computer also and arrange those
pictures in a fixed manner and play them to create a proper scene.
• Digital 3D Animation:
If anyone is interested in making an unreal character in the real-world than this animation technique is
awesome to work with. 3D animation is very popular in the animation industry from this technique
anyone can create any type of unreal short film to an unreal film in a real way. Those models which are
created by this technique is highly realistic.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.8
Animation Techniques
• Puppetry Animation:
Animation is created using puppets instead of objects.
Indian traditional ‘KATPUTLI’ is basically a better example of this animation in 90s puppets are used in
many small towns to organize a short pictures and scenes to entertain the audiences.
Those puppets are hung with thread and those threads were controlled by any person who played these
characters and creates a film or scene.
Also in the circus, we can find these animation technique.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.9
Animation Techniques
• Eraser Animation:
As the name suggests, the sketches which are created by this technique is full black and white
because the pictures are created through pencils and these sketches can be erased as well.
Many popular charcoal eraser films have been created using this technique and one famous animator
is William Kentridge.
• Flipflop Animation:
When computers are not introduced to people there would some parts where animation is applicable.
Painters and artists carry a small diary that is filled with some similar sketches and when the diary
flipped up it creates some movement which is known as flip flop animation.
Flipbook animation is one of the oldest but fascinating kinds of animation.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.10
Motion Graphics – 2D & 3D
• Motion Graphics involves creating graphics and moving them in time and space to achieve an
intended goal or tell a story.
• The motion graphic elements are placed in a sequence of frames to create an illusion of motion.
• Unlike other forms of animation, animated motion graphics primarily use graphics.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.11
Motion Graphics – 2D & 3D
• While motion graphics describes moving or animated graphic design, animation is an umbrella term
for the whole field of moving imagery, including everything from cartoons to claymation.
• Motion graphics focus on giving movement to graphic design elements, but tend to have less of a
concrete storytelling aspect than other types of animation.
• The terms are often used interchangeably and the distinction is not always completely black and
white.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.12
Cell Animation
• Cel animation is the art of creating 2D animation by hand on sheets of transparent plastic called
“cels”.
• Following a planning process, animators transfer draft drawings onto transparent sheets of plastic
called cels.
• Each cel features one drawing with an outline on one side of the plastic and the color is filled in on
the other.
• These ‘cels’ are then placed over a background and photographed in sequence.
• When played back at a speed of 12 or 24 frames they create the illusion of movement.
• It’s rare for traditional cel animation to be used in modern productions since everything is digital
now.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.13
Cell Animation
• Cel animation is a lengthy, expensive process that demands the involvement of a large team.
• The magic starts with a script and is handed over to a storyboard artist.
• Once the timing of each shot is locked down, a lead animator will draw rough sketches of each key
pose and note the timing on a dope sheet.
• The dope sheet is an essential tool for everyone from director to colorist.
• It dictates the length of time a movement takes and standardizes the sequence of the cels.
• After the key poses are sketched out and the dope sheet completed, junior animators draw the
in-betweens to smooth the movement between poses.
• Once all movement in the shot is approved the pencil sketches are passed onto an inker.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.14
Cell Animation
• The inker transfers the linework to a transparent film of thin plastic (a cel) using black ink.
• As soon as the ink is dry the film gets passed off to a ‘colorist’ who colors in the linework using
cel paint.
• They apply the color on the opposite side to the ink giving each cel a crisp look with clean,
consistent linework.
• While each cel is being inked and colored, more artists are hard at work creating the backgrounds
for each scene.
• Because these stay on screen for longer than an individual drawing, they are typically more detailed
and delicately shaded.
• If a character is moving through a scene, the background drawing will be big enough to allow for
that movement.
• Once all the cels and backgrounds are complete they are handed to a photography team.
• The team layers the drawings according to the dope sheet and takes a picture of each layered frame.
• These frames are played in sequence and create the final animation.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.15
Computer Animation
• Computer animation is a visual digital display technology that processes the moving images on
screen.
• In simple words, it can be put or defined as the art or power of giving life, energy and emotions
etc. to any non-living or inanimate object via computers.
• It can be presented in form of any video or movie. Computer animation has the ability to make any
dead image alive.
• The key/main concept behind computer animation is to play the defined images at a faster rate to
fool the viewer so that the viewer should interpret those images as a continuous motion of images.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.16
Computer Animation
• Computer Animation is a sub-part or say small part of computer graphics and animation.
• It is used in a lot of movies, films and games, education, e-commerce, computer art, training etc.
• It is a big part of entertainment area as most of the sets and background is all build up through VFX
and animation.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.17
Morphing
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.18
Morphing
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.19
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.20
Dynamics
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.21
Video
• Video is the most recent addition to the elements of
multimedia
• It places the greatest demands on the computer
and memory (using about 108 GB per hour for full
motion)
• Often requires additional hardware (video
compression board, audio board, RAID -
Redundant Array of Independent Disks- for high
speed data transfer)
• Before adding video to a project, it is essential to
understand the medium, how to integrate it, its
limitations, and its costs
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.22
Video
Video Clips
Ways to obtain video
shoot new film clips with a digital camcorder
convert you own video clips to digital format
acquire video from an archive - often very expensive,
difficult to obtain permissions or licensing rights
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.23
Video
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.24
Data Compression Algorithms
Distinguish between lossless and lossy compression.
Describe Lempel Ziv encoding and the role of the dictionary in encoding and
decoding.
Describe the main idea behind the JPEG standard for compressing still
images.
Describe the main idea behind the MPEG standard for compressing video
and its relation to JPEG.
Describe the main idea behind the MP3 standard for compressing audio.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.25
Why Compress?
• To reduce the volume of data to be transmitted
(text, fax, images)
• To reduce the bandwidth required for transmission
and to reduce storage requirements (speech, audio,
video)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.26
Data Compression Algorithms
Introduction
• Data Compression shrinks down a file so that it takes up
less space. This is desirable for data storage and data
communication.
• Storage space on disks is expensive so a file which
occupies less disk space is "cheaper" than an
uncompressed file.
• Smaller files are also desirable for data communication,
because the smaller a file the faster it can be transferred.
• A compressed file appears to increase the speed of data
transfer over an uncompressed file.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.27
Compression
• Compression: the process of coding that will
effectively reduce the total number of bits needed to
represent certain information.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.28
Compression
• There are two main categories
Lossless
Lossy
• Compression ratio:
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.29
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.30
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.31
Lossy data compression
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.32
Data Compression Algorithms
Lossless data compression
• Lossless data compression is also named for what it does.
In a lossless data compression file the original message can
be exactly decoded.
• Lossless data compression works by finding repeated
patterns in a message and encoding those patterns in an
efficient manner.
• For this reason, lossless data compression is also referred
to as redundancy reduction. Because redundancy reduction
is dependent on patterns in the message, it does not work
well on random messages.
• Lossless data compression is ideal for text. Most of the
algorithms for lossless compression are based on the LZ
compression method developed by Lempel and Ziv .
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.33
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.34
Data Compression Algorithms
Lossless Data Compression
• For example, consider a screen containing plain black text on
a solid white background. There will be many long runs of
white pixels in the blank space, and many short runs of black
pixels within the text. Let us take a hypothetical single scan
line, with B representing a black pixel and W representing
white:
WWWWWWWWWWWWBWWWWWWWWWWWWBBBW
WWWWWWWWWWWWWWWWWWWWWWWBWWW
WWWWWWWWWWW
• If we apply the run-length encoding (RLE) data compression
algorithm to the above hypothetical scan line, we get the
following:
12WB12W3B24WB14W
• Interpret this as twelve W's, one B, twelve W's, three B's, etc.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.35
Data Compression Algorithms
1. Run-length encoding is probably the simplest method of
compression. It can be used to compress data made of any
combination of symbols. It does not need to know the
frequency of occurrence of symbols and can be very
efficient if data is represented as 0s and 1s.
2. The general idea behind this method is to replace
consecutive repeating occurrences of a symbol by one
occurrence of the symbol followed by the number of
occurrences.
3. The method can be even more efficient if the data uses
only two symbols (for example 0 and 1) in its bit pattern and
one symbol is more frequent than the other.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.36
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.37
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.38
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.39
• Advantages and disadvantages
• This algorithm is very easy to implement and does not
require much CPU horsepower. RLE compression is only
efficient with files that contain lots of repetitive data. These
can be text files if they contain lots of spaces for indenting
but line-art images that contain large white or black areas
are far more suitable. Computer generated colour images
(e.g. architectural drawings) can also give fair compression
ratios.
Where is RLE compression used?
• RLE compression can be used in the following file formats:
• TIFF files
• PDF files
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.40
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.41
Data Compression Algorithms
Huffman coding
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.42
Data Compression Algorithms
Huffman encoding
Let us see how to encode text using the code for our five
characters. Figure shows the original and the encoded text.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.44
Data Compression Algorithms
Huffman decoding
The recipient has a very easy job in decoding the data it receives.
Figure shows how decoding takes place.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.45
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.46
• In 1977, two Israeli information theorists, Abraham Lempel
and Jacob Ziv, introduced a radically different way of
compressing data - one which would avoid the uncertainty of
making predictions or the wastefulness of pre-reading data.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.47
Lempel Ziv (LZ) encoding is an example of a category of
algorithms called dictionary-based encoding. The idea is to
create a dictionary (a table) of strings used during the
communication session. If both the sender and the receiver
have a copy of the dictionary, then previously-encountered
strings can be substituted by their index in the dictionary to
reduce the amount of information transmitted.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.48
• we take a simple alphabet containing only two letters, a and
b, and create a sample stream of text. An example of such a
stream is shown below (Figure 1):
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.49
• Rule: Separate this stream of characters into pieces of text
so that the shortest piece of data is the string of characters
that we have not seen so far.
• According to the above rule, we see that 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
illustrated in Figure 2:
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.50
Sender : The Compressor
• Before compression, the pieces of text obtained in the
breaking-down process must be indexed from 1 to n, as in
Figure 3 below:
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.51
• These indices are used to number the pieces of data. The
empty string (start of text) has index 0. The piece indexed by
1 is a. Thus a, together with the initial string, must be
numbered Oa. String 2, aa, will be numbered 1a, because it
contains a, whose index is 1, and the new character a. In
this way, we proceed to number all the pieces in terms of
those that came before them. See Figure 4 for an illustration
of this technique:
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.52
• We can now throw away our old stream of text and send the
encoded information to the receiver
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.53
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.54
Data Compression Algorithms
Cont’d
• When the first word is encountered in the document, at first word is
interpreted as a collection of characters and each character is
replaced by its index in the table.
• At the end of the word when white space character is encountered,
the encoder stores the word in the next available free slot of the
table and uses that index number to represent the word hence,
forth.
• This procedure is repeated for each word, however prior to
encoding the characters individually the encoder to check to see if
the word is already stored in the table.
• If it is the word is represented by its index number only.
• The decoder has access to the same table and uses the index
number to retrieve the original word.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.55
Data Compression Algorithms
Cont’d
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.56
Two main schools of image compression
• Lossless • Lossy
Stored image data Stored image data can
can reproduce reproduce something
original image exactly that looks “close” to the
original image
Takes more storage Uses both quantization
space and entropy coding
Uses entropy coding Usually involves
only (or none at all) transform into
Examples: BMP, frequency or other
TIFF, GIF domain
Examples: JPEG,
JPEG-2000
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.57
The Flow of Image Compression
What is the so-called image compression coding?
To store the image into bit-stream as compact as possible and to
display the decoded image in the monitor as exact as possible
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.58
The Flow of Image Compression
• Flow of compression
The image file is converted into a series of binary data,
which is called the bit-stream
The decoder receives the encoded bit-stream and
decodes it to reconstruct the image
The total data quantity of the bit-stream is less than the
total data quantity of the original image
Original Image Decoded Image
Bitstream
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.59
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.60
GIF(Graphics Interchange Format)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.61
GIF(Graphics Interchange Format)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.62
GIF(Graphics Interchange Format)
Pixels R G B Index
Pixel1 r1 g1 b1 001
Pixel2 r2 g2 b2 002
Pixel3 r3 g3 b3 003
Pixel4 r4 g4 b4 004
……. ……… ….. …….. ……..
Pixel256 r256 g256 b256 256
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.63
Colours in GIF
• The format supports up to 8 bits per pixel thus allowing a single image to
reference a palette of up to 256 distinct colors.
• However only the number of different colours is restricted to 256. The
real colour representation is defined by colour tables using an RGB
colour system with 8 bit resolution per primary colour. In total 256 out of
16.7 million colours are available.
• Red x Green x Blue
• 28 x 2 8 x 28 = 224 16.777.216 colors
• Generally a GIF picture may consist of several picture segments. Each
segment is arranged in a logical picture, which is then projected into the
bitmap intended for displaying.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.64
Data Compression in GIF
• Lempel-Ziv-Welch (LZW) lossless data compression technique is used
to reduce the file size without degrading the visual quality.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.65
Uses and restrictions
Suitable areas of application:
Drawings (technical or line-drawings)
Diagrams
Sketches
Logos
Icons
Thumbnails
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.66
GIF87A
• The first version of GIF already provides all functions and
characteristics as mentioned previously.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.67
GIF89a
• The version GIF89a (published in 1989) offers a variety of extensions in addition
to the previous version GIF87a.
• Substantial extensions of GIF89a:
Transparency- define color index representing transparent pixels
Delay Times- it stops the processing for a certain period
Text Functions- used to define text data, which shall be embedded into
the picture
Comments- for author or copyright information
Applications- information about the application, which had generated the
GIF89a file
• The extension blocks provide a variety of additional information, which do not
have a direct influence on the picture and serve only for internal purposes.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.68
JPEG (Joint Photographic Experts Group)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.69
Image compression in JPEG
• A typical compression system contains three blocks:
1. The first for transformation,
2. The second for quantization and
3. The third for encoding.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.70
Image compression
The transform throws away correlations
– If you make a plot of the value of a pixel as a function of
one of its neighbours
– you will see that the pixels are highly correlated (i.e. most of
the time they are very similar)
– This is just a consequence of the fact that surfaces are
smooth
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.71
Lossy /Perceptual Compression
• ISO/IEC 10918-1
• Developed in collaboration with the International
Telecommunication Union (ITU)
• JPEG is a compression standard for cosine-tone-gray-scale
or color images.
• Uses a combination of discrete cosine transform,
quantization, run length encoding and Huffman encoding
techniques, and supports several modes of operation
including lossless and various types of lossy modes.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.72
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.73
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.74
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.75
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.76
Compression and reconstruction
© Bharati Vidyapeeth’s
EA C473 Institute of Computer Applications and 13-Feb-2007
Multimedia Computing Management, New Delhi-63,by Vaishali Joshi. U2.77
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.78
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.79
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.80
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.81
Data Compression Algorithms
Quantization
After the T table is created, the values are quantized to
reduce the number of bits needed for encoding. Quantization
divides the number of bits by a constant and then drops the
fraction. This reduces the required number of bits even
more. In most implementations, a quantizing table (8 by 8)
defines how to quantize each value. The divisor depends on
the position of the value in the T table. This is done to
optimize the number of bits and the number of 0s for each
particular application.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.82
Data Compression Algorithms
Compression
After quantization the values are read from the table, and
redundant 0s are removed. However, to cluster the 0s
together, the process reads the table diagonally in a zigzag
fashion rather than row by row or column by column. The
reason is that if the picture does not have fine changes, the
bottom right corner of the T table is all 0s.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.83
Data Compression Algorithms
Progressive Encoding
This mode allows the image to be rebuilt in multiple coarse-to-
clear passes since the encoding is done in multiple scans.
Lossless Encoding
This mode doe not involve any data loss.
Hierarchical Encoding
This mode comprises multiple resolution levels which can be
decompressed separately.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.85
Lossy /Perceptual Compression
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.86
Lossy /Perceptual Compression
(Cont’d)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.87
Lossy /Perceptual Compression
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.88
Lossy /Perceptual Compression
(Cont’d)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.89
Example - One everyday photo with file size
of 2.76 MB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.90
Example - One everyday photo with file size
of 600 KB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.91
Example - One everyday photo with file size
of 350 KB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.92
Example - One everyday photo with file size of
240 KB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.93
Example - One everyday photo with file
size of 144 KB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.94
Example - One everyday photo with file
size of 88 KB
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.95
Analysis
• Near perfect image at 2.76M, so-so image at 88K
• Sharpness decreases as file size decreases
• Which file size is the best?
No correct answer to this question
Answer depends upon how strict we are about image
quality, what purpose image is to be used for, and the
resources available
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.96
Gif vs. jpeg
• FEATURE JPEG GIF
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.97
Data Compression Algorithms
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.98
Data Compression Algorithms
Spatial compression
The spatial compression of each frame is done with JPEG, or
a modification of it. Each frame is a picture that can be
independently compressed.
Temporal compression
In temporal compression, redundant frames are removed.
When we watch television, for example, we receive 30 frames
per second. However, most of the consecutive frames are
almost the same. For example, in a static scene in which
someone is talking, most frames are the same except for the
segment around the speaker’s lips, which changes from one
frame to the next.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.99
Data Compression Algorithms
MPEG frames
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.100
Lossy /Perceptual Compression
MPEG Standards Overview
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.101
Lossy /Perceptual Compression
MPEG-1
• Established in 1988, the group has produced MPEG-1, the
standard on which such products as Video CD and MP3 are
based.
• It has five different parts:
Part1-Systems(ISO/IEC 11172-1:1993): It addresses the
problem of combining one or more data streams from video
and audio parts of the MPEG-1 standard with timing
information to form a single stream. Once so combined the
data becomes suitable for digital storage and transmission.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.102
Lossy /Perceptual Compression
MPEG-1(Cont’d)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.103
Lossy /Perceptual Compression
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.104
Lossy /Perceptual Compression
(Cont’d)
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.105
Lossy /Perceptual Compression
Cont’d
• Part4:ComplianceTesting(ISO/IEC11172-4:1995):It specifies
how tests can be designed to verify whether bit streams and
decoders meet the requirement as specified above.
• These tests can be used by manufacturers of the encoders and
decoders to verify whether they conform to the specifications.
• Part5-Software Simulation (ISO/IEC TR 11172-5:1998) It
technically not a standard but a technical report giving a full
software implementation of the first three parts of the standard.
The source code is not publicly available.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.106
Lossy /Perceptual Compression
Other Standards
• MPEG-2: the standard on which such products as Digital
Television set top boxes and DVD are based.
• MPEG-3:Originally designed for HDTV.
• MPEG-4: the standard for multimedia for the fixed and
mobile web.
• MPEG-7: the standard for description and search of audio
and visual content
• MPEG-21: the Multimedia Framework.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.107
Data Compression Algorithms
Audio compression
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.108
Long Questions
1.Discuss the different techniques foe data compression.
2.Explain any text compression techniques with an example.
3.What is authoring? Explain about different authoring tools.
4.Explain the Data compression concept of Image.
5.What are the building blocks of multimedia? Explain.
6. Explain data compression techniques with example.
7. What is Animation? What are its different types? Explain
with example.
8.Explain how Huffman Tree is developed and used to
compress text?
9. Why do you need Data Compression? Explain different
techniques.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.109
Long Questions
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.110
Short Questions
1.What is animation? Explain its types?
2. What is the difference between morphing and animation?
3.Compression with an example.
4.Why cannot we use lossy compression techniques in text like
images?
5. How audio and video signals are digitized?
6.Differentiate between animation and video.
7. Describe any two compression technique in details.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.111
Short Questions
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.112
Multiple Choice Question
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.113
Multiple Choice Question
6.The refrence from one document to another
document,image,sound,or file on the web is a(n):
(a)Sweetspot (b)anchor (c) node (d)tag
7.The branch of physics that studies sound is…..
8.Reducing the number of separate measurement of an audio
file is called……
9.The process of playing a sound file while part of the file is still
downloading is called….
10.A 16-bit image is capable of representing how many
different colors?
(a)2 (b)16 (c ) 256 (d)65,536 (e) 16,772,216
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.114
Multiple Choice Question
11.Which image file type is best for photographs?
(a)Vector (b) encapsulated PostScript
(c) Bitmap (d) laser
(e) Shockware
12.Which of the following is not a color specification format?
(a) RGB (b)HSB (c) GIF (d)CMYK (e) CIE
13.A hard disk system that will support high speed data
transfer rates is called….
14.Which of the following is not a television format?
(a)MPEG (b)NTSC (c) PAL (d) SECAM (e)HDTV
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.115
Thanks…..
References
Books:
Multimedia: Making It Work
By: Tay Vaughan
Information Technology: Principles and Applications
By: Ajoy Kumar Ray & Tinku Acharya
Multimedia System Design :K. Andleigh and K. Thakkar
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,by Vaishali Joshi. U2.116