multimedia- and web-based information systems lecture 6
TRANSCRIPT
![Page 1: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/1.jpg)
Multimedia- and Web-based Information Systems
Lecture 6
![Page 2: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/2.jpg)
Picture Compression OverviewThe JPEG method
![Page 3: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/3.jpg)
Important steps during the compression of single pictures
Picture Preparation– Generation of a suitable digital representation– Blocks of 8x8 pixels, fixed number of bits per
pixel, planes, color model
Picturepreparation
uncompressedpicture
Pictureprocessing
Quanti-sation
Entropy-coding
compressed picture
![Page 4: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/4.jpg)
Important steps during the compression of single pictures
Picture Processing– Mathematically exact– Transformations
Time domain to frequency domain Cosine Transformation (DCT)
Picturepreparation
uncompressedpicture
Pictureprocessing
Quanti-sation
Entropy-coding
compressed picture
![Page 5: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/5.jpg)
Important steps during the compression of single pictures
Quantisation– Representation of Values (Losses)– Importance of information– Characteristic curve (Companding)
Picturepreparation
uncompressedpicture
Pictureprocessing
Quanti-sation
Entropy-coding
compressed picture
![Page 6: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/6.jpg)
Important steps during the compression of single pictures
Entropy encoding– Lossless compression– Linear data stream
Picturepreparation
uncompressedpicture
Pictureprocessing
Quanti-sation
Entropy-coding
compressed picture
![Page 7: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/7.jpg)
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
![Page 8: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/8.jpg)
JPEG Overview
Different Modes– Overview of the different possibilities
Picture Preparation
Pixel
Block, MCU
Picture Processing
Prediction
FDCT
Quantisation Entropy encoding
Run time encoding
Huffman
![Page 9: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/9.jpg)
JPEG Modes
Lossy, sequential DCT-based Mode (base mode, baseline process)
Extended lossy DCT-based Mode Lossless Mode Hierarchical Mode
![Page 10: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/10.jpg)
Baseline Process
Uses– Planes– Blocks (8x8)– Minimum Coded Unit (MCU)– FDCT (Forward Discrete Cosine Transformation)– Run length encoding– Huffmann
![Page 11: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/11.jpg)
Picture Preparation
Picture consists of multiple planes (max. 255)– RGB, YUV or YIQ– Alpha channel
![Page 12: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/12.jpg)
Planes with different resolution
2nd and 3rd plane have half the resolution in X-direction (e.g. YUV)
![Page 13: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/13.jpg)
Minimum Coded Unit (MCU)
Assembly of data units from multiple different planes
![Page 14: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/14.jpg)
DCT-based mode
Lossy and sequential 8 bits per Pixel
8x8 Blocks FDCT Quantisation Tables
Entropy encoding
Tablesuncompressed
picture
compressed picture
![Page 15: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/15.jpg)
Transformation of blocks
![Page 16: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/16.jpg)
Forward Discrete Cosine Transformation (FDCT)
Forward Discrete Cosine Transformation (FDCT):
7
0
7
0 16
)12(cos
16
)12(cos
4
1
x yyxvuvu
vyuxsCCS
with: 2
1, vu cc
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
, for u,v=0; else cu,cv=1
![Page 17: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/17.jpg)
Example
![Page 18: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/18.jpg)
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
![Page 19: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/19.jpg)
Entropy encoding
Quantisated DC-coefficient Zig-zag
![Page 20: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/20.jpg)
Sequential image composition
In one step (encoded / decoded) Top to bottom
![Page 21: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/21.jpg)
Progressive image composition
Image gets clearer through multiple steps
![Page 22: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/22.jpg)
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
![Page 23: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/23.jpg)
Perl
![Page 24: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/24.jpg)
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
![Page 25: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/25.jpg)
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
![Page 26: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/26.jpg)
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)
![Page 27: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/27.jpg)
Variables
Scalars $ Arrays @ Hash % No need to declare variables Automatic conversion of numbers and strings
$camels = ‘123‘;
print $camels + 1 , “\n“;
![Page 28: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/28.jpg)
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]
![Page 29: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/29.jpg)
Hashes
Multivalued Variable Lookup by name List Assignments
Accessing
%longday = ( "Sun" => "Sunday","Mon" => "Monday","Tue" => "Tuesday" );
@list = %longday
$longday{"Sun"}, $longday{"Mon"}
![Page 30: Multimedia- and Web-based Information Systems Lecture 6](https://reader035.vdocuments.site/reader035/viewer/2022062804/5697bf941a28abf838c8fe9d/html5/thumbnails/30.jpg)
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”;