1 / 42

Data compression

Data compression. Data compression. lossless – looking for unicolor areas or repeating patterns Run length encoding Dictionary compressions Lossy – reduction of colors - approximating methods (JPEG). Grid graphics formats. BMP – no compression PCX – lossless compression RLE

tamal
Download Presentation

Data compression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data compression

  2. Data compression • lossless – looking for unicolor areas or repeating patterns • Run length encoding • Dictionary compressions • Lossy – reduction of colors - approximating methods (JPEG)

  3. Grid graphics formats • BMP – no compression • PCX – lossless compression RLE • PNG – lossless dictionary compression LZW • GIF – lossless dictionary compression LZW + reduction to 256 color (adaptive palette) • JPG – approximating compression JPEG

  4. sequential, common known progressive, more effective, for computer net transmissions lossless, not known and not widely supported hierarchic, more resolutions in one file, quick preview JFIF format (JPEG File Interchange format)‏

  5. Sequential JFIF encoding

  6. RGB → Y Cb Cr Y= 0,299*R + 0,587*G + 0,114*B (brightness)‏ Cb = - 0,1687*R - 0,3313*G + 0,5*B + 128 Cr = 0,5*R - 0,4187*G - 0,0813*B + 128 R = Y + 1.402*(Cr-128)‏ G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)‏ B = Y + 1.772*(Cb-128)‏ Color model transofmation

  7. Computing of average value for the block 2x1 pixels (6 bits sample), 6 bits -> 4 bits (compression 67%) or 2x2 pixels (12 bits sample), 12 bits -> 6 bits (compression 50%) Subsampling of Cb,Cr

  8. DCT transformation

  9. Example 139 144 149 153 155 155 155 155 144 151 153 156 159 156 156 156 150 155 160 163 158 156 156 156 159 161 162 160 160 159 159 159 159 160 161 162 162 155 155 155 161 161 161 161 160 157 157 157 162 162 161 163 162 157 157 157 162 162 161 161 163 158 158 158

  10. DCT coefficients AC coefficient (= 8 x average brightness

  11. Quantization matrix – example for 90% “qality”

  12. Quantization matrices • Defined by standardization committee JPEG • . Separately for brightness and for color components. • Defined matrices for quality 10% and 90%. • For other values of quality between 10% and 90%obtained by linear interpolation. • For values under 10% or over 90% extrapolation can be used but it is not recommended.

  13. Coefficients after quantisation

  14. AC coefficients • Stored separately • Not compressed • Possibility used for quick preview

  15. Huffman encoding

  16. Example 0, -2, -1, -1, -1, 0, 0, -1, -1, 0, 0, 0…..

  17. Reconstruction of DCT coeffients

  18. After inverse DCT transformation

  19. Table of differences

  20. Grid Pictures Modification

  21. Geometrical Modifications • Clip • Rectangular • Other shapes • Rotate • Left, Right • 180 degrees • Flip

  22. warping

  23. warping

  24. Morphing

  25. Resolution modification • Resolution / number of pixels /dimensions of picture • Resolution Decreasing (average color of pixels) • Resolution increasing - copying of pixels - dithering

  26. Color depth decreasing • Rounding of colors • Establishing of color palette • Half toning • Dithering

  27. Half Toning • Half tone matrix • example

  28. Floyd Steinberg dithering 7/16 1/16 5/16 3/16

  29. Pixel color correction • Color correction • Saturation correction • Brightness correction • Simple brightness correction • Contrast correction • Gamma correction

  30. Saturation S

  31. Saturation correction S

  32. Brightness Light

  33. Brightness histogramm K W

  34. Color brightness • Y = 0,299R + 0,587G + 0.114B

  35. Simple brightness correction New br Original br

  36. Simple brightness decreasing New br Original br

  37. Contrast decreasing New br Original br

  38. Contrast increasing New br Original br

  39. Gamma correction of brightness New br Original br

  40. Gamma function • Y = ymin + (ymax-ymin)*(x/xmax)1/γ Tedy Y = 255 * (x/255)1/γ Y = x1/γ

  41. Gamma correction

More Related