Multimedia Object - Image

1,704 views

Published on

explaining image concept and compression, a course material at IMTelkom (http://www.imtelkom.ac.id)

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,704
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
84
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Multimedia Object - Image

  1. 1. Multimedia System Image Nyoman Bogi Aditya Karna, ST, MSEE Sisfo IM Telkom
  2. 2. Multimedia Object <ul><li>Image </li></ul><ul><li>Introduction </li></ul><ul><li>Compression </li></ul><ul><li>Types: GIF/JPEG </li></ul><ul><li>Sound </li></ul><ul><li>Introduction </li></ul><ul><li>Compression </li></ul><ul><li>Types: WAV/MPEG </li></ul><ul><li>Video </li></ul><ul><li>Introduction </li></ul><ul><li>Compression </li></ul><ul><li>Types: MPEG </li></ul>
  3. 3. Compression <ul><li>Lossy </li></ul><ul><li>data might be truncated if it is not important </li></ul><ul><li>based on human’s sense limitation (sight and hearing) </li></ul><ul><li>example: JPEG and MPEG </li></ul><ul><li>Lossless </li></ul><ul><li>data must be in the way it is (whole data is important) </li></ul><ul><li>example: BMP, ZIP, GIF, Drive compression agent </li></ul><ul><li>Symmetric </li></ul><ul><li>Compression process is the reverse algorithm from decompression process </li></ul><ul><li>example: JPEG </li></ul><ul><li>Asymmetric </li></ul><ul><li>Compression process is not equal to decompression process </li></ul><ul><li>example: GIF </li></ul>
  4. 4. Digital Image <ul><li>Image can be described as 2 dimensional data array (M x N) where each element (picture element or pixel) represents a function of light intensity f(x,y) (x and y represent spatial coordinate) </li></ul><ul><li>If </li></ul><ul><ul><li>M = number of Column </li></ul></ul><ul><ul><li>N = number of Row </li></ul></ul><ul><ul><li>L = maximum intensity (gray level) </li></ul></ul><ul><li>Then </li></ul><ul><ul><li> 0  x  M – 1 </li></ul></ul><ul><ul><li> 0  y  N – 1 </li></ul></ul><ul><ul><li> 0  f(x,y)  L – 1 </li></ul></ul>0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 2 3 4 5 2 3 4 5 1 Pixel X Y
  5. 5. Color 0.001nm 400 nm 10 nm 25000 nm 1  m 1000 m 700 nm 1 nm Gamma Ray Ultra Violet X-Ray Violet Blue Green Yellow Orange Red 400 nm 700 nm InfraRed Micro Wave Electronic Communication
  6. 6. Color Space <ul><li>All scanner devices scan an image pixel by pixel (dots per inch). Each color in every pixel must be converted (separated) to a specific color space used to determine the color. The most common color space used are RGB (red+green+blue additive primaries) and CMYK (cyan-magenta-yellow-black subtractive primaries) color spaces. </li></ul><ul><li>Other Color Spaces : </li></ul><ul><ul><ul><li>grayscale 256 level </li></ul></ul></ul><ul><ul><ul><li>YCbCr or YUV (Luminance ChrominanceBlue Chrominance Red) </li></ul></ul></ul>green red blue cyan magenta yellow black (CMYK) black (RGB)
  7. 7. Color Space Transformation C = 1 – R R = 1 – C M = 1 – G G = 1 – M Y = 1 – B B = 1 - Y |C| |m1 m2 m3| |1 - R| |M| = |m4 m5 m6| |1 - G| |Y| |m7 m8 m9| |1 - B| |Y | | 0.299 0.587 0.114 | |R| | 0 | |Cb| = |-0.1687 –0.3313 0.5 | |G| + |128| |Cr| | 0.5 –0.4187 –0.0813| |B| |128|
  8. 8. GIF vs. JPEG <ul><li>GIF </li></ul><ul><li>1987 by Compuserve </li></ul><ul><li>Lossless </li></ul><ul><li>LZW compression </li></ul><ul><li>256 color max </li></ul><ul><li>Patented by Unisys </li></ul><ul><li>Transparency mode </li></ul><ul><li>Interlaced mode </li></ul><ul><li>Animated GIF mode </li></ul><ul><li>GIF 87 and GIF89a </li></ul><ul><li>JPEG </li></ul><ul><li>1988 by Joint Photographic (Picture) Experts Group </li></ul><ul><li>Lossy (quantization) </li></ul><ul><li>Huffman coding compression </li></ul><ul><li>All color (no max color) </li></ul><ul><li>Free </li></ul><ul><li>No Transparency mode </li></ul><ul><li>Progressive mode </li></ul><ul><li>Motion JPEG </li></ul><ul><li>JPEG and JPEG2000 </li></ul>
  9. 9. Graphics Interchange Format <ul><li>Facts about GIF </li></ul><ul><li>GIF, which stands for Graphics Interchange Format, is a lossless method of compression called substitution </li></ul><ul><li>If the algorithm comes across several parts of the image that are the same, say a sequence of digits like this, 1 2 3 4 5, 1 2 3 4 5, 1 2 3 4 5, it makes the number 1 stand for the sequence 1 2 3 4 5 so that you could render the same sequence 1 1 1, obviously saving a lot of space </li></ul><ul><li>It stores the key to this (1 = 1 2 3 4 5) in a hash table , which is attached to the image so that the decoding program can unscramble it </li></ul>LZW compression Raw Image GIF Image
  10. 10. LZW Compression About LZW LZW compression using a table-based lookup algorithm invented by Abraham L empel, Jacob Z iv, and Terry W elch. Two commonly-used file formats in which LZV compression is used are the GIF image format and the TIFF image format. LZW compression is also suitable for compressing text files. LZW Process LZW algorithm takes each input sequence of bits of a given length (for example, 12 bits) and creates an entry in a table (sometimes called a &quot;dictionary&quot; or &quot;codebook&quot;) for that particular bit pattern, consisting of the pattern itself and a shorter code. As input is read, any pattern that has been read before results in the substitution of the shorter code, effectively compressing the total amount of input to something smaller. Unlike earlier approaches, known as LZ77 and LZ78, the LZW algorithm does include the look-up table of codes as part of the compressed file. The decoding program that uncompresses the file is able to build the table itself by using the algorithm as it processes the encoded input.
  11. 11. Graphics Interchange Format Source Image bitmap 114862 bytes GIF 256 color 21821 bytes GIF 128 color 17566 bytes GIF 64 color 13553 bytes
  12. 12. JPEG Joint Photographic Expert Group Based on human’s sight limitation which can not see clearly a high-frequency part of the image three types: arithmetic, standard, progressive JPEG Encoding Subtract 2 n-1 Quantization Forward DCT Reordering (2-D-to-1-D) Image Coding s(j) Original subimages Table Look-Up Table Look-Up JPEG Decoding Image Decoding Reordering (1-D-to-2-D) Inverse DCT s(j) Table Look-Up Table Look-Up Dequantization Add 128 Recovered subimages
  13. 13. JPEG Source Image bitmap 114862 bytes JPEG 10 12995 bytes JPEG 40 8052 bytes JPEG 90 2886 bytes
  14. 14. GIF vs. JPEG Source Image bitmap 37854 bytes GIF JPEG 10 7701 bytes JPEG JPEG 40 4294 bytes JPEG 80 2631 bytes JPEG 65 3351 bytes
  15. 15. http://www.imtelkom.ac.id

×