Image Compression-JPEG Speaker: Ying Wun, Huang Adviser: Jian Jiun, Ding Date2011/10/14 1.

Slides:



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

JPEG DCT Quantization FDCT of 8x8 blocks.
M-JPEG M-JPEG April 15, 2015 INF5063: Programming heterogeneous multi-core processors.
INTERNATIONAL CONFERENCE ON TELECOMMUNICATIONS, ICT '09. TAREK OUNI WALID AYEDI MOHAMED ABID NATIONAL ENGINEERING SCHOOL OF SFAX New Low Complexity.
School of Computing Science Simon Fraser University
CHEN Guowang FANG Wei HUANG Baihan
Image (and Video) Coding and Processing Lecture: DCT Compression and JPEG Wade Trappe Again: Thanks to Min Wu for allowing me to borrow many of her slides.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
JPEG Still Image Data Compression Standard
Hao Jiang Computer Science Department Sept. 27, 2007
Case Study ARM Platform-based JPEG Codec HW/SW Co-design
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
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.
Color spaces and JPEG. Colors physically, color is electro-magnetic radiation (i.e. light with various wave length, between 390nm- 750nm) percieved by.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
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.
CSE679: MPEG r MPEG-1 r MPEG-2. MPEG r MPEG: Motion Pictures Experts Group r Standard for encoding videos/movies/motion pictures r Evolving set of standards.
Image and Video Compression
Image Compression Jin-Zuo Liu Jian-Jiun Ding , Ph. D. Presenter:
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Segmentation-Based Image Compression 以影像切割為基礎的影像壓縮技術 Speaker: Jiun-De Huang Advisor: Jian-Jiun Ding Graduate Institute of Communication Engineering National.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
CM613 Multimedia storage and retrieval Lecture: Lossy Compression Slide 1 CM613 Multimedia storage and retrieval Lossy Compression D.Miller.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
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.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Indiana University Purdue University Fort Wayne Hongli Luo
Hardware/Software Codesign Case Study : JPEG Compression.
Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
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 (Joint Photographic Expert Group)
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
HOW JEPG WORKS Presented by: Hao Zhong For 6111 Advanced Algorithm Course.
JPEG.
CS654: Digital Image Analysis
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Introduction to JPEG m Akram Ben Ahmed
Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000 Presenter :郭起霖 November 26,
John Hamann Vickey Yeh Compression of Stereo Images.
(B1) What are the advantages and disadvantages of digital TV systems? Hint: Consider factors on noise, data security, VOD etc. 1.
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
Implementing JPEG Encoder for FPGA ECE 734 PROJECT Deepak Agarwal.
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.
Image Compression-JPEG. Lossless and Lossy Compression Lossless Lossy 144:1.
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.
4C8 Dr. David Corrigan Jpeg and the DCT. 2D DCT.
Image Processing Architecture, © Oleh TretiakPage 1Lecture 5 ECEC 453 Image Processing Architecture Lecture 5, 1/22/2004 Rate-Distortion Theory,
JPEG Compression What is JPEG? Motivation
Chapter 9 Image Compression Standards
JPEG Image Coding Standard
Discrete Cosine Transform
JPEG.
CMPT 365 Multimedia Systems
CIS679: MPEG MPEG.
Ganbat OIP Lab
JPEG Pasi Fränti
JPEG Still Image Data Compression Standard
The JPEG Standard.
Presentation transcript:

Image Compression-JPEG Speaker: Ying Wun, Huang Adviser: Jian Jiun, Ding Date2011/10/14 1

Outline  Flowchart of JPEG (Joint Photographic Experts Group)  Correlation between pixels  Color space transformation-RGB to YCbCr & Downsampling  KL Transform & DCT Transform  Quantization  Zigzag Scan  Entropy Coding & Huffman Coding  MSE & PSNR  Conclusion  Reference 2

Flowchart of JPEG(Joint Photographic Experts Group) 3

Correlation between pixels  Correlation: HighLow  Compression ratio: HighLow Original Image 769KB Original Image 769KB Original Image 769KB Compressed Image 9KB Compressed Image 50KB Compressed Image 410KB 4

