Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.

Similar presentations


Presentation on theme: "IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny."— Presentation transcript:

1 IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter 2012

2 LZW Algorithm LZW Compression Begin S= next input character While not EOF { C= next input character Is s+c exists in the dictionary S= s+c Else{ Output the code for s; By Mahmood A.Moneim2 Add String s+ c to dictionary with a new code S=c } Output the code for s End

3 LZW for String ABABBABCABABBA Initially containing only three characters By Mahmood A.Moneim3

4 Cont. By Mahmood A.Moneim4

5 LZW Decompression By Mahmood A.Moneim5

6 Cont. Input code for the decoder is 124523461. By Mahmood A.Moneim6

7 Run Length Encoding Huffman code requires: - frequency values - bits are grouped into characters or units Many items do not fall into such category - machine code files - facsimile Data (bits corresponding to light or dark area of a page) - video signals

8 Run Length Encoding For such files, RLE is used. ‘Instead of sending long runs of ‘0’s or ‘1’s, it sends only how many are in the run.’ 70%-80% space is white on a typed character space, so RLE is useful.

9 Run Length Encoding Runs with different characters Send the actual character with the run-length HHHHHHHUFFFFFFFFFYYYYYYYYYYYDGGGGG code = 7, H, 1, U, 9, F, 11, Y, 1, D, 5, G SAVINGS IN BITS (considering ASCII): ?

10 Lossy Image Compression Lossless compression can be applied to data types such as text and executable programs where the corruption of one bit invalidates the whole data Images, however, can tolerate some data loss that would be invisible to the human eye JPEG (Joint Photographic Experts Group) is the most commonly used lossy compression method for still images JPEG is best suited for photographs By Mahmood A.Moneim10

11 JPEG Compression Any image can be considered as 3-dimensional function with x and y coordinates define the pixel position and the z coordinate represents a height that corresponds to the color. As can be seen, edges are represented as steep slopes in the height figure By Mahmood A.Moneim11

12 JPEG Compression Such steep slopes represent high-frequencies in the frequency-domain representation of the image High-frequency information can be discarded from an image without perceptible loss of quality, because people do not perceive the effects of high frequencies in images very accurately JPEG first uses Discrete Cosine Transform (DCT) to find the frequency representation of the image By Mahmood A.Moneim12

13 JPEG Compression In JPEG, images are divided into 8 x 8 pixel squares, each of which is transformed separately using DCT to reduce computational complexity Applying the DCT does not reduce the size of the data, since the array of frequency coefficients is the same size as the original pixel array However, since high frequencies are explicitly separated, they can be easily discarded or given fewer levels in quantization Example: If the value produced by the DCT for each frequency ranges from 0 to 255: - Lowest-frequency coefficients can have any value from 0 to 255 - Slightly higher frequencies might only have values divisible by 4 - Highest frequencies might only have the value 0 or 128 By Mahmood A.Moneim13

14 JPEG Compression Such quantization process reduces the space needed to store the image but results in loss of information After quantization there will usually be many zero coefficients. These are RLE-encoded, using a zigzag sequence to maximize the length of the runs The non-zero coefficients are compressed using Huffman encoding By Mahmood A.Moneim14

15 JPEG Compression Decompression is performed by reversing the process, using the Inverse DCT to recover the image from its frequency domain representation The decompressed image may exhibit compression artifacts, including blurring and visible edges at the boundaries between the 8×8 pixel blocks, especially at low quality settings By Mahmood A.Moneim15

16 JPEG2000 Compression JPEG2000 improves on JPEG in many areas, including image quality at high compression ratios. It can be used losslessly as well as lossily For JPEG2000 compression the image is divided into tiles, but these can be any size, up to the entire image Discrete Wavelet Transform (DWT) is applied to the tiles, generating a wavelet decomposition, comprising a coarse (low resolution) version of the image and a set of detail coefficients that can be used to add progressively more detail to the image By Mahmood A.Moneim16

17 JPEG2000 Compression The detail coefficients in the wavelet decomposition may be quantized and are then lossless-ly compressed using arithmetic encoding By Mahmood A.Moneim17

18 Q UESTIONS ? By Mahmood A.Moneim18


Download ppt "IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny."

Similar presentations


Ads by Google