CT50A6100 Machine Vision and DIA 1 Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov Lectures 5: Image Compression Professor Heikki Kälviäinen.

Slides:



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

Data Compression CS 147 Minh Nguyen.
Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
Spatial and Temporal Data Mining
JPEG.
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Multimedia Data The DCT and JPEG Image Compression Dr Mike Spann Electronic, Electrical and Computer.
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]
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.
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.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Software Research Image Compression Mohamed N. Ahmed, Ph.D.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
Chapter 2 Source Coding (part 2)
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.
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.
Multimedia Data Video Compression The MPEG-1 Standard
MPEG-1 and MPEG-2 Digital Video Coding Standards Author: Thomas Sikora Presenter: Chaojun Liang.
Klara Nahrstedt Spring 2011
Prof. Amr Goneid Department of Computer Science & Engineering
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
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
JPEG CIS 658 Fall 2005.
COMPRESSION AND DECOMPRESSION 10/22/20151 A.Aruna, Assistant Professor, Faculty of Information Technology.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
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.
Digital Image Processing Image Compression
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Image Compression – Fundamentals and Lossless Compression Techniques
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
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.
Chapter 17 Image Compression 17.1 Introduction Redundant and irrelevant information  “Your wife, Helen, will meet you at Logan Airport in Boston.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
JPEG (Joint Photographic Expert Group)
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
Block-based coding Multimedia Systems and Standards S2 IF Telkom University.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Multi-media Data compression
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 7 ECEC 453 Image Processing Architecture Lecture 8, February 5, 2004 JPEG: A Standard.
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.
JPEG Compression What is JPEG? Motivation
IMAGE PROCESSING IMAGE COMPRESSION
IMAGE COMPRESSION.
Algorithms in the Real World
JPEG Image Coding Standard
Discrete Cosine Transform
JPEG.
Data Compression.
Huffman Coding, Arithmetic Coding, and JBIG2
CMPT 365 Multimedia Systems
Digital Multimedia Coding
Judith Molka-Danielsen, Oct. 02, 2000
JPEG Still Image Data Compression Standard
Image Coding and Compression
Presentation transcript:

