Image Compression – Fundamentals and Lossless Compression Techniques

Slides:



Advertisements
Similar presentations
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Advertisements

Digital Image Processing
Image Compression, Transform Coding & the Haar Transform 4c8 – Dr. David Corrigan.
SWE 423: Multimedia Systems
Fundamental limits in Information Theory Chapter 10 :
Spatial and Temporal Data Mining
Image Compression (Chapter 8)
Image Compression (Chapter 8)
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
CMPT 365 Multimedia Systems
1 Image Compression อ. รัชดาพร คณาวงษ์ วิทยาการคอมพิวเตอร์ คณะ วิทยาศาสตร์ มหาวิทยาลัยศิลปากรวิทยาเขต พระราชวังสนามจันทร์
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]
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Image Compression Image compression address the problem of reducing the amount of data required to represent a digital image with no significant loss of.
Software Research Image Compression Mohamed N. Ahmed, Ph.D.
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
Digital Image Processing 3rd Edition
©2003/04 Alessandro Bogliolo Background Information theory Probability theory Algorithms.
Entropy and some applications in image processing Neucimar J. Leite Institute of Computing
Chapter 5 : IMAGE COMPRESSION – LOSSLESS COMPRESSION - Nur Hidayah Bte Jusoh (IT 01481) 2)Azmah Bte Abdullah Sani (IT 01494) 3)Dina Meliwana.
CSE & CSE Multimedia Processing Lecture 7
Chapter 2 Source Coding (part 2)
Computer Vision – Compression(2) Hanyang University Jong-Il Park.
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.
Image Restoration AND Compression
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Klara Nahrstedt Spring 2011
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2011.
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Prof. Amr Goneid Department of Computer Science & Engineering
Chapter 8 Image Compression. What is Image Compression? Reduction of the amount of data required to represent a digital image → removal of redundant data.
Indiana University Purdue University Fort Wayne Hongli Luo
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
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.
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
Image Compression Fasih ur Rehman. Goal of Compression Reduce the amount of data required to represent a given quantity of information Reduce relative.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
Digital Image Processing (DIP) Lecture # 5 Dr. Abdul Basit Siddiqui Assistant Professor-FURC 1FURC-BCSE7.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Computer Vision – Compression(1) Hanyang University Jong-Il Park.
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
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
CS654: Digital Image Analysis
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Digital Image Processing Lecture 22: Image Compression
Image Processing Architecture, © Oleh TretiakPage 1Lecture 4 ECE-C490 Winter 2004 Image Processing Architecture Lecture 4, 1/20/2004 Principles.
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.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 14 Morphological Image Processing 11/17/11.
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.
IT472 Digital Image Processing
Entropy vs. Average Code-length Important application of Shannon’s entropy measure is in finding efficient (~ short average length) code words The measure.
Image Compression (Chapter 8) CS474/674 – Prof. Bebis.
Image Compression (Chapter 8)
IMAGE PROCESSING IMAGE COMPRESSION
Digital Image Processing Lecture 20: Image Compression May 16, 2005
IMAGE COMPRESSION.
Image Compression The still image and motion images can be compressed by lossless coding or lossy coding. Principle of compression: - reduce the redundant.
JPEG.
CH 8. Image Compression 8.1 Fundamental 8.2 Image compression models
Image Compression 9/20/2018 Image Compression.
CMPT 365 Multimedia Systems
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 Fundamentals Error-Free Compression
Topic 1 Three related sub-fields Image processing Computer vision
Presentation transcript:

Image Compression – Fundamentals and Lossless Compression Techniques ECE472/572 - Lecture 11 Image Compression – Fundamentals and Lossless Compression Techniques 11/03/11

Roadmap Knowledge Base Image Enhancement Image Restoration Image Preprocessing – low level Image Enhancement Image Restoration Image Segmentation Image Acquisition Image Compression Image Coding Representation & Description Morphological Image Processing Wavelet Analysis Recognition & Interpretation Knowledge Base

Roadmap Color image processing Image compression Lossless compression Interpreting color Pseudo-color IP Intensity slicing Transform in spatial domain Transform in frequency domain Full-color IP Tonal correction Color correction Enhancement (I vs. RGB channels) Restoration (I vs. RGB channels) Color image edge detection Image compression Data vs. information Entropy Data redundancy Coding redundancy Interpixel redundancy Psycho-visual redundancy Fidelity measurement Lossless compression Variable length coding Huffman coding LZW Bitplane coding Binary image compression Run length coding Lossless predictive coding Lossy compression

Questions What is the difference between data and information? How to measure data redundancy? How many different types of data redundancy? Explain each. What is entropy? What is the first/second order estimate of entropy? Understand the two criteria that all coding mechanisms should satisfy. Understand Huffman coding How do you explain the average coding length from Huffman coding is always greater than the entropy? What image format uses which coding scheme? Understand RLC, differential coding

Data and Information Data and information Data redundancy Different data set can represent the same kind of information Data redundancy Relative data redundancy CR: compression ratio n1, n2: number of information carrying units in two data sets that represent the same information Data compression Reducing the amount of data required to represent a given quantity of information

Data Redundancy Coding redundancy Interpixel redundancy Psychovisual redundancy

Coding Redundancy In general, coding redundancy is present when the codes assigned to a set of events (such as gray-level values) have not been selected to take full advantage of the probabilities of the events. In most images, certain gray levels are more probable than others

Coding Redundancy - Example

Interpixel Redundancy Because the value of any pixel can be reasonably predicted from the value of its neighbors, much of the visual contribution of a single pixel to an image is redundant, it could have been guessed on the basis of its neighbors’ values. Include spatial redundancy, geometric redundancy, interframe redundancy

