SYDE 575: Introduction to Image Processing. Image Compression Part 2: Variable-rate compression

Similar documents
Multimedia Networking ECE 599

IMAGE COMPRESSION-II. Week IX. 03/6/2003 Image Compression-II 1

Image Data Compression

Waveform-Based Coding: Outline

Transform coding - topics. Principle of block-wise transform coding

Transform Coding. Transform Coding Principle

Basic Principles of Video Coding

IMAGE COMPRESSION IMAGE COMPRESSION-II. Coding Redundancy (contd.) Data Redundancy. Predictive coding. General Model

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

Image Compression. Qiaoyong Zhong. November 19, CAS-MPG Partner Institute for Computational Biology (PICB)

h 8x8 chroma a b c d Boundary filtering: 16x16 luma H.264 / MPEG-4 Part 10 : Intra Prediction H.264 / MPEG-4 Part 10 White Paper Reconstruction Filter

Compression methods: the 1 st generation

Compression. What. Why. Reduce the amount of information (bits) needed to represent image Video: 720 x 480 res, 30 fps, color

Overview. Analog capturing device (camera, microphone) PCM encoded or raw signal ( wav, bmp, ) A/D CONVERTER. Compressed bit stream (mp3, jpg, )

encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256

Inverse Problems in Image Processing

CSE 408 Multimedia Information System Yezhou Yang

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Contents. Acknowledgments

The Karhunen-Loeve, Discrete Cosine, and Related Transforms Obtained via the Hadamard Transform

Image Compression. Fundamentals: Coding redundancy. The gray level histogram of an image can reveal a great deal of information about the image

6. H.261 Video Coding Standard

BASICS OF COMPRESSION THEORY

3 rd Generation Approach to Video Compression for Multimedia

Laboratory 1 Discrete Cosine Transform and Karhunen-Loeve Transform

A Study of Embedding Operations and Locations for Steganography in H.264 Video

Image compression. Institute of Engineering & Technology, Ahmedabad University. October 20, 2015

Lecture 2: Introduction to Audio, Video & Image Coding Techniques (I) -- Fundaments

Wavelet Scalable Video Codec Part 1: image compression by JPEG2000

Lecture 2: Introduction to Audio, Video & Image Coding Techniques (I) -- Fundaments. Tutorial 1. Acknowledgement and References for lectures 1 to 5

Real-Time Audio and Video

Detailed Review of H.264/AVC

Compression and Coding

LORD: LOw-complexity, Rate-controlled, Distributed video coding system

Lossless Image and Intra-frame Compression with Integer-to-Integer DST

Product Obsolete/Under Obsolescence. Quantization. Author: Latha Pillai

H.264/MPEG4 Part INTRODUCTION Terminology

Digital Image Processing

GRAPH SIGNAL PROCESSING: A STATISTICAL VIEWPOINT

Lecture 7 Predictive Coding & Quantization

arxiv: v1 [cs.mm] 10 Mar 2016

CSE 126 Multimedia Systems Midterm Exam (Form A)

RLE = [ ; ], with compression ratio (CR) = 4/8. RLE actually increases the size of the compressed image.

CHAPTER 3. Transformed Vector Quantization with Orthogonal Polynomials Introduction Vector quantization

Image Compression. Universidad Politécnica de Madrid Dr.-Ing. Henryk Richter

A Variation on SVD Based Image Compression

Intelligent Visual Prosthesis

Wavelet-based Image Coding: An Overview

Introduction to Video Compression H.261

Source Coding for Compression

on a per-coecient basis in large images is computationally expensive. Further, the algorithm in [CR95] needs to be rerun, every time a new rate of com

Objective: Reduction of data redundancy. Coding redundancy Interpixel redundancy Psychovisual redundancy Fall LIST 2

THE newest video coding standard is known as H.264/AVC

EE67I Multimedia Communication Systems

Reduce the amount of data required to represent a given quantity of information Data vs information R = 1 1 C

Introduction p. 1 Compression Techniques p. 3 Lossless Compression p. 4 Lossy Compression p. 5 Measures of Performance p. 5 Modeling and Coding p.

The MPEG4/AVC standard: description and basic tasks splitting

Wavelets and Multiresolution Processing

Image Coding Algorithm Based on All Phase Walsh Biorthogonal Transform

Survey of JPEG compression history analysis

CHAPTER 4 PRINCIPAL COMPONENT ANALYSIS-BASED FUSION

Human Visual System Based Adaptive Inter Quantization

Modelling of produced bit rate through the percentage of null quantized transform coefficients ( zeros )

JPEG and JPEG2000 Image Coding Standards

Karhunen-Loève Transform KLT. JanKees van der Poel D.Sc. Student, Mechanical Engineering

Screen-space processing Further Graphics

Image Compression - JPEG