CT50A6100 Machine Vision and DIA 1 Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov Lectures 5: Image Compression Professor Heikki Kälviäinen Machine Vision and Pattern Recognition Laboratory Department of Information Technology Faculty of Technology Management Lappeenranta University of Technology (LUT)

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 2 Content Introduction. Fundamentals in data compression. Binary Image Compression. Continuous tone images. Video image compression. The material at the following site are used: Special thanks to the authors of the material Prof. Pasi Fränti and Dr. Alexander Kolesnikov from University of Joensuu, Finland.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 3 Introduction Why do we need to compress images? Image types. Parameters of digital images. Lossless vs. lossy compression. Measures: rate, distortion, etc.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 4 What is data and image compression? Data compression is the art and science of representing information in a compact form. Data is a sequence of symbols taken from a discrete alphabet. Still image data, that is a collection of 2-D arrays (one for each color plane) of values representing intensity (color) of the point in corresponding spatial location (pixel).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 5 Why do we need image compression? Still image:  One page of A4 format at 600 dpi is > 100 MB.  One color image in a digital camera generates MB.  Scanned 3”  7” photograph at 300 dpi is 30 MB. Digital cinema:  4K  2K  3  12 bits/pel = 48 MB/frame or 1 GB/sec or 70 GB/min.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 6 Why do we need image compression? (cont.) 1) Storage. 2) Transmission. 3) Data access Disc capacities: 100MB -> 20 GB (200 times!) but seek time: 15 milliseconds  10 milliseconds and transfer rate: 1MB/sec ->2 MB/sec. Compression improves overall response time in some applications.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 7 Source of images Image scanner. Digital camera. Video camera. Ultra-sound (US), Computer Tomography (CT), Magnetic resonance image (MRI), digital X-ray (XR), Infrared. Etc.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 8 Image types Why do we need special algorithms for images?

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 9 Binary image: 1 bit/pixel

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 10 Grayscale image: 8 bits/pixel Intensity = 0-255

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 11 Parameters of digital images

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 12 True color image: 3*8 bits/pixel

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 13 RGB color space RedGreenBlue

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 14 YUV color space Y U V

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 15 RGB  YUV R, G, B -- red, green, blue Y -- the luminance U,V -- the chrominance components Most of the information is collected to the Y component, while the information content in the U and V is less.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 16 Palette color image [ R,G,B] = LUT[Index] Example: [64,64,0] = LUT[98] Look-up-table

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 17 Multicomponent image: n*8 bits/pixel Spectral image: n components according to wavelengths. Three components R, G, B => “usual” color image.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 18 Multicomponent image: n*8 bits/pixel (cont.) Spectral components and spatial components. For example, remote sensing (satellite images).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 19 Why we can compress image? Statistical redundancy: 1) Spatial correlation a) Local: pixels at neighboring locations have similar intensities. b) Global: reoccurring patterns. 2) Spectral correlation – between color planes. 3) Temporal correlation – between consecutive frames. Tolerance to fidelity: (toistotarkkuus) 1) Perceptual redundancy. 2) Limitation of rendering hardware.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 20 Lossy vs. lossless compression Lossless compression: reversible, information preserving text compression algorithms, binary images, palette images. Lossy compression: irreversible grayscale, color, video. Near-lossless compression: medical imaging, remote sensing. 1) Why do we need lossy compression? 2) When we can use lossy compession?

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 21 Lossy vs. lossless compression (cont.)

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 22 What measures? Bit rate: How much per pixel? Compression ratio: How much smaller? Computation time: How fast? Distortion: How much error in the presentation?

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 23 Rate measures Bit rate: Compression ratio : bits/pixel k = the number of bits per pixel in the original image C/N = the bit rate of the compressed image

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 24 Distortion measures Mean average error (MAE): Mean square error (MSE): Signal-to-noise ratio (SNR): Pulse-signal-to-noise ratio (PSNR): (decibels) A is amplitude of the signal: A = =255 for 8-bits signal.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 25 Other issues Coder and decoder computation complexity. Memory requirements. Fixed rate or variable rate. Error resilience (sensitivity). Symmetric or asymmetric. Decompress at multiple resolutions. Decompress at various bit rates. Standard or proprietary (application based).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 26 Fundamentals in data compression Modeling and coding: –How, and in what order the image is processed? –What are the symbols (pixels, blocks) to be coded? –What is the statistical model of these symbols? Requirement: –Uniquely decodable: different input => different output. –Instantaneously decodable: the symbol can be recognized after its last bit has been received.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 27 Modeling: Segmentation and order of processing Segmentation: –Local (pixels) or global (fractal compression). –Compromise: block coding. Order of processing: –In what order the blocks (or the pixels) are processed? –In what order the pixels inside the block are processed?

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 28 Modeling: Order of processing Order of processing: –Row-major order: top-to-down, left-to-right. –Zigzag scanning: Pixel-wise processing (a). DCT-transformed block (Discrete Cosine Transform) (b). –Progressive modeling: The quality of an image quality increases gradually as data are received. For example in pyramid coding: first the low resolution version, then increasing the resolution.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 29 Modeling: Order of processing

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 30 Modeling: Statistical modeling Set of symbols (alphabet) S={s 1, s 2, …, s N }, N is number of symbols in the alphabet. Probability distribution of the symbols: P={p 1, p 2, …, p N } According to Shannon, the entropy H of an information source S is defined as follows:

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 31 Modeling: Statistical modeling The amount of information in symbol s i, i.e., the number of bits to code or code length for the symbol s i : The average number of bits for the source S:

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 32 Modeling: Statistical modeling Modeling schemes: –Static modeling: Static model (code table). One-pass method: encoding. ASCII data: p(‘e’)= 10 %, p(‘t’)= 8 %. –Semi-adaptive modeling: Two-pass method: (1) analysis, (2) encoding. –Adaptive (or dynamic) modeling: Symbol by symbol on-line adaptation during coding/encoding. One-pass method: analysis and encoding.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 33 Modeling: Statistical modeling Modeling schemes: – Context modeling: Spatial dependencies between the pixels. For example, what is the most probable symbol after a known sequence of symbols? –Predictive modeling (for coding prediction errors): Prediction of the current pixel value. Calculating the prediction error. Modeling the error distribution. Differential pulse code modulation (DPCM).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 34 Coding: Huffman coding INIT: Put all nodes in an OPEN list and keep it sorted all times according to their probabilities. REPEAT a) From OPEN pick two nodes having the lowest probabilities, create a parent node of them. b) Assign the sum of the children’s probabilities to the parent node and inset it into OPEN. c) Assign code 0 and 1 to the two branches of the tree, and delete the children from OPEN.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 35 Huffman Coding: Example Symbol p i -log 2 (p i ) CodeSubtotal A 15/ *15 B 7/ *7 C 6/ *6 D 6/ *6 E 5/ *5 Total: 87 bits A C D E 1 B H = 2.19 bits L = 87/39=2.23 bits Binary tree

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 36 Huffman Coding: Decoding A - 0 B C D E A C D E 1 B Binary tree Bit stream: (22 bits) Codes: Message: B A B A C A C A D E

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 37 Properties of Huffman coding Optimum code for a given data set requires two passes. Code construction complexity O(N log N). Fast lookup table based implementation. Requires at least one bit per symbol. Average codeword length is within one bit of zero-order entropy (Tighter bounds are known): H  R  H+1 bit Susceptible to bit errors.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 38 Coding: Arithmetic coding Alphabet extension (blocking symbols) can lead to coding efficiency. How about treating entire sequence as one symbol! Not practical with Huffman coding. Arithmetic coding allows you to do precisely this. Basic idea: map data sequences to sub-intervals in [0,1) with lengths equal to the probability of corresponding sequence. QM-coder is an arithmetic coding tailored for binary data. 1) Huffman coder: H  R  H + 1 bit/pel 2) Block coder: H n  R n  H n + 1/n bit/pel 3) Arithmetic coder: H  R   H + 1 bit/message (!)

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 39 Arithmetic coding: Example 0.70

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 40 Binary image compression Binary images consist only of two colors, black and white. The probability distribution of the alphabet is often very skew: p(white)=0.98, and p(black)=0.02. Moreover, the images usually have large homogenous areas of the same color.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 41 Binary image compression: Methods Run-length encoding. Predictive encoding. READ code. CCITT group 3 and group 4 standards. Block coding. JBIG, JBIG2 (Joint Bilevel Image Experts Group). Standard by CCITT and ISO. Context-based compression pixel by pixel. QM-coder (arithmetic coder).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 42 Run-length coding: Idea Pre-processing method, good when one symbol occurs with high probability or when symbols are dependent. Count how many repeated symbol occur. Source ’symbol’ = length of run. Example: …, 4b, 9w, 2b, 2w, 6b, 6w, 2b,...

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 43 Run-length encoding: CCITT standard Huffman code table

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 44 JBIG Graphic (line art) Halftone Bilevel (binary) documents. Both graphics and pictures (halftone).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 45 Comparison of algorithms

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 46 Continuous tone images: lossless compression Lossless and near-lossless compression. –Bit-plane coding: to bit-planes of a grayscale image. –Lossless JPEG (Joint Photographic Experts Group). Pixel by pixel by predicting the current pixel on the basis of the neighboring pixels. Prediction errors coded by Huffman or arithmetic coding (QM-coder).

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 47 Continuous tone images: lossy compression Vector quantization: codebooks. JPEG (Joint Photographic Experts Group). Lossy coding of continuous tone still images (color and grayscale). Based on Discrete Cosine Transform (DCT): 0) Image is divided into block N  N. 1) The blocks are transformed with 2-D DCT. 2) DCT coefficients are quantized. 3) The quantized coefficients are encoded.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 48 JPEG: Encoding and Decoding

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 49 Divide image into NN blocks 8x8 block Input image

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 50 2-D DCT basis functions: N=8 Low High Low High Low 8x8 block

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 51 2-D Transform Coding +... y 00 y 01 y 10 y 12 y 23

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 52 Zig-zag ordering of DCT coefficients Converting a 2-D matrix into a 1-D array, so that the frequency (horizontal and vertical) increases in this order and the coefficents variance are decreasing in this order. AC: Alternating current DC: Direct current

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 53 Example of DCT for image block Matlab: y=dct(x)

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 54 Performance of the JPEG algorithm 8 bpp0.6 bpp 0.37 bpp 0.22 bpp

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 55 Continuous tone images: more methods Pyramid coding. Fractal coding. Wavelet transform. –JPEG 2000.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 56 JPEG JPEG2000 JPEG: 0.25 bpp JPEG2000: 0.25 bpp

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 57 Video image compression Video images are three-dimensional generalization of still images (spatial correlation) where the third dimension is time (spatial and temporal correlation). Each frame of a video sequence can be compressed by any image compression algorithm. Motion JPEG (M-JPEG). –Images separately JPEG coded. MPEG (Moving Pictures Expert Group). –Temporal correlations used. –Two basic techniques: Block based motion compensation. DCT based compression.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 58 Video images: compression ratios NTSC TV HDTV Film quality Channel Bit rate 168 Mb/s 933 Mb/s 2300 Mb/s PC LAN 30 kb/s 5,600:1 31,000:1 76,000:1 Modems 56 kb/s 3,000:1 17,000:1 41,000:1 ISDN kb/s 1,166:1 6,400:1 16,000:1 T-1, DSL 1.5 Mb/s 112:1 622:1 1,500:1 Ethernet 10 Mb/s 17:1 93:1 230:1 T-3 42 Mb/s 4:1 22:1 54:1 Fiber optic 200 Mb/s 1:1 5:1 11:1

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 59 MPEGs MPEG-1 (1992): VideoCD. MPEG-2 (1994): DVD, digital TV, SVCD. * about 50:1 compression, typically 3-10 Mbps. MPEG-3: was abandoned. MPEG-4 ( ): DivX (starting from Version 5). * designed specially for low-bandwidth. MPEG-7 (>1998): * searching and indexing of a/v data, using Description Tools.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 60 MPEG-1: Blocks The pictures are divided into 16x16 macroblocks, each consisting of four 8x8 elementary blocks. The choice of the prediction method is chosen for each macroblock separately. The intra-coded blocks are quantized differently from the predicted blocks: * Intra-coded blocks contain information in all frequencies and are quantized differently from the predicted blocks * The predicted blocks, contain mostly high frequencies and can be quantized with more coarse quantization tables.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 61 MPEG-1: Inter-block Prediction Bidirectional prediction. Forward prediction. Backward prediction. Intra coding. II PP

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 62 MPEG-1: Predictions schemes I: Intra pictures are coded as still images by DCT. P: Predicted pictures are coded with reference to a past picture. The difference between the prediction and the original picture is then compressed by DCT. B: Bidirectional pictures, the prediction can be made both to a past and a future frame. Bidirectional pictures are never used as reference.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 63 Motion estimation and compensation The prediction block in the reference frame is not necessarily in the same coordinates than the block in the current frame. Because of motion in the image sequence, the most suitable predictor for the current block may exist anywhere in the reference frame. The motion estimation specifies where the best prediction (best match) is found. Motion compensation consists of calculating the difference between the reference and the current block.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 64 Motion estimation: 1 Exhaustive search block matching. Slow!

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 65 Motion estimation : 2 Hierarchical block matching.

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 66 Multicomponent (spectral) image compression

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 67 Compression: Spectral reduction and clustering

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 68 Spectral video: MPEG for multicomponent images

CT50A6100 Machine Vision and DIA Prof. Heikki Kälviäinen, Prof. P. Franti, Dr. A. Kolesnikov 69 Summary: Image compression Why do we need special image compression algorithms? MPEG JPEG JBIG M-JPEG Huffman coding Arithmetic coding Multicomponent images Fractal coding, pyramid coding, bit-plane coding, vector quantization DCT RLE Wavelet transform