CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #26: Compression - JPEG, MPEG, fractal C. Faloutsos.

Slides:



Advertisements
Similar presentations
Multimedia System Video
Advertisements

CMU SCS : Multimedia Databases and Data Mining Lecture #19: SVD - part II (case studies) C. Faloutsos.
Data Compression CS 147 Minh Nguyen.
CMU SCS : Multimedia Databases and Data Mining Lecture#5: Multi-key and Spatial Access Methods - II C. Faloutsos.
Math Modeling Final Project APPLICATIONS of FRACTALS Advisor: Professor Alber Fang Qi Pu Wan Xue Rui FRACTAL LANDSCAPES FRACTAL IMAGE COMPRESSION.
15-826: Multimedia Databases and Data Mining
MPEG: A Video Compression Standard for Multimedia Applications Didler Le Gall.
Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
School of Computing Science Simon Fraser University
School of Computing Science Simon Fraser University
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
Fractal Image Compression
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
2007Theo Schouten1 Compression "lossless" : f[x,y]  { g[x,y] = Decompress ( Compress ( f[x,y] ) | “lossy” : quality measures e 2 rms = 1/MN  ( g[x,y]
1 Image and Video Compression: An Overview Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur,
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Video Compression Concepts Nimrod Peleg Update: Dec
CSE679: MPEG r MPEG-1 r MPEG-2. MPEG r MPEG: Motion Pictures Experts Group r Standard for encoding videos/movies/motion pictures r Evolving set of standards.
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
MPEG MPEG-VideoThis deals with the compression of video signals to about 1.5 Mbits/s; MPEG-AudioThis deals with the compression of digital audio signals.
CIS750 – Seminar in Advanced Topics in Computer Science Advanced topics in databases – Multimedia Databases V. Megalooikonomou Compression: JPEG, MPEG,
Introduction to JPEG and MPEG Ingemar J. Cox University College London.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
Final Review by Amy Zhang Digital Media Computing.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Data Compression. Compression? Compression refers to the ways in which the amount of data needed to store an image or other file can be reduced. This.
Indiana University Purdue University Fort Wayne Hongli Luo
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much.
MPEG MPEG : Motion Pictures Experts Group MPEG : ISO Committee Widely Used Video Compression Standard.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
CMU SCS : Multimedia Databases and Data Mining Lecture #12: Fractals - case studies Part III (quadtrees, knn queries) C. Faloutsos.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
An introduction to audio/video compression Dr. Malcolm Wilson.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
CS654: Digital Image Analysis
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
Page 11/28/2016 CSE 40373/60373: Multimedia Systems Quantization  F(u, v) represents a DCT coefficient, Q(u, v) is a “quantization matrix” entry, and.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
An introduction to audio/video compression Prepared by :: Bhatt shivani ( )
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Or, how to make it all fit! DIGITAL VIDEO FILES AND COMPRESSION STANDARDS.
JPEG Compression What is JPEG? Motivation
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Algorithms in the Real World
Digital Image Processing Lecture 21: Lossy Compression May 18, 2005
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
CMPT 365 Multimedia Systems
15-826: Multimedia Databases and Data Mining
Presentation transcript:

CMU SCS : Multimedia Databases and Data Mining Lecture #26: Compression - JPEG, MPEG, fractal C. Faloutsos

CMU SCS Copyright: C. Faloutsos (2014)2 Must-read Material JPEG: Gregory K. Wallace, The JPEG Still Picture Compression Standard, CACM, 34, 4, April 1991, pp CACM, 34, 4 MPEG: D. Le Gall, MPEG: a Video Compression Standard for Multimedia Applications CACM, 34, 4, April 1991, pp CACM, 34, 4 Fractal compression: M.F. Barnsley and A.D. Sloan, A Better Way to Compress Images, BYTE, Jan. 1988, pp BYTE, Jan. 1988

CMU SCS Copyright: C. Faloutsos (2014)3 Outline Goal: ‘Find similar / interesting things’ Intro to DB Indexing - similarity search Data Mining

CMU SCS Copyright: C. Faloutsos (2014)4 Indexing - Detailed outline primary key indexing.. multimedia Digital Signal Processing (DSP) tools Image + video compression –JPEG –MPEG –Fractal compression

CMU SCS Copyright: C. Faloutsos (2014)5 Motivation Q: Why study (image/video) compression?

CMU SCS Copyright: C. Faloutsos (2014)6 Motivation Q: Why study (image/video) compression? A1: feature extraction, for multimedia data mining A2: (lossy) compression = data mining!

CMU SCS Copyright: C. Faloutsos (2014)7 JPEG - specs (Wallace, CACM April ‘91) Goal: universal method, to compress –losslessly / lossily –grayscale / color (= multi-channer) What would you suggest?

CMU SCS Copyright: C. Faloutsos (2014)8 JPEG - grayscale - outline step 1) 8x8 blocks (why?) step 2) (Fast) DCT (why DCT?) step 3) Quantize (fewer bits, lower accuracy) step 4) encoding DC: delta from neighbors AC: in a zig-zag fashion, + Huffman encoding Result: bits per pixel (8:1 compression) - sufficient quality for most apps loss