2. the basis functions have different symmetries. 1 k = 0. x( t) 1 t 0 x(t) 0 t 1

6.003: Signals and Systems. Sampling and Quantization

Compressing a 1D Discrete Signal

Multimedia Information Systems

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington

Principal Component Analysis CS498

Optimal Transform in Perceptually Uniform Color Space and Its Application in Image Coding *

Multiscale Image Transforms

Singular Value Decompsition

Department of Electrical Engineering, Polytechnic University, Brooklyn Fall 05 EL DIGITAL IMAGE PROCESSING (I) Final Exam 1/5/06, 1PM-4PM

Scalable resource allocation for H.264 video encoder: Frame-level controller

Source Coding: Part I of Fundamentals of Source and Video Coding

Statistical signal processing

H.264 / MPEG-4 Part 10 : Intra Prediction

Multimedia Communications Fall 07 Midterm Exam (Close Book)

Compressing a 1D Discrete Signal

ECG782: Multidimensional Digital Signal Processing

Analysis of Fractals, Image Compression and Entropy Encoding

Compression. Encryption. Decryption. Decompression. Presentation of Information to client site

Review of Quantization. Quantization. Bring in Probability Distribution. L-level Quantization. Uniform partition

Signal Analysis. Principal Component Analysis

Fault Tolerance Technique in Huffman Coding applies to Baseline JPEG

Approximation of the Karhunen}Loève transformation and its application to colour images

Entropy Encoding Using Karhunen-Loève Transform

Principal Component Analysis -- PCA (also called Karhunen-Loeve transformation)

Predictive Coding. Prediction Prediction in Images

Fast Fourier Transform

Predictive Coding. Prediction

Intraframe Prediction with Intraframe Update Step for Motion-Compensated Lifted Wavelet Video Coding

Video Coding with Motion Compensation for Groups of Pictures

7. Variable extraction and dimensionality reduction

Principal Component Analysis (PCA)

Module 4. Multi-Resolution Analysis. Version 2 ECE IIT, Kharagpur

Transcription:

SYDE 575: Introduction to Image Processing Image Compression Part 2: Variable-rate compression

Variable-rate Compression: Transform-based compression As mentioned earlier, we wish to transform image data into a form that reduces statistical correlation We also saw that when images are transformed into the frequency domain using the Fourier Transform Most of the energy resides in low frequency components A good approximation of the original image can be reconstructed using a few components

Variable-rate Compression: Transform-based compression Idea: What if we apply an image transform like the Fourier Transform to an image and encode the transform coefficients in a reduced, lossy form instead? Many of the transform coefficients have low associated energies and can be discarded or coarsely quantized with little image distortion

Image Transforms Converts images from one representation (e.g., spatial) to another (e.g., frequency) Forward transform n 1 n 1 T ( u, v) g( x, y) r( x, y, u, v) Transform coefficients = x= 0 y = 0 image Forward transform kernel

Image Transforms Inverse transform n 1 n 1 g( x, y) T ( u, v) s( x, y, u, v) = u = 0 v= 0 Inverse transform kernel Essentially representing an image using a set of basis functions

Selection of Image Transforms Selection of image transform is very important to compression performance as well as computational performance Some well-known image transforms Karhunen-Loeve (KL) transform Fourier transform Walsh-Hadamard transform (WHT) Discrete Cosine transform (DCT)

Karhunen-Loeve (KL) transform Optimal transform in terms of compression Minimizes mean square error Statistically decorrelated (off-diagonal elements of covariance matrix are zero) G = Φ T F F = Φ G (since Φ = Φ ) 1 T where T Φ Σ Φ = Λ Columns are eigenvectors Covariance Eigenvalues

Karhunen-Loeve (KL) transform Basis functions essential based on the eigenvectors Low-term components (with highest eigenvalues) contain most of the energy Advantages: Provides optimal compression performance from an energy compaction perspective Disadvantages: Computationally expensive, since the transform is data-dependent and deriving basis functions are non-trivial

Fourier transform Transformation kernels 2 π ( + )/ r( x, y, u, v) s( x, y, u, v) = = e 1 n 2 j ux vy n e j2 π ( ux + vy)/ n Advantages Hardware acceleration available on CPUs Disadvantages Relatively poor compression performance

Walsh-Hadamard Transform (WHT) Transformation kernels 1 r( x, y, u, v) = s( x, y, u, v) = ( 1) n m where n = 2 Advantages Computational simple Disadvantages Relatively poor compression performance (worse than Fourier transform) m 1 i= 0 bi ( x) pi ( x) + bi ( y) pi ( v)

Walsh-Hadamard Transform (WHT) Transformation kernels 1 r( x, y, u, v) = s( x, y, u, v) = ( 1) n m where n = 2 WH kernels consists of alternating plus (white) and minus (black) 1s in checkerboard pattern m 1 i= 0 bi ( x) pi ( x) + bi ( y) pi ( v)

