Image Processing Architecture, © 2001-2004 Oleh TretiakPage 1Midterm 2 review ECEC 453 Image Processing Architecture Midterm Review February 24, 2003.

Slides:



Advertisements
Similar presentations
MPEG-1: A Standard for Digital Storage of Audio and Video Nimrod Peleg Update: Dec
Advertisements

INTERNATIONAL CONFERENCE ON TELECOMMUNICATIONS, ICT '09. TAREK OUNI WALID AYEDI MOHAMED ABID NATIONAL ENGINEERING SCHOOL OF SFAX New Low Complexity.
Basics of MPEG Picture sizes: up to 4095 x 4095 Most algorithms are for the CCIR 601 format for video frames Y-Cb-Cr color space NTSC: 525 lines per frame.
Source Coding for Video Application
Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
School of Computing Science Simon Fraser University
JPEG.
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.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
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.
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.
Image Compression JPEG. Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg and can be embedded.
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.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
JPEG 2000 Image Type Image width and height: 1 to 2 32 – 1 Component depth: 1 to 32 bits Number of components: 1 to 255 Each component can have a different.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 9 ECEC-453 Image Processing Architecture Lecture 9, 2/12/ 2004 MPEG 1 Oleh Tretiak.
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.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
 Coding efficiency/Compression ratio:  The loss of information or distortion measure:
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
MPEG-1 and MPEG-2 Digital Video Coding Standards Author: Thomas Sikora Presenter: Chaojun Liang.
Video Compression Techniques By David Ridgway.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 8 ECEC 453 Image Processing Architecture Lecture 8, 2/13/2004 JPEG Modes of Operation,
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.
Indiana University Purdue University Fort Wayne Hongli Luo
JPEG CIS 658 Fall 2005.
Codec structuretMyn1 Codec structure In an MPEG system, the DCT and motion- compensated interframe prediction are combined. The coder subtracts the motion-compensated.
June, 1999 An Introduction to MPEG School of Computer Science, University of Central Florida, VLSI and M-5 Research Group Tao.
8. 1 MPEG MPEG is Moving Picture Experts Group On 1992 MPEG-1 was the standard, but was replaced only a year after by MPEG-2. Nowadays, MPEG-2 is gradually.
Compression There is need for compression: bandwidth constraints of multimedia applications exceed the capability of communication channels Ex. QCIF bit.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
Image Processing Architecture, © 2001, 2002 Oleh TretiakPage 1Lecture 15 ECEC-453 Image Processing Architecture 3/11/2004 Exam Review Oleh Tretiak Drexel.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 10 ECEC 453 Image Processing Architecture Lecture 10, 2/17/2004 MPEG-2, Industrial.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Image Processing Architecture, © Oleh TretiakPage 1Lecture 6 ECE-C453 Image Processing Architecture Lecture 6, 2/3/04 Lossy Video Coding Ideas.
Data compression. lossless – looking for unicolor areas or repeating patterns –Run length encoding –Dictionary compressions Lossy – reduction of colors.
JPEG (Joint Photographic Expert Group)
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
Introduction to Image and Video Coding Algorithms
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.
Block-based coding Multimedia Systems and Standards S2 IF Telkom University.
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
Image Processing Architecture, © Oleh TretiakPage 1Lecture 7 ECEC 453 Image Processing Architecture Lecture 8, February 5, 2004 JPEG: A Standard.
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
MPEG CODING PROCESS. Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding.
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.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 5 ECEC 453 Image Processing Architecture Lecture 5, 1/22/2004 Rate-Distortion Theory,
MPEG Video Coding I: MPEG-1 1. Overview  MPEG: Moving Pictures Experts Group, established in 1988 for the development of digital video.  It is appropriately.
JPEG Compression What is JPEG? Motivation
JPEG Image Coding Standard
Discrete Cosine Transform
JPEG.
CMPT 365 Multimedia Systems
CIS679: MPEG MPEG.
Standards Presentation ECE 8873 – Data Compression and Modeling
The JPEG Standard.
Presentation transcript:

Image Processing Architecture, © Oleh TretiakPage 1Midterm 2 review ECEC 453 Image Processing Architecture Midterm Review February 24, 2003

Image Processing Architecture, © Oleh TretiakPage 2Midterm 2 review Announcements Midterm exam on Thursday, 26 February  Last names A through H will take the exam in our regular room;  Last names K through Z in Commonwealth 403 Covers lectures 5 through 9 (approximately) HW 3 through 7 Practice exam on web (approximate coverage)

