Multimedia Data Introduction to Data Compression and Lossless Compression
Data compression
-
Upload
nizar-sbaih -
Category
Education
-
view
306 -
download
4
Transcript of Data compression
TOPIC’S PRESENTATION:
IMAGE COMPRESSION
Prepared by: SBAIH Nizar 2012/2013
2
PLAN:
Why compression ?About digital images.Lossless data compression.Lossy data compression. Conclusion.
3
Why compression ?
Image with 10 Megapixel
Three color component (R,G,B).
One byte by component.
Memory occupation : 30 Mbyte by image.
Stocking on disk ? Transmission over the
network ?
Reduce its size on disk.
Speed transmission over a network.
4
About images
It is acquired, created, processed and stored in binary form. It is composed of a set of points called pixels.
Example: Image 1024 × 768 coded on 3 bytes Number of pixels : 1024 × 768 = 786432 pixels Image size : 1024 × 768 × 3 = 2359296 octets = 2,25 Mo
Performance criteria5
Compression ratio is an important factor to differ between
images :
The Mean Square Error is the cumulative squared error between the compressed and the original image :
Algorithm compression6
There are two types of compression:
Lossless compression : Perfect reconstruction. Statistical redundancy. Small compression ratio.Lossy compression : Reconstructed image ≠ original image. Quantization. Visually lossless. High compression ratio.
7
Lossless compression
There are three types of lossless compression:
•Methods based redundancy (RLE).•Statistical methods (Huffman).•Methods based on dictionaries (LZW).
8
Run-length encoding
Definition :
Run-length encoding is a data compression algorithm that is supported by most bitmap file formats, such as TIFF, BMP, and PCX.
Principle:
RLE works by reducing the physical size of a repeating string of characters.
9
Run-length encoding
Example:
AAAABBBC 4A3B1C After RLE
ENSAS 1E1N1S1A1SAfter RLE
Gain = 25% Loss = 50%
Rules for using RLE:
Rule 1 : The character must be repeated at least three times.
Rule 2 : If the sequence is not encoded, we above 00 followed by the number of characters .
Rule 3 : If the sequence is odd, we copy 00 at the end of the sequences .
10
Run-length encoding
There are a number of variants of run-length encoding. Image data is normally run-length encoded by uniform paving points, along lines, or even zigzag.
Different methods to encode images:
11
LZW (LEMPEL-ZIV-WEICH)
Definition :
It is a method of compression dictionary based on reasons that are more often than others.
Principle:
Repeated sequences are stored in a dictionary and replaced by their address in the dictionary.
The index is replaced by the sequence which is stored on a bit number smaller than the sequence.
12
LZW (LEMPEL-ZIV-WEICH)
Example :
Size of image : 256*153*24 bits = 114 ko
Compression LZW
The size of the image : 51,9 ko
Le taux de compression est
de 2,21
13
THANK’S FOR YOUR ATTENTION