Introduction to Image Compresion

Similar documents
Source Coding and express these numbers in a binary system using M log

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

DCT Based, Lossy Still Image Compression

arxiv: v1 [cs.mm] 18 Jan 2016

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Face Recognition Using Legendre Moments

Multimedia Networking ECE 599

An Efficient Coding Method for Coding Region-of-Interest Locations in AVS2

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

IMAGE COMPRESSION- I. Week VIII Feb /25/2003 Image Compression-I 1

SPARSE SIGNAL REPRESENTATION FOR COMPLEX-VALUED IMAGING Sadegh Samadi 1, M üjdat Çetin 2, Mohammad Ali Masnadi-Shirazi 1

Stereo Disparity Estimation in Moment Space

EE678 Application Presentation Content Based Image Retrieval Using Wavelets

Mitigating the Impact of Decompression Latency in L1 Compressed Data Caches via Prefetching

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

Source Coding Basics and Speech Coding. Yao Wang Polytechnic University, Brooklyn, NY11201

Multimedia Communications. Transform Coding

EP2200 Performance analysis of Communication networks. Topic 3 Congestion and rate control

Interactive Image Segmentation

Wireless Communication

A measure of compression gain for new alphabet symbols in data-compression

Decoding-Workload-Aware Video Encoding

Lecture 5: Compression I. This Week s Schedule

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Patterned Wafer Segmentation

EE67I Multimedia Communication Systems Lecture 4

Intro. To Multimedia Engineering Lossless Compression

Facial Expression Recognition using Image Processing and Neural Network

CENTRAL AND PARALLEL PROJECTIONS OF REGULAR SURFACES: GEOMETRIC CONSTRUCTIONS USING 3D MODELING SOFTWARE

Randomized algorithms: Two examples and Yao s Minimax Principle

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model

Robust Motion Estimation for Video Sequences Based on Phase-Only Correlation

A Novel Iris Segmentation Method for Hand-Held Capture Device

Lecture 6: Compression II. This Week s Schedule

AN INTEGER LINEAR MODEL FOR GENERAL ARC ROUTING PROBLEMS

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

IMAGE COMPRESSION TECHNIQUES

Video Compression Standards (II) A/Prof. Jian Zhang

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Wavelet Based Statistical Adapted Local Binary Patterns for Recognizing Avatar Faces

06/12/2017. Image compression. Image compression. Image compression. Image compression. Coding redundancy: image 1 has four gray levels

22. Swaping: Policies

Lossless Compression Algorithms

Real Time Compression of Triangle Mesh Connectivity

An Efficient Video Program Delivery algorithm in Tree Networks*

An empirical analysis of loopy belief propagation in three topologies: grids, small-world networks and random graphs

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS

A Study of Protocols for Low-Latency Video Transport over the Internet

Pivot Selection for Dimension Reduction Using Annealing by Increasing Resampling *

CS 335 Graphics and Multimedia. Image Compression

Learning Motion Patterns in Crowded Scenes Using Motion Flow Field

Texture Mapping with Vector Graphics: A Nested Mipmapping Solution

Audio-coding standards

Introduction to Parallel Algorithms

Efficient stereo vision for obstacle detection and AGV Navigation

Improved Image Super-Resolution by Support Vector Regression

Grouping of Patches in Progressive Radiosity

Image Compression for Mobile Devices using Prediction and Direct Coding Approach

7.5 Dictionary-based Coding

Optimizing Dynamic Memory Management!

SEARCH ENGINE MANAGEMENT

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

Visualization, Estimation and User-Modeling for Interactive Browsing of Image Libraries

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

A Novel Image Compression Technique using Simple Arithmetic Addition

Introduction to Visualization and Computer Graphics

521493S Computer Graphics Exercise 3 (Chapters 6-8)

( ) ; For N=1: g 1. g n

1.5 Case Study. dynamic connectivity quick find quick union improvements applications

TD C. Space filling designs in R

Image Coding and Data Compression

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data

Lecture 12: Compression

CoE4TN4 Image Processing. Chapter 8 Image Compression

AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS. Ren Chen and Viktor K.

Digital Image Processing

Optimal Multiple Sprite Generation based on Physical Camera Parameter Estimation

Objectives. Part 1: Implement Friction Compensation.

Support Vector Machines for Face Authentication

Lecture 8: Orthogonal Range Searching

Improve Precategorized Collection Retrieval by Using Supervised Term Weighting Schemes Λ

Selecting Discriminative Binary Patterns for a Local Feature

AUTOMATIC EXTRACTION OF BUILDING OUTLINE FROM HIGH RESOLUTION AERIAL IMAGERY

SOME CONCEPTS IN DISCRETE COSINE TRANSFORMS ~ Jennie G. Abraham Fall 2009, EE5355

Lec 04 Variable Length Coding in JPEG