CMU SCS Copyright: C. Faloutsos (2014)9 JPEG - grayscale - lossless Predictive coding: Then, encode prediction errors Result: typically, 2:1 compression C A B X X= f ( A, B, C) eg. X= (A+B)/2, or? SKIP

CMU SCS Copyright: C. Faloutsos (2014)10 JPEG - color/multi-channel apps? image components = color bands = spectral bands = channels components are interleaved (why?) SKIP

CMU SCS Copyright: C. Faloutsos (2014)11 JPEG - color/multi-channel apps? image components = color bands = spectral bands = channels components are interleaved (why?) –to pipeline decompression with display 8x8 ‘red’ block8x8 ‘green’ block8x8 ‘blue’ block SKIP

CMU SCS Copyright: C. Faloutsos (2014)12 JPEG - color/multi-channel tricky issues, if the sampling rates differ Also, hierarchical mode of operation: pyramidal structure –sub-sample by 2 –interpolate –compress the diff. from the predictions SKIP

CMU SCS Copyright: C. Faloutsos (2014)13 JPEG - conclusions grayscale, lossy: 8x8 blocks; DCT; quantization and encoding grayscale, lossless: predictions color (lossy/lossless): interleave bands

CMU SCS Copyright: C. Faloutsos (2014)14 Indexing - Detailed outline primary key indexing.. multimedia Digital Signal Processing (DSP) tools Image + video compression –JPEG –MPEG –Fractal compression

CMU SCS Copyright: C. Faloutsos (2014)15 MPEG (LeGall, CACM April ‘91) Video: many, still images Q: why not JPEG on each of them?

CMU SCS Copyright: C. Faloutsos (2014)16 MPEG (LeGall, CACM April ‘91) Video: many, still images Q: why not JPEG on each of them? A: too similar - we can do better! (~3-fold)

CMU SCS Copyright: C. Faloutsos (2014)17 MPEG - specs ?? SKIP