Image Processing Architecture, © Oleh TretiakPage 3Midterm 2 review Exam Topics Quantizers, bit allocation, rate-distortion tradeoff Decorrelation ideas: prediction, DCT, wavelets DCT Technology: 1D, 2D, seperable, fast Motion estimation: MAE, full search, log search, etc. JPEG: DCT block, quantizer coefficient, DC coding, zig-zag scan, AC runlength coding JPEG: Data interleaving and MCU, bit stream stucture, JFIF and colors. MPEG1: Macroblocks and blocks, I-P-B pictures, bitstream layers, motion estimation and compensation MPEG1 contrasted with teleconferencing

Image Processing Architecture, © Oleh TretiakPage 4Midterm 2 review Quantizer: practical lossy encoding Quantizer  Symbols x — input to quantizer, q — output of quantizer, S — quantizer step  Quantizer: q = round(x/S)  Dequantizer characteristic x* = Sq  Typical noise power added by quantizer- dequantizer combination: D = S 2 /12 noise standard deviation  = sqrt(D) = 0.287S Example: S = 8, D = 8 2 /12 = 5.3, rms. quatization noise = sqrt(D) = 2.3 If input is 8 bits, max input is 255. There are 255/8 ~ 32 quantizer output values PSNR = 20 log10(255/2.3) = 40.8 dB Quantizer characteristic Dequantizer characteristic S S

Image Processing Architecture, © Oleh TretiakPage 5Midterm 2 review Rate-distortion theory: non- uniform random variables Given (x 1, x 2,... x n ), use orthogonal transform to obtain (y 1, y 2,... y n ). Sequence of independent Gaussian variables (y 1, y 2,... y n ), Var[y i ] = Q i. Distortion allocation: allocate D i distortion to Q i Rate (bits) for i-th variable is R i = max[0.5 log 2 (Q i /D i ), 0] Total distortion Total rate (bits) We specify R. What are the values of D i to get minimum total distortion D?

Image Processing Architecture, © Oleh TretiakPage 6Midterm 2 review Bit allocation solution Implicit solution (water-filling construction) Choose  (parameter) D i = min(Q i,  )  If (Qi >  ) then D i = , else D i = Q i R i = max[0.5 log 2 (Q i /D i ), 0]  If (Qi >  ) then R i = 0.5 log 2 (Q i /  ), else R i = 0. Find value of  to get specified R

Image Processing Architecture, © Oleh TretiakPage 7Midterm 2 review Coding Correlated Samples How to code correlated samples  Decorrelate  Code Methods for decorrelation  Prediction  Transformation  Block transform  Wavelet transform

Image Processing Architecture, © Oleh TretiakPage 8Midterm 2 review Prediction Rules Simplest: previous value

Image Processing Architecture, © Oleh TretiakPage 9Midterm 2 review Block-Based Coding Discrete Cosine Transform (DCT) is used instead of the K-L transform Full image DCT - one set of decorrelated coefficients for whole image Block-based coding:  Image divided into ‘small’ blocks  Each block is decorrelated separately Block decorrelation performs almost as well (better?) than full image decorrelation Current standards (JPEG, MPEG) use 8x8 DCT blocks

Image Processing Architecture, © Oleh TretiakPage 10Midterm 2 review Predicting sequential images f(t-1)f(t)f(t) f(t)–f(t–1)

Image Processing Architecture, © Oleh TretiakPage 11Midterm 2 review What is the DCT? One-dimensional 8 point DCT Input x 0,... x 7, output y 0,... y 7 One-dimensional inverse DCT Input y 0,... y 7, output x 0,... x 7 Matrix form of equations: x, y are one column matrices Note: in these equations, p stands for 

Image Processing Architecture, © Oleh TretiakPage 12Midterm 2 review Forward 2DDCT. Input x ij i = 0,... 7, j = 0, Output y kl k = 0,... 7, l = 0,... 7 Matrix form, X, Y ~ 8x8 matrices with coefficients x ij, y kl The 2DDCT is separable! Two-Dimensional DCT Note: in these equations, p stands for 

Image Processing Architecture, © Oleh TretiakPage 13Midterm 2 review General DCT One dimension Two dimensions

Image Processing Architecture, © Oleh TretiakPage 14Midterm 2 review Computational Complexity 1D DCT  N input and output samples ~ N 2 = 64 operations (additions + multiplications) 2D DCT - direct implementation  M = N 2 input values, M output values -> M 2 = N 4 2D DCT - separable implementation, Y = TXT T = ZT T, where Z = TX, all matrices are NxN -> 2N 3 operations For N = 8  2D DCT direct — 4096 operations, 64 operations per pixel  2D DCT separable — 1024 operations, 16 ops/pixel Big savings due to separable transform Inverse DFT — same story.

