ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission (10-24-06) Image Compression Quantization independent samples uniform and optimum correlated.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

SWE 423: Multimedia Systems
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
Spatial and Temporal Data Mining
JPEG.
CSc 461/561 Multimedia Systems Part B: 2. Lossy Compression
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
Image (and Video) Coding and Processing Lecture: DCT Compression and JPEG Wade Trappe Again: Thanks to Min Wu for allowing me to borrow many of her slides.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
JPEG Still Image Data Compression Standard
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Department of Computer Engineering University of California at Santa Cruz Data Compression (2) Hai Tao.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
SWE 423: Multimedia Systems Chapter 7: Data Compression (4)
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
Image Compression: JPEG Multimedia Systems (Module 4 Lesson 1)
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
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.
JPEG Motivations: Motivations: 1.Uncompressed video and audio data are huge. In HDTV, the bit rate easily exceeds 1 Gbps. --> big problems for.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
ENEE631 Digital Image Processing (Spring'04) Transform Coding and JPEG Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park 
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
1 Multimedia Compression Algorithms Wen-Shyang Hwang KUAS EE.
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.
DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.
Indiana University Purdue University Fort Wayne Hongli Luo
JPEG CIS 658 Fall 2005.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
Hardware/Software Codesign Case Study : JPEG Compression.
Chapter 9 Image Compression Standards 9.1 The JPEG Standard 9.2 The JPEG2000 Standard 9.3 The JPEG-LS Standard 9.5 Further Exploration Li & Drew1.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
Arunan a/l Sinniah Tan Suet Chuan Davinderpal Singh Vijayan a/l Kasinathan Cheong Tian Guan.
The JPEG Standard J. D. Huang Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC.
JPEG - JPEG2000 Isabelle Marque JPEGJPEG2000. JPEG Joint Photographic Experts Group Committe created in 1986 by: International Organization for Standardization.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
JPEG (Joint Photographic Expert Group)
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.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Review of Basics Huffman coding run length coding Quantization.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 4 ECE-C490 Winter 2004 Image Processing Architecture Lecture 4, 1/20/2004 Principles.
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
Introduction to JPEG m Akram Ben Ahmed
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) JPEG block based transform coding.... Why DCT for Image transform? DFT DCT.
By Dr. Hadi AL Saadi Lossy Compression. Source coding is based on changing of the original image content. Also called semantic-based coding High compression.
Entropy vs. Average Code-length Important application of Shannon’s entropy measure is in finding efficient (~ short average length) code words The measure.
M. Wu: ENEE631 Digital Image Processing (Spring'09) Transform Coding and JPEG Spring ’09 Instructor: Min Wu Electrical and Computer Engineering Department,
Image Processing Architecture, © Oleh TretiakPage 1Lecture 5 ECEC 453 Image Processing Architecture Lecture 5, 1/22/2004 Rate-Distortion Theory,
MP3 and AAC Trac D. Tran ECE Department The Johns Hopkins University Baltimore MD
Chapter 8 Lossy Compression Algorithms
JPEG Compression What is JPEG? Motivation
Chapter 9 Image Compression Standards
Discrete Cosine Transform
JPEG.
Image Compression Standards (JPEG)
CMPT 365 Multimedia Systems
JPEG Still Image Data Compression Standard
Presentation transcript:

ELE 488 F06 ELE 488 Fall 2006 Image Processing and Transmission ( ) Image Compression Quantization independent samples uniform and optimum correlated samples vector quantization JPEG block based transform coding /24/06

ELE 488 F06 Image Compression Review –Sampling –Entropy coding –Runlength coding –Quantization Uniform step size, optimum (Lloyd Max) correlated samples JPEG – piecing together –Lossy encoding Transform coding – DCT –Lossless encoding sampler + quantizer encoder image capture

ELE 488 F06 Quantization Quantizer Jain, Fig 4.16 x ↔ u correction t k = ? r k = ?

ELE 488 F06 Optimum quantizer t k = ? r k = ? Optimum solution: …

ELE 488 F06 Numerical Solution of the LM Equations Solution by iteration procedure: a. Pick initial values for t (e.g. uniform grid) b. Find r values using (1) (May need numerical integration) c. Find new t values using (2) d. Go to line b until the t and r values converge

ELE 488 F06 Optimum Quantizers Gaussian, zero mean unit variance # bit MSE SNR(dB) Laplacian, zero mean unit variance # bit MSE SNR(dB) Jain, Tables 4.1, 4.2

ELE 488 F06 Example: Triangle Start with uniform quantizer Use iterative algorithm. optimum thresholds (red) reconstruction values (blue) Difference: 1.1 dB

ELE 488 F06 Example: Gaussian Start with uniform quantizer Use iterative algorithm. optimum thresholds (red) and reconstruction values (blue) Difference: 3.4 dB

ELE 488 F06 Example: Triangle 2 Start with uniform quantizer Use iterative algorithm. optimum thresholds (red) and reconstruction values (blue) Difference: ? dB

ELE 488 F06 Example: Gaussian Mixture Start with uniform quantizer Use iterative algorithm. optimum thresholds (red) and reconstruction values (blue)

ELE 488 F06(Jain’s Fig.4.17) Piecewise Constant Approximation Approximation of Optimum Quantizer for Large L MSE~ Rao and Huang, Sec 3.2

ELE 488 F06 Gaussian or Laplacian good models for images?

ELE 488 F06

Differential Pulse Code Modulation (DPCM) Dynamic range for signal: (– A, A). For uniform B-bit quantizer, quantization step = A 2 –B+1 Peak signal to peak noise ratio = 2 B ~ 6B dB B should be large enough for good SNR. IF neighboring samples are well correlated, the difference has a smaller dynamic range. So requires small B for same SNR. Encoding successive differences  DPCM + - z -1 x[n]d[n] + a z -1 d Q [n] x Q [n] Q d[n] = x[n] – x[n–1] d Q [n] = x Q [n] – a x Q [n–1] a<1 for stability

ELE 488 F06 DPCM Encoder and Decoder special case of predictive coding x[n] + a z -1 d Q [n] x Q [n] a x Q [n - 1] + - a z - 1 d[n] Q + x Q [n] Encoder x(n) Predictor Quantizer _ d(n) d Q (n) + + x Q ^ (n) x Q (n) Decoder Prediction: x Q ^(n), Prediction error d(n) Quantized prediction error d Q (n) Distortion introduced: d(n) – d Q (n) x Q (n) Predictor + d Q (n) x Q ^ (n)

ELE 488 F06 More on Predictor Causality –need to received previous samples to decode current sample Can use previous p sampled to predict current sample –p th –order auto-regressive (AR) model –How to determine the coefficients to model x(n) For images Line-by-line DPCM predict from the past samples in the same line 2-D DPCM predict from past samples in the same line and from previous lines UMCP ENEE631 Slides (created by M.Wu © 2001)

ELE 488 F06 Comparison Jain’s book Table 4.1 and Fig UMCP ENEE631 Slides (created by M.Wu © 2001) 10 dB? 6 dB/bit?

ELE 488 F06 Predictive (Differential) Coding (explanation of Fig 11.12) PCM: x(n) Gaussian, zero mean, variance σ 2 =1 Line by line DPCM: Gauss-Markov model x(n) = a x(n – 1) + e(n), e(n) iid Gaussian rv, E{x(n) x(n–1)} = a σ 2 Quantize and code d(n) = x(n) – a x(n–1) E{d 2 (n)} = E{ [x(n) – a x(n–1)] 2 } = 2(1 – a 2 ) σ 2, small if a~1. 2D DPCM: Gauss-Markov x(m,n) = a 1 x(m–1,n) + a 2 x(m,n–1) + a 3 (m–1,n–1) + e(m,n)

ELE 488 F06 JPEG Still Image Coding Putting pieces together Note: lossy, block based, transform coding

ELE 488 F06 JPEG Compression Standard JPEG - Joint Photographic Experts Group –Compression standard of continuous-tone still image –Became an international standard in 1992 Allow for lossy and lossless encodings of still images –Lossy compression – DCT-based average compression ratio 15:1 –Lossless compression – predictive-based Sequential, Progressive, Hierarchical modes –Sequential ~ encoded in a single left-to-right, top-to-bottom scan –Progressive ~ encoded in multiple scans to first produce a quick, rough decoded image when the transmission time is long –Hierarchical ~ encoded at multiple resolution to allow accessing low resolution without full decompression UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ELE 488 F06 Transform Coding Use transform to pack energy to only a few coeff. How to allocate bits to each coeff.? –More bits for coeff. having large variance to –Also to incorporate perceptual importance From Jain’s Fig UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ELE 488 F06 Block-based Transform Coding Why transform? Why block based? –Captures local info. better than global transform –Computation complexity –Consider “N log N” transform and image of mxm blocks each with nxn pixels –(mn) 2 log (mn) 2 vs m 2 n 2 log n 2 –Dynamic range and bit allocation How to choose block size UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002) complexity