Color space transformation-RGB to YCbCr & Downsampling 5

 4:4:4 (No downsampling)  4:2:2 (Downsampling every 2 pixels in vertical or horizontal direction.)  4:2:0(Downsampling every 2 pixels in both vertical and horizontal direction.) 6 Color space transformation-RGB to YCbCr & Downsampling Y CbCb CrCr Y Y CbCb CrCr or YCbCb CrCr CbCb CrCr

KL Transform & DCT Transform  Fourier Transform & Fourier Series (1-Dimension): A signal can be expressed as a combination of sines and cosines.  KL Transform & DCT Transform (2-Dimension): A complex pattern can be expressed as a combination of many kinds of simple pattern (i.e. bases). 7

 Karhunen-Loeve Transform (KLT): Every image has its own bases (i.e. different image has different bases), we need to find and save the bases information during the process of compression.  Advantage: Minimums the Mean Square Error(MSE).  Disadvantage: Computationally expensive.  Discrete Cosine Transform (DCT): Compress different image by the same bases.  Advantage: Computationally efficient.  Disadvantage: The performance of MSE is not as well as KL Transform, but it’s good enough. 8 KLT & DCT 8x8 DCT bases

9 KLT & DCT

 Example of DCT: 10 KLT & DCT -76, -73, -67, -62, -58, -67, -64, -55, -65, -69, -73, -38, -19, -43, -59, -56, -66, -69, -60, -15, 16, -24, -62, -55, -65, -70, -57, -6, 26, -22, -58, -59, -61, -67, -60, -24, -2, -40, -60, -58, -49, -63, -68, -58, -51, -60, -70, -53, -43, -57, -64, -69, -73, -67, -63, -45, -41, -49, -59, -60, -63, -52, -50, -34 Before DCT: After DCT: , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, AC terms: Small coefficient DC terms: Large coefficient

Quantization  We divide the DCT coefficients by Quantization Table to downgrade the value recorded in the jpeg file because it is hard for the human eyes to distinguish the strength of high frequency components.  Quantization Table: 11 Luminance quantization table Chrominance quantization table

 Example of Quantization: Before Quantization After Quantization 12 Quantization , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, -26, -3, -6, 2, 2, -1, 0, 0, 0, -2, -4, 1, 1, 0, 0, 0, -3, 1, 5, -1, -1, 0, 0, 0, -3, 1, 2, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, -3, -6, 2, 2, -1, 0, 0, 0, -2, -4, 1, 1, 0, 0, 0, -3, 1, 5, -1, -1, 0, 0, 0, -3, 1, 2, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Quantize by lumunance quantization table We Get Many Zeros!

Zigzag Scan Zigzag Scan −26, −3, 0, −3, −3, −6, 2, −4, 1 −4, 1, 1, 5, 1, 2, −1, 1, −1, 2, 0, 0, 0, 0, 0, −1, −1, 0, ……,0. We get a sequence after the zigzag process: The remnants are Zeros! The sequence can be expressed as: (0:-26),(0:-3),(1:-3),…,(0:2),(5:-1),(0:-1),EOB Run-Length Encoding High Frequency Low Frequency

Entropy Coding & Huffman Coding  Key points: Encode the high/low probability symbols with short/long code length. 14 SymbolBinary Code …… DC luminance Huffman Table SymbolBinary Code RunSize 0100 ……… ……… ……… EOB1010 ZRL1111 AC luminance Huffman Table

MSE & PSNR 15

16 MSE & PSNR

 Blind spot of MSE & PSNR:  PSNR still looks fine even though we can easily find a obvious error on the right image, why?  It is due to the fact that PSNR is calculated from MSE, where MSE is the “MEAN” square error. 17 MSE & PSNR Correct Image PSNR = 30.4 Error Image PSNR = 32.6

Conclusion  As a conclusion, to compress a image, first we have to reduce the correlation between pixels, then quantize the image to reduce the high frequency components, finally encode the image by entropy coding to minimize code length to get a low data rate image. 18

Reference  [1] 酒井善則、吉田俊之 共著,白執善 編譯, 影像壓縮技術 映像 情報符号化,全華科技圖書股份有限公司, Oct  [2] WIKIPEDIA, “JPEG”,  [3] WIKIPEDIA, “PSNR”, 19

The End 20