Digital Image Processing Lecture 21: Lossy Compression

Slides:



Advertisements
Similar presentations
JPEG Compresses real images Standard set by the Joint Photographic Experts Group in 1991.
Advertisements

Chapter 7 End-to-End Data
Lecture05 Transform Coding.
JPEG.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
JPEG Still Image Data Compression Standard
Wavelet-based Coding And its application in JPEG2000 Monia Ghobadi CSC561 project
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Multimedia Data The DCT and JPEG Image Compression Dr Mike Spann Electronic, Electrical and Computer.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
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,
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
Image Compression JPEG. Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg and can be embedded.
Image Compression: JPEG Multimedia Systems (Module 4 Lesson 1)
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
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 C OMPRESSION A LGORITHM I N CUDA Group Members: Pranit Patel Manisha Tatikonda Jeff Wong Jarek Marczewski Date: April 14, 2009.
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.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Hyperspectral Imagery Compression Using Three Dimensional Discrete Transforms Tong Qiao Supervisor: Dr. Jinchang Ren 04/07/2013.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Multimedia Data DCT Image Compression
Indiana University Purdue University Fort Wayne Hongli Luo
An introduction to audio/video compression Dr. Malcolm Wilson.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
Digital Image Processing Lecture 21: Lossy Compression Prof. Charlene Tsai.
The JPEG Standard J. D. Huang Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC.
JPEG - JPEG2000 Isabelle Marque JPEGJPEG2000. JPEG Joint Photographic Experts Group Committe created in 1986 by: International Organization for Standardization.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
JPEG.
CS654: Digital Image Analysis
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
Introduction to JPEG m Akram Ben Ahmed
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
An introduction to audio/video compression Prepared by :: Bhatt shivani ( )
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
MP3 and AAC Trac D. Tran ECE Department The Johns Hopkins University Baltimore MD
Design and Implementation of Lossless DWT/IDWT (Discrete Wavelet Transform & Inverse Discrete Wavelet Transform) for Medical Images.
JPEG Compression What is JPEG? Motivation
IMAGE COMPRESSION.
Chapter 9 Image Compression Standards
Data Compression.
Algorithms in the Real World
Digital Image Processing Lecture 21: Lossy Compression May 18, 2005
A Simple Image Compression : JPEG
Wavelets : Introduction and Examples
Data Compression.
Image Pyramids and Applications
CMPT 365 Multimedia Systems
JPEG Pasi Fränti
JPEG Still Image Data Compression Standard
Image Compression Techniques
The JPEG Standard.
Image Coding and Compression
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 15: Wavelets (i) Fourier spectrum provides all the frequencies
Wavelet Analysis Objectives: To Review Fourier Transform and Analysis
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Templates and Image Pyramids
Presentation transcript:

Digital Image Processing Lecture 21: Lossy Compression Prof. Charlene Tsai

Reminder … The Thursday class (5/29) is moved to Monday (5/28) for next week.

JPEG Algorithm Lossy compression trades some acceptable data loss for greater rate of compression. There are many available, but the most popular is the one developed by JPEG – transform coding. Coding not done on pixel values, but on a transform.

Transform Discrete Cosine Transform (DCT) Applying to 8x8 blocks, the forward and inverse DCT are DCT are real-valued, high information-packing capability, and separable.

Comparison with FFT Given the following sequence 10 25 40 55 70 85 100 115 If using FFT, the inverse of the first 4 FFT coefficients gives 49 41 56 57 71 70 85 90 If using DCT, the result is 11 23 41 56 69 84 102 114

JPEG Compression For each 8x8 image block, perform the compression Subtracting 128 from each value Apply DCT Normalization by dividing by matrix Q (the lossy part) Turning most of the elements zero Change the matrix into a vector by reading the nonzero element in a zigzag fashion. O …

(con’d) The first element (DC coefficient) of the vector is encoded as the difference between itself and the DC of previous block. Keeps all values (except the very first one) small Compressed using RLE Other values (AC coefficients) are compressed using Huffman coding Rate of compression is controlled by scaling Q => more scaling, more compression

Decompression Inverse the operations: Decode Huffman encoding and RLE Put the vector back to 8x8 matrix Multiply by Q Inverse DCT Shift back by 128

The Lossless Parts Huffman Coding and RLE for AC and DC terms, respectively. We’ll focus the discussion on the AC terms Each nonzero value x is assigned a category k The number of preceding 0s (run). Values: 7 -1 10 0 2 1 0 0 2 4 0 1 0 -1 Category: 1 4 2 1 2 3 1 1 Run: 0 0 1 0 2 0 1 1

Huffman Code Table Part of JPEG baseline standard See the handout for the code table and application.

Wavelet Transform For both FT and DCT, we assume so kind of periodicity in the image. Wavelet Transform keeps the wave concept, but drop the eriodicity. Wavelet is a little part of a wave wave wavelet

What to do with a wavelet? Given a wavelet function , we can Dilate it by applying a scaling factor to x. e.g. would squash and would expand. Translate by adding/subtracting a value from x. e.g. shift the wavelet 2 to the right, and shift 3 to the left. Change it height by multiplying the function by a constant. All together, we get

Applications Noise reduction Edge detection Compression Adopted by JPEG2000

A Simple Wavelet Transform All wavelet transform work by taking weighted averages of input values and providing extra information for inversion. Here the example is: averaging of two values and differencing. If a and b are two numbers, we get average s and difference d by:

(cont) Given a simple vector v of 8 elements, we create two new vectors v1 and v2 of 4 elements each: v1 containing the averages v2 containing the differences DWT at 1 scale is: We can keep going for another 2 levels. Let’s go through the example in pg425 of the handout. (available online)

Haar Wavelet Simplest wavelet, defined as Haar wavelet can be written in terms of a simpler pulse function

Mother wavelet Father wavelet (scaling function)

Discrete Wavelet transform The forward transformation The inverse is

are called the filter coefficients (or taps) A wavelet is completely specified by its taps.

Back to Haar Wavelet where values are what we have in a DWT matrix Low pass where values are what we have in a DWT matrix Let’s look at the example in pg 429. High pass

Two-Dimensional Wavelet (STD)

Two-Dimensional Wavelet (non-STD)

Example: one scale

Image Compression For a given value d, set all values x in the DWT for which to 0.

High-Pass Filtering Except from the top left image, the rest is high-frequency information. If setting the top-left corner to 0, the result after inversion would be a high-pass filtered image.

Denoising Very similar to compression by using thresholding. An example is given in pg446.