Image Processing Architecture, © Oleh TretiakPage 15Midterm 2 review Optimized (fast) DCT 1-D Chen DCT diagram. Dashed lines indicate subtraction, — multi- plication by a constant, — multiplication by 0.5 (shift). Characteristics of optimized DCT algorithms

Image Processing Architecture, © Oleh TretiakPage 16Midterm 2 review DCT Complexity Direct DCT computation:  64 DCT values, each requires 64 multiplications & additions —> 4096 multiply-accumulate (MA) operations per block  Separable algorithm (operate on rows, then on columns) —> 16 one-dimensional 8 point DCT operations —> 1024 MA operations  Fast implementation ~ Nlog 2 N operations ~ 16x24 = 384 MA ops Special methods ~ many operations involve multiplication by 1 or -1, take advantage of this!

Image Processing Architecture, © Oleh TretiakPage 17Midterm 2 review Motion Estimation Terminology Issues:  Size of macroblock  Size of search region In video coding standards, M = N = 16

Image Processing Architecture, © Oleh TretiakPage 18Midterm 2 review Full-Search Method Compute for (2p+1) 2 values of (i, j). Each location requires 3MN operations Picture dimensions IxJ, F pictures per second  3IJF(2p + 1) 2 operations per second  I = 720, J = 480, F = 30, p = 15 —> 30 GOPS Guaranteed to find best (MAE) displacement How to do it?  Special computers  Smaller p  Faster (suboptimal) algorithm

Image Processing Architecture, © Oleh TretiakPage 19Midterm 2 review Hierarchical Search Prepare downsampled versions of current and reference images  Full macroblock 16x16  Down 2 macroblock 8x8  Down 4 macroblock 4x4 Full search in Down 4 reference image  16 x speedup, smaller macroblock  16 x speedup, fewer displacement vectors  p = ±16, p’ = ±4 Around point of best match, do local search in Down 2 reference image (3x3 search zone) Repeat for Full reference image (3x3 search zone) Full Down 2 Down 4

Image Processing Architecture, © Oleh TretiakPage 20Midterm 2 review Comparison

Image Processing Architecture, © Oleh TretiakPage 21Midterm 2 review JPEG in practice Lossy DCT coding used most often Some use of sequential DCT (Web images) Lossless? Hierarchical? JPEG DCT allows many varieties of parameters  Choice of quantizer tables  Choice of Huffman codes  Arithmetic coding (ever?)  Different encoding of color and luminance There are baseline (=default) combinations of quantizers, Huffman codes, and luminance/chrominance samples

Image Processing Architecture, © Oleh TretiakPage 22Midterm 2 review Features of JPEG coder Standard specifies compressed bitstream structure only  File format not part of JPEG standard Many features of JPEG compression (e. g. coding tables) are optional Standard specifies input-output characteristics, not details of algorithms  Either Huffman or arithmetic coding may be used  Huffman coding almost universal — many implementations do not include arithmetic coding Standard specifies baseline implementation. This is optional, but often followed.

Image Processing Architecture, © Oleh TretiakPage 23Midterm 2 review Data Interleaving with Subsampling Example: a color image with Y (intensity), Cb, Cr, (color) components is subsampled so that one color block corresponds to four Y blocks MCU 1 = Y 00 Y 01 Y 10 Y 11 Cr 00 Cb 00, MCU 2 = Y 02 Y 03 Y 12 Y 13 Cr 01 Cb 01

Image Processing Architecture, © Oleh TretiakPage 24Midterm 2 review Huffman Coding - Block Diagram

Image Processing Architecture, © Oleh TretiakPage 25Midterm 2 review Coding AC Coefficients AC coefficients are coded in zig-zag (called ZZ in standard) order to maximize possible runs of zeros. Code unit consist of run length followed by coefficient size. Baseline coding of size category is the same as for DC differences (Table 2.9) Example: run of 6 zeros, size = -18. In the table, -18 is in category 5. Code is (6/5, 01101). If the Huffman code for 6/5 is 1101, codeword =

Image Processing Architecture, © Oleh TretiakPage 26Midterm 2 review JPEG Coding Example AC coding Zig-zag scan  Run length codes (length/value)  0/16, 0/3, 1/-2, 0/-21, 0/10, 5/2, 0/2, 0/-15, 1/-3, 0/-1,.... DC coding Assume DC(i-1) = 39 DC(i) - DC(i-1) = = 3 Size = 2, value =3 Assume Huffman code for size 2 is 011 DC code is 01111