ELE 488 F06 Block-based Transform Coding Encoder –Step-1 Divide an image into m x m blocks and take DCT –Step-2 Design quantizer and quantize coefficients (lossy!) –Step-3 Determine bit-allocation for transform coefficients –Step-4 Encode quantized coefficients Decoder – reverse the steps From Wallace’s JPEG tutorial (1993) UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ELE 488 F06 Discrete Cosine Transform – DCT f(i,j)  F(u,v)

ELE 488 F06 flower

ELE 488 F06 DCT of Flower

ELE 488 F06 Histogram of DCT

ELE 488 F06 Blockwise DCT

ELE 488 F06 Blockwise DCT, enlarged

ELE 488 F06 Blockwise DCT with DC values removed

ELE 488 F06 Blockwise DCT with DC values removed - enlarged

ELE 488 F06 Image as pixels and in transform (DCT) domain Blockwise DCT reflects better local information than DCT of entire image DC values special Most information rests at low frequencies Many high frequency coefficients are small or zero Use these observations for efficient encoding of images in JPEG

ELE 488 F06 JPEG Still Image Coding Putting pieces together Note: lossy, block based, transform coding

ELE 488 F06 cosine functions

ELE 488 F06 DCT and Zig-Zag Ordering (from low frequency to high)

ELE 488 F06 “Standard” Quantization Table (step size) Often use integer multiple of step size Quantization controls number of bits (compression ratio) and quality Larger step leads to poorer quality, but higher compression