CMU SCS Copyright: C. Faloutsos (2014)18 MPEG - specs acceptable quality asymmetric/symmetric apps (#compressions vs #decompressions) Random access (FF, reverse) audio + visual sync error tolerance variable delay / quality editability SKIP

CMU SCS Copyright: C. Faloutsos (2014)19 MPEG - approach main idea: balance between inter-frame compression and random access thus: compress some frames with JPEG (I-frames) –rest: prediction from motion, and interpolation –P-frames (predicted pictures, from I- or P-frames) –B-frames (interpolated pictures - never used as reference) SKIP

CMU SCS Copyright: C. Faloutsos (2014)20 MPEG - approach useful concept: ‘motion field’ f1 f2 SKIP

CMU SCS Copyright: C. Faloutsos (2014)21 MPEG - conclusions with the I-frames, we have a balance between –compression and –random access I-frame P/B-frames

CMU SCS Copyright: C. Faloutsos (2014)22 Indexing - Detailed outline primary key indexing.. multimedia Digital Signal Processing (DSP) tools Image + video compression –JPEG –MPEG –Fractal compression

CMU SCS Copyright: C. Faloutsos (2014)23 Fractal compression ‘Iterated Function systems’ (IFS) (Barnsley and Sloane, BYTE Jan. 88) Idea: real objects may be self-similar, eg., fern leaf

CMU SCS Copyright: C. Faloutsos (2014)24 Fractal compression simpler example: Sierpinski triangle. –has details at every scale -> DFT/DCT: not good –but is easy to describe (in English) There should be a way to compress it very well! Q: How??

CMU SCS Copyright: C. Faloutsos (2014)25 Fractal compression simpler example: Sierpinski triangle. –has details at every scale -> DFT/DCT: not good –but is easy to describe (in English) There should be a way to compress it very well! Q: How?? A: several, affine transformations Q: how many coeff. we need for a (2-d) affine transformation?

CMU SCS Copyright: C. Faloutsos (2014)26 Fractal compression A: 6 (4 for the rotation/scaling matrix, 2 for the translation) (x,y) -> w( (x,y) )= (x’, y’) –x’ = a x + b y + e –y’ = c x + d y + f for the Sierpinski triangle: 3 such transformations - which ones?

CMU SCS Copyright: C. Faloutsos (2014)27 Fractal compression A: w1 w2 w3 prob (~ fraction of ink)

CMU SCS Copyright: C. Faloutsos (2014)28 Fractal compression The above transformations ‘describe’ the Sierpinski triangle - is it the only one? ie., how to de-compress?

CMU SCS Copyright: C. Faloutsos (2014)29 Fractal compression The above transformations ‘describe’ the Sierpinski triangle - is it the only one? A: YES!!! ie., how to de-compress? A1: Iterated functions (expensive) A2: Randomized (surprisingly, it works!)

CMU SCS Copyright: C. Faloutsos (2014)30 Fractal compression Sierpinski triangle: is the ONLY fixed point of the above 3 transformations: w1w2 w3

CMU SCS Copyright: C. Faloutsos (2014)31 Fractal compression We’ll get the Sierpinski triangle, NO MATTER what image we start from! (as long as it has at least one black pixel!) thus, (one, slow) decompression algorithm: –start from a random image –apply the given transformations –union them and –repeat recursively drawback?

CMU SCS Copyright: C. Faloutsos (2014)32 Fractal compression A: Exponential explosion: with 3 transformations, we need 3**k sub-images, after k steps Q: what to do?

CMU SCS Copyright: C. Faloutsos (2014)33 Fractal compression A: PROBABILISTIC algorithm: –pick a random point (x0, y0) –choose one of the 3 transformations with prob. p1/p2/p3 –generate point (x1, y1) –repeat –[ignore the first points - why??] Q: why on earth does this work? A: the point (x n, y n ) gets closer and closer to Sierpinski points (n=1, 2,... ), ie:

CMU SCS Copyright: C. Faloutsos (2014)34 Fractal compression... points outside the Sierpinski triangle have no chance of attracting our ‘random’ point (x n, y n ) Q: how to compress a real (b/w) image? A: ‘Collage’ theorem (informally: find portions of the image that are miniature versions, and that cover it completely) Drills:

CMU SCS Copyright: C. Faloutsos (2014)35 Fractal compression Drill#1: compress the unit square - which transformations?

CMU SCS Copyright: C. Faloutsos (2014)36 Fractal compression Drill#1: compress the unit square - which transformations? w1 w2 w3 w4

CMU SCS Copyright: C. Faloutsos (2014)37 Fractal compression Drill#2: compress the diagonal line:

CMU SCS Copyright: C. Faloutsos (2014)38 Fractal compression Drill#3: compress the ‘Koch snowflake’:

CMU SCS Copyright: C. Faloutsos (2014)39 Fractal compression Drill#3: compress the ‘Koch snowflake’: (we can rotate, too!) w1 w4 w2 w3

CMU SCS Copyright: C. Faloutsos (2014)40 Fractal compression Drill#4: compress the fern leaf:

CMU SCS Copyright: C. Faloutsos (2014)41 Fractal compression Drill#4: compress the fern leaf: (rotation + diff. p i ) PS: actually, we need one more transf., for the stem

CMU SCS Copyright: C. Faloutsos (2014)42 Fractal compression How to find self-similar pieces automatically? A: [Peitgen+]: eg., quad-tree-like decomposition

CMU SCS Copyright: C. Faloutsos (2014)43 Fractal compression Observations –may be lossy (although we can store deltas) –can be used for color images, too –can ‘focus’ or ‘enlarge’ a given region, without JPEG’s ‘blockiness’

CMU SCS Copyright: C. Faloutsos (2014)44 Conclusions JPEG: DCT for images MPEG: I-frames; interpolation, for video IFS: surprising compression method

CMU SCS Copyright: C. Faloutsos (2014)45 Resources/ References IFS code: Gregory K. Wallace, The JPEG Still Picture Compression Standard, CACM, 34, 4, April 1991, pp

CMU SCS Copyright: C. Faloutsos (2014)46 D. Le Gall, MPEG: a Video Compression Standard for Multimedia Applications CACM, 34, 4, April 1991, pp M.F. Barnsley and A.D. Sloan, A Better Way to Compress Images, BYTE, Jan. 1988, pp Heinz-Otto Peitgen, Hartmut Juergens, Dietmar Saupe: Chaos and Fractals: New Frontiers of Science, Springer- Verlag, 1992 References