1 / 30

Multimedia- and Web-based Information Systems

Multimedia- and Web-based Information Systems. Lecture 6. Picture Compression Overview The JPEG method. Important steps during the compression of single pictures. uncompressed picture. Picture Preparation Generation of a suitable digital representation

kris
Download Presentation

Multimedia- and Web-based Information Systems

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. Multimedia- and Web-based Information Systems Lecture 6

  2. Picture Compression OverviewThe JPEG method

  3. Important steps during the compression of single pictures uncompressed picture • Picture Preparation • Generation of a suitable digital representation • Blocks of 8x8 pixels, fixed number of bits per pixel, planes, color model Picture preparation Picture processing Entropy- coding Quanti- sation compressed picture

  4. Important steps during the compression of single pictures uncompressed picture • Picture Processing • Mathematically exact • Transformations • Time domain to frequency domain • Cosine Transformation (DCT) Picture preparation Picture processing Entropy- coding Quanti- sation compressed picture

  5. Important steps during the compression of single pictures uncompressed picture • Quantisation • Representation of Values (Losses) • Importance of information • Characteristic curve (Companding) Picture preparation Picture processing Entropy- coding Quanti- sation compressed picture

  6. Important steps during the compression of single pictures uncompressed picture • Entropy encoding • Lossless compression • Linear data stream Picture preparation Picture processing Entropy- coding Quanti- sation compressed picture

  7. JPEG and Motion JPEG Demands • Independent of the size of a picture • Arbitrary Width/Height-relation • Independent of color model and color variety • Contents of a picture may have arbitrary complexity • State of the art regarding compression ratio • Sequential and progressive picture composition

  8. JPEG Overview • Different Modes • Overview of the different possibilities Picture Preparation Picture Processing Quantisation Entropy encoding Pixel Prediction Run time encoding Block, MCU FDCT Huffman

  9. JPEG Modes • Lossy, sequential DCT-based Mode (base mode, baseline process) • Extended lossy DCT-based Mode • Lossless Mode • Hierarchical Mode

  10. Baseline Process • Uses • Planes • Blocks (8x8) • Minimum Coded Unit (MCU) • FDCT (Forward Discrete Cosine Transformation) • Run length encoding • Huffmann

  11. Picture Preparation • Picture consists of multiple planes (max. 255) • RGB, YUV or YIQ • Alpha channel

  12. Planes with different resolution • 2nd and 3rd plane have half the resolution in X-direction (e.g. YUV)

  13. Minimum Coded Unit (MCU) • Assembly of data units from multiple different planes

  14. DCT-based mode • Lossy and sequential • 8 bits per Pixel 8x8 Blocks FDCT Quantisation Tables Entropy encoding Tables uncompressed picture compressed picture

  15. Transformation of blocks

  16. Forward Discrete Cosine Transformation (FDCT) Forward Discrete Cosine Transformation (FDCT): , for u,v=0; else cu,cv=1 with: • Formula applied to each block for all 0 ≤ u, v ≤ 7: • Blocks with 8x8 pixel result in 64 DCT coefficients: • 1 DC-coefficient S00: basic color of the block • 63 AC-coefficients: (likely) zero or near-zero values

  17. Example

  18. Quantisation • 64 DCT-Coefficients • Table of coefficients for the quantisation • Sq(v,u) = round (S(v,u) / Q(v,u)) • R(v,u) = Sq(v,u) * Q(v,u) • Trough Q(v,u), particular areas can be emphasized / neglected

  19. Entropy encoding • Quantisated DC-coefficient • Zig-zag

  20. Sequential image composition • In one step (encoded / decoded) • Top to bottom

  21. Progressive image composition • Image gets clearer through multiple steps

  22. Summary • JPEG • State of the Art for the compression of single pictures • Variety of degrees of freedom • E.g. Resolution • Lossless mode almost reaches a 2:1 ratio

  23. Perl

  24. What Perl is • Merger of Unix tools • Very popular under UNIX • shell, sed, awk • Programming language • C syntax • Scripting language • Ability to change everything during runtime • Fast to employ, one-liners possible • Slower than C

  25. What Perl is • Easy to learn • Learning curve similar to human language • More difficult things possible • Tell it to be more strict • Object orientation • Esp. suited for the web & text processing • Regular expressions

  26. How to get & use it • http://www.perl.com • ActiveState makes port for Microsoft Windows • Current Version is 5.6.1 • Comprehensive documentation included • C:\Perl\html\index.html • Perldoc • Running perl scripts • perl –w script.pl • #!/usr/bin/perl + chmod (Unix)

  27. Variables • Scalars $ • Arrays @ • Hash % • No need to declare variables • Automatic conversion of numbers and strings $camels = ‘123‘; print $camels + 1 , “\n“;

  28. Arrays • Multivalued Variable • Lookup by number • List Assignments • Accessing @home = ("couch", "chair", "table", "stove") ($one, $two, $three, $four) = @home ($one, $two) = ($two, $one) $home[0] - $home[3]

  29. Hashes • Multivalued Variable • Lookup by name • List Assignments • Accessing %longday = ( "Sun" => "Sunday", "Mon" => "Monday", "Tue" => "Tuesday" ); @list = %longday $longday{"Sun"}, $longday{"Mon"}

  30. Quoting in Perl • Double Quotes ““ interprete variables and backslashes • Single Quotes ‘‘ don‘t $one=“two”; $two=“four”; print ‘$one + $one is $two \n’; print “$one + $one is $two \n”;

More Related