Walsh-Hadamard Transform (WHT) Source: Gonzalez and Woods Advantages Computational simple implementation Disadvantages Relatively poor compression performance (worse than Fourier transform)

Discrete Cosine Transform (DCT) Transformation kernels r( x, y, u, v) = s( x, y, u, v) (2x + 1) uπ (2y + 1) vπ = α ( u) α ( v)cos cos 2n 2n where α ( u) 1 for u = 0 n = 2 for u = 1,2,..., n 1 n

Discrete Cosine Transform (DCT) Kernel Source: Gonzalez and Woods

Discrete Cosine Transform (DCT) Advantages Computational efficient (easy to implement in hardware) High compression performance (closely approximates performance of KLT for many images) Given these benefits, DCT has become an international standard for transform coding

Block Transform Coding Issue: Image transforms such as Fourier Transform are have relatively expensive from both computational and storage perspective Must hold all data in memory at once to perform transform Must account for all pixels in image when computing transform Difficult to implement in consumer-level devices such as DVD players and digital cameras

Block Transform Coding Solution: Break images into a set of smaller sub-images (''blocks'') Apply image transform on the sub-images independently Advantage: The amount of information that needs to be stored to transform a sub-image is small Since all operations are independent, they can be performed in parallel to improve computational efficiency

Block Transform Compression Framework Source: Gonzalez and Woods

How do we deal with color? As mentioned before, RGB color space is highly redundant and correlated Reduces compression performance Solution: Use a color space that decorrelates information such as luminance and color e.g., Before image transform, convert image from RGB color space to YcbCr Allows luma and chroma channels to be processed independently

Chroma Subsampling The human vision system is significantly more sensitive to variations in brightness (luma) than color (chroma) Idea: reducing the amount of chroma information stored compared to the amount of luma information should have little impact on perceived image quality

Example: JPEG In JPEG, image is converted from RGB to YCbCr The resolution of the Cb and Cr channels are reduced Commonly, the Cb and Cr channels are sub-sampled by at factor of 2 both horizontally and vertically

Results

Sub-image Construction After chroma subsampling, the individual channels are divided into a set of n x n subimages Generally, compression performance increases as sub-image size increases However, computational complexity increases as sub-image size increases Drawing a balance between compression performance and compression efficiency, 8x8 and 16x16 sub-image sizes are used

Reconstruction Error vs. Subimage Size 75% of coefficients are truncated Source: Gonzalez and Woods

Reconstruction Quality vs. Sub-image Size Source: Gonzalez and Woods

Quantization As mentioned earlier, the human vision system is much more sensitive to variations in low frequency components than high frequency components Also, much of the energy is packed in the low frequency components Idea: high frequency components can be represented coarsely ( quantized ) without perceptually noticeable degradation in image quality

Quantization Steps Transform image f from the spatial representation to T in the transform domain Quantize T based on a quantization matrix Z designed for the human vision system based on perceptual importance ˆ( T ( u, v) T u, v ) = round Z ( u, v )

Quantization Matrix (JPEG) Source: Gonzalez and Woods

Effect of Quantization Level on Image Quality Source: Gonzalez and Woods

Observations As quantization increases fine image detail starts to be lost (e.g., mouth and feathers start to degrade until completely disappearing) Blocking artifacts (i.e., visible boundaries between sub-images) becomes increasingly prominent However, uniform regions with little detail are significantly less affected by quantization

Adaptive Quantization High quantization are perceptually acceptable in uniform regions Low quantization is needed in regions with structural detail Idea: Adjust degree of quantization based on amount of image detail within a subimage Measure level of image detail (e.g., variance) of the sub-image Decrease quantization for sub-images with high image detail

Example Fixed quantization Adaptive quantization

Predictive Coding Images and videos contain a large amount of spatial and temporal redundancy Pixels in an image or video frame should be reasonably predicted by other pixels in The same image (intra-frame prediction) Adjacent frames (inter-frame prediction)

Intra-frame Predictive Coding For a sub-image f, find the sub-image p that is most similar to f (block matching) One approach is to find the sub-image that minimizes the mean absolute distortion (MAD) m n 1 MAD( x, y) = f ( x + i, y + j) f ( x + i + dx, x + j + dy) mn i = 1 j = 1 Usually performed on the luminance channel Encode and store vector (dx,dy)

Intra-frame Predictive Coding Calculate the error residual between the two sub-images e( x, y) = f ( x + i, y + j) f ( x + i + dx, x + j + dy) where i,j spans the dimension of the subimage Transform prediction error residual with image transform and quantized

Inter-frame Prediction Coding (Motion Compensation) Similar to intra-frame coding, but instead of within the same image, the prediction coding is performed between frames Source: Gonzalez and Woods

Results using Inter-frame Prediction Coding Source: Gonzalez and Woods