Interpixel Redundancy - Example

Psychovisual Redundancy The eye does not respond with equal sensitivity to all visual information. Certain information simply has less relative importance than other information in normal visual processing In general, an observer searches for distinguishing features such as edges or textural regions and mentally combines them into recognizable groupings.

Psychvisual Redundancy Improved Gray Scale Quantization (IGS)

Evaluation Metrics Fidelity criteria Measure information Entropy

Fidelity Criteria Objective fidelity criteria Root-mean-square error (erms) Mean-square signal-to-noise ratio (SNRms) Root-mean-square SNRms (SNRrms)

Measure Information A random event E that occurs with probability P(E) is said to contain I(E): self-information of E The amount of self-information attributed to event E is inversely related to the probability of E If base 2 is used, the unit of information is called a bit Example: if P(E) = ½, then I(E) = -log2P(E) = 1.

Entropy Average information per source output, or uncertainty, or entropy of the source How to interpret the increase of entropy? What happens if the events are equally probable?

Example Estimate the information content (entropy) of the following image (8 bit image): First-order estimate of the entropy (bits/pixel) Second-order estimate of the entropy (bits every two pixels) What do these two numbers tell you?

Compression Approaches Error-free compression or lossless compression Variable-length coding Bit-plane coding Lossless predictive coding Lossy compression Lossy predictive coding Transform coding

Variable-length Coding Only reduce code redundancy Assign the shortest possible code words to the most probable gray levels Huffman coding Can obtain the optimal coding scheme

Revisit Example Can we do this?

Huffman Coding Uniquely decodable Instantaneous coding Source reduction Order the probabilities of symbols Combine the lowest probability symbols into a single symbol that replaces them in the next source reduction Code each reduced source, starting with the smallest source and working back to the original source

Example R1 0.25 (01) 0.25 (01) 0.25 (01) 0.25 (01) 0.35 (00) 0.4 (1) 0.6 (0) R2 0.21 (10) 0.21 (10) 0.21 (10) 0.21 (10) 0.25 (01) 0.35 (00) 0.4 (1) R0 0.19 (11) 0.19 (11) 0.19 (11) 0.19 (11) 0.21 (10) 0.25 (01) R3 0.16 (001) 0.16 (001) 0.16 (001) 0.19 (000) 0.19 (11) R4 0.08 (0001) 0.08 (0001) 0.11 (0000) 0.16 (001) R5 0.06 (00000) 0.06 (00000) 0.08 (0001) R6 0.03 (000010) 0.05 (00001) R7 0.02 (000011) Entropy of the source: -0.25*log2(0.25) - 0.21*log2(0.21) - 0.19*log2(0.19) - 0.16*log2(0.16) -0.08*log2(0.08) - 0.06*log2(0.06) - 0.03*log2(0.03) - 0.02*log2(0.02) = 2.6508 bits/pixel Problem when there are too many symbols Average length of Huffman code: 2*0.25 + 2*0.21 + 2*0.19 + 3*0.16 + 4*0.08 + 5*0.06 + 6*0.03 + 6*0.02 = 2.7 bits

LZW Lempel-Ziv-Welch Attack interpixel redundancy - spatial redundancy Assigns fixed-length code words to variable length sequences of source symbols Requires no a-priori knowledge of the probability of occurrence of the symbols Used in GIF, TIFF, PDF Coding book is created while the data are being encoded PNG was created to get around LZW licensing requirements

39 39 126 126 Example

Bit-plane Coding Attack inter-pixel redundancy First decompose the original image into bit-plane Binary image compression approach run-length coding (RLC)

Bit-plane Decomposition Bit-plane slicing Problem: small changes in gray level can have a significant impact on the complexity of the bit plane 127 vs. 128  0111 1111 vs. 1000 0000 Solution: Example: 127  0111 1111  0100 0000 128  1000 0000  1100 0000

Binary Image Compression - RLC Developed in 1950s Standard compression approach in FAX coding Approach Code each contiguous group of 0’s or 1’s encountered in a left to right scan of a row by its length Establish a convention for determining the value of the run Code black and white run lengths separately using variable-length coding

A Complete Example Run-length coding 2 127 128 3 32 33 Original image 2 127 128 3 32 33 Original image Binary code XOR binary 8 bit planes Huffman coding Final code 0000 0010 0111 1111 1000 0000 0000 0011 0010 0000 0010 0001 0000 0011 0100 0000 1100 0000 0000 0010 0011 0000 0011 0001 Run-length coding 001 011 000 000 000 000 100 100 2 1 1 2 3 3 3 3 0 1 2 0 1 2 000 000 011 011 000 000 100 001 3 3 1 2 1 2 3 3 0 1 2 2 1 1 0.34 (1) 0.66 (0) 3 1.00 (0) 0 0.34 (1) 1 2 0.4 (1) 0.6 (0) 2 0.33 (00) 0.34 (1) 1 0.33 (00) 2 2 0.4 (00) 0.4 (1) 3 0.33 (01) 2 0.33 (01) 0 1 0.2 (01) 001 100 01 01 0 0 10001 01100 01 01 100 100 0 0 10001 001

Lossless Predictive Coding Do not need to decompose image into bit planes Eliminate interpixel redundancy Code only the new information in each pixel The new information is the difference between the actual and predicted value of that pixel

Previous Pixel Coding (differential coding) First-order linear predictor / previous pixel predictor uses differential coding 126 127 128 126 1 1

Lossless Compression Approaches Averagely, use shorter-length code to convey the same amount of information Variable-length coding Code redundancy Huffman coding Bit-plane coding Run-length coding Interpixel redundancy LZW Predictive coding