Image Processing Architecture, © Oleh TretiakPage 27Midterm 2 review About JFIF  APP0 = FFE0 marker used to specify extensions  Specify Y, Cb, Cr for components  Includes ‘thumbnail’ picture for previewing  Thumbnail can be RGB, index color, or compressed  Image orientations: first scan line is on top  Spatial relation of components specified  Pixel aspect ratio (horizontal and vertical density) are specified

Image Processing Architecture, © Oleh TretiakPage 28Midterm 2 review JFIF Sample File written by PhotoShop [cbis 210] % od -c -x Mallorca | more \0 020 J F I F \ \0 d ffd8 ffe a SOI, start of image \0 \0 \0 031 h t t p : / / w w w. p a2f 2f e h o t o d i s c. c o m / \0 8 B URL of image copyright owner? F i l e w r i t t e n b y c e A d o b e P h o t o s h o p f f74 6f73 686f 70a8 APP0 markerVersion

Image Processing Architecture, © Oleh TretiakPage 29Midterm 2 review Color Conversion (from JFIF)

Image Processing Architecture, © Oleh TretiakPage 30Midterm 2 review Resolution Reduction Trials FullY down by 64Cb, Cr down by 64

Image Processing Architecture, © Oleh TretiakPage 31Midterm 2 review RGB reduction FullR, B reduced by 64

Image Processing Architecture, © Oleh TretiakPage 32Midterm 2 review MPEG-1: ‘1.5’ Mbps Sample rate reduction in spatial and temporal domains Spatial  Block-based DCT  Huffman coding (no arithmetic coding) of motion vectors and quantized DCT coefficients  352 x 340 pixels, 12 bits per pixel, picture rate 30 pictures per second —> 30.4 Mbps  Coded bit stream 1.15 Mbps (must leave bandwidth for audio)  Compression 26:1  Quality better than VHS! Temporal  Block-based motion compensation  Interframe coding (two kinds)

Image Processing Architecture, © Oleh TretiakPage 33Midterm 2 review Frames and Fields MPEG 1 works with pictures (~ frames)

Image Processing Architecture, © Oleh TretiakPage 34Midterm 2 review Input to MPEG-1 Standard allows many formats (up to 4095x4095 pixels) Standard optimized for CCIR 601 video formats: two source input formats (SIF’s) are specified (NTSC & PAL)  Coded color video has three components: Y, Cb, Cr A MPEG-1 macroblock has 16x16 Y and 8x8 Cb, Cr pixels

Image Processing Architecture, © Oleh TretiakPage 35Midterm 2 review Picture Types MPEG-1 is designed to support random access & editing  I — intraframe coding only  P — predictive coding  B — bi-directional coding

Image Processing Architecture, © Oleh TretiakPage 36Midterm 2 review Block Diagram of MPEG Decoder I frame P frame B frame

Image Processing Architecture, © Oleh TretiakPage 37Midterm 2 review Typical MPEG coding parameters Typical sequence  IPBBPBBPBBPBBPBB (16 frames) Average compression 26.3

Image Processing Architecture, © Oleh TretiakPage 38Midterm 2 review Coding constraints (minimum) Constrained parameter bit stream. Every MPEG-1 decoder should support these parameters

Image Processing Architecture, © Oleh TretiakPage 39Midterm 2 review Macroblock Coding: I & P I pictures  Divided into slices and macroblocks  No motion compensation  Each macroblock can have different quantization  DC and AC coded differently, as in JPEG  Different coding tables from JPEG P pictures  Divided into slices and macroblocks  Option: no motion compensation  Option: can code block as inter or intra (like I picture)  Can skip macroblock (replace with previous). Great compression

Image Processing Architecture, © Oleh TretiakPage 40Midterm 2 review Coding Image Blocks B pictures  Inter or intra?  Forward, backward, interpolational?  Code block or skip?  Quantization step?

Image Processing Architecture, © Oleh TretiakPage 41Midterm 2 review H.261 Features Common Interchange Format  Interoperability between 25 fps and 30 fps countries  252 pix/line, 288 line, 30 fps noninterlace  Terminal equipment converts frame and line numbers  Y Cb Cr components, color sub-sampled by a factor of 2 in both directions Coding  DCT, 8x8, 4 Y and 2 chrominance per masterblock  I and P frames only, P blocks can be skipped  Motion compensation optional, only integer compensation  (Optional) forward error correction coding