Figure 8.1: Home age taken from the examle health education site (htt:// Setember 14, 2001). 201

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

Collective communication: theory, practice, and experience

AN early generation of unstructured P2P systems is

[Singh*, 5(3): March, 2016] ISSN: (I2OR), Publication Impact Factor: 3.785

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism

Denoising of Laser Scanning Data using Wavelet

A Model-Adaptable MOSFET Parameter Extraction System

1 Introduction to Game Theory

Chapter 8: Adaptive Networks

TOPP Probing of Network Links with Large Independent Latencies

The Research on Curling Track Empty Value Fill Algorithm Based on Similar Forecast

Transcription:

ENEE63 Fall 2 Lecture-7 Introduction to Image Comresion htt://www.ece.umd.edu/class/enee63/ minwu@eng.umd.edu M. Wu: ENEE63 Digital Image Processing (Fall') Min Wu Electrical & Comuter Engineering Univ. of Maryland, College Park Review of Last Time -D transform of a vector Reresent an N-samle sequence as a vector in N-dimension vector sace Transform Different reresentation of this vector in the sace via different basis e.g., -D DFT from time domain to frequency domain Forward transform In the form of inner roduct Project a vector onto a new set of basis to obtain N coefficients Inverse transform Use linear combination of basis vectors weighted by transform coeff. to reresent the original signal 2-D transform of a matrix Rewrite the matrix into a vector and aly -D transform Searable transform allows alying transform to rows then columns M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [2] Review of Last Time (cont d) Reresentation with orthonormal basis Unitary transform Preserve energy, decorrelation, etc. Common unitary transforms DFT, DCT, KLT Which transform to choose? Deend on need in articular task/alication DFT ~ reflect hysical meaning of frequency or satial frequency KLT ~ otimal in energy comaction DCT ~ real-to-real, and close to KLT s energy comactability Today s addition: Haar Transform Construction of Haar functions Unique decomosition of integer k (, q) k =,, N- with N = 2 n, <= <= n- q =, (for =); <= q <= 2 (for >) e.g., k= (,), k= (,); k=2 (,), k=3 (,2) h k (x) = h,q (x) for x [,] h ( x) = h h ( x) = h k ( x) = N,, q 2 N ( x) = 2 N for x [,] / 2 / 2 q- q- 2 for x < 2 2 q- 2 q for x < 2 2 for other x [,] ower of 2 k = 2 + q reminder x M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [3] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [4]

Haar Transform Haar transform H Samleh k (x) at {m/n} m =,, N- Real and orthogonal Transition at each scale is localized according to q 2 8 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Comare Basis Images of DCT and Haar Basis images of 2-D (searable) Haar transform One examle of wavelets and and multiresolution concets NxN DCT basis images reflect transitions throughout the NxN image Ordered by frequency Haar basis images can reflect local transitions Ordered both by frequency and by satial location index M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [5] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [6] Why Need Comression? Savings in storage and transmission multimedia data (es. image and video) have large data volume difficult to send real-time uncomressed video over current network Image Comression Part-. Basics Accommodate relatively slow storage devices they do not allow laying back uncomressed multimedia data in real time x CD-ROM transfer rate ~ 5 kb/s 32 x 24 x 24 fs color video bit rate ~ 5.5MB/s => 36 seconds needed to transfer -sec uncomressed video from CD M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [7] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [8] 2

Examle: Storing An Encycloedia From Ken Lam s DCT talk 2 (HK Polytech) 5, ages of text (2kB/age) ~ GB => 2: comress 3, color ictures (64 48 24bits) ~ 3GB => 5: 5 mas (64 48 6bits=.6MB/ma) ~.3GB => : 6 minutes of stereo sound (76kB/s) ~.6GB => 6: 3 animations with average 2 minutes long (64 32 6bits 6frames/s=6.5MB/s) ~ 23.4GB => 5: 5 digitized movies with average minute long (64 48 24bits 3frames/s = 27.6MB/s) ~ 82.8GB => 5: PCM coding How to encode a digital image into bits? Samling and erform uniform quantization Pulse Coded Modulation (PCM) 8 bits er ixel ~ good for grayscale image/video -2 b ~ needed for medical images Reduce # of b for reasonable quality via quantization Quantization reduces # of ossible levels to encode Visual quantization: comanding, contrast quantization, dithering, etc. Halftone use b but usually usamling ~ saving less than 2: Require a total of.gb storage caacity if without comression Reduce to 2.96GB if with comression I(x,y) Inut image Samler Quantizer Encoder image caturing device transmit M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [9] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [] Discussion on Imroving PCM Quantized PCM values may not be equally likely Can we do better than encode each value using same # bits? Examle P( ) =.5, P( ) =.25, P( 2 ) =.25, P( 3 ) =.25 If use same # bits for all values Need 2 bits to reresent the four ossibilities if treat If use less bits for likely values ~ Variable Length Codes (VLC) => [], => [], 2 => [], 3 => [] Use.75 bits on average ~ saves.25 b! Bring robability into the icture Previously use rob. distr. to reduce MSE of quantization Now use rob. distr. to reduce average # bits er quantized samle Entroy coding Idea: use less bits for commonly seen values How many # bits needed? Limit of comression => Entroy Measures the uncertainty or amount of avg. information of a source Definition: H = Σ i i log 2 ( / i ) bits e.g., entroy of revious examle is.75 Can t reresent a source erfectly with less than avg. H bits er samle Can reresent a source erfectly with avg. H+ε bits er samle ( Shannon Lossless Coding Theorem) Comressability deends on the sources Imortant to decode coded stream efficiently without ambiguity See info. theory course for more theoretical details M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [2] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [3] 3

E.g. of Entroy Coding: Huffman Coding Huffman Coding (cont d) Variable length code assigning about log 2 ( / i ) bits for the i th value has to be integer# of bits er symbol Ste- Arrange i in decreasing order and consider them as tree leaves Ste-2 Merge two nodes with smallest rob. to a new node and sum u rob. Arbitrarily assign and to each air of merging branch Ste-3 Reeat until no more than one node left. Read out codeword sequentially from root to leaf PCM Huffman S S S2 S3 S4 S5 S6 S7.25.2.5.4.625.625.625.625.29.25.25.54.25.46. M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [5] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [6] Huffman Coding: Pros & Cons Pro Simlicity in imlementation (table looku) For a given block size Huffman coding gives the best coding efficiency Con Need to obtain source statistics Imrovement Code a grou of symbols as a whole to allow fractional # bit er symbol Arithmetic coding Lemel-Ziv coding or LZW algorithm universal, no need to estimate source statistics Discussion: Coding a Binary Image How to efficiently encode it? Run-length coding (RLC) Code length of runs of between successive run-length of ~ # of between good if often getting frequent large runs of and sarse E.g., => (4) () (3) () (6) () () Assign fixed-length codeword to run-length Or use variable-length code like Huffman to further imrove RLC Also alicable to general binary data sequence with sarse (or ) M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [7] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [8] 4

Probability Model of Run-Length Coding Assume successive occur indeendently w.. Prob. of getting an L runs of (L=,,, M) P( L ) = L (-) for <= l <= M- (geometric distribution) P( L ) = M for L=M Avg. # binary symbols er run S avg = Σ L (L+) L (-) + M M = ( M ) / ( ) Comression ratio C = S avg / log 2 (M+) = ( M ) / [( ) log 2 (M+)] Examle P =.9, M=5 S avg = 7.94, C =.985, H =.469 b Avg. run-length coding rate B avg = 4 bit / 7.94 ~.56 b Coding efficiency = H / B avg ~ 9% How to Encode Correlated Sequence? Consider: high correlation between successive samles Predictive coding Basic rincile: Remove redundancy between successive ixels and only encode residual between actual and redicted Residue usually has much smaller dynamic range Allow fewer quantization levels for the same MSE => get comression Comression efficiency deends on intersamle redundancy First try u(n) + u q ~ (n) _ e(n) Quantizer u q (n) Encoder Decoder M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [9] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [2] Predictive Coding (cont d) Problem with st try Inut to redictor are different at encoder and decoder decoder doesn t know u(n)! Mismatch error could roagate to future reconstructed samles Solution: Differential PCM (DPCM) Use quantized sequence u q (n) for rediction at both encoder and decoder u q~ (n)= f( u q (n-), u q (n-2),, u q (n-m) ) Prediction error e(n) Quantized rediction error e q (n) Distortion d(n) = e(n) e q (n) u(n) u q ~ (n) + _ u q ~ (n) e(n) Quantizer Encoder Decoder What redictor to use? u q (n) + + u q (n) Summary Finish image transform Begin basics on image coding/comression PCM coding Entroy coding Huffman Run-length Predictive coding Next time: transform coding M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [2] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [22] 5

Assignment Readings Jain s.-.3 Reference Bovik s Handbook Sec.5. ENE63 Course Project: Introduction Food for thoughts What redictors to use for image redictive coding? ros and cons Announcement st in-class exam will be given after Image Comression M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [23] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [24] Toic: Video Coding and Processing Team roject 2 students er team A few 3-erson teams are allowed by instructor s ermission What to turn in finally? A video codec (encoder-decoder) Self-roosed art on video rocessing/analysis Ste-by by-ste Aroach [9-/] 3 Building Blocks (BB) ~ similar to assignment individual work should kee a big icture of the roject in mind [/2] Team-u and submit roject roosal [2/2] Project demo, resentation, and reort eer review Details will be announced soon First BB on image transform will be osted this weekend M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [25] M. Wu: ENEE63 Digital Image Processing (Fall') Lec7 Image Comression 9/2/ [26] 6