Discrete Fourier Transform. FFT and Its Applications FFTSHIFT Shift zero-frequency component to the center of spectrum. For vectors, FFTSHIFT(X) swaps.

Slides:



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

Image Compression-JPEG Speaker: Ying Wun, Huang Adviser: Jian Jiun, Ding Date2011/10/14 1.
A Matlab Playground for JPEG Andy Pekarske Nikolay Kolev.
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
Scalable Video Compression for Streaming Over Internet Using DCT coefficients Zahid Ali cs584s05.
JAVA 程式設計與資料結構 第二十章 Searching. Sequential Searching Sequential Searching 是最簡單的一種搜尋法,此演 算法可應用在 Array 或是 Linked List 此等資料結構。 Sequential Searching 的 worst-case.
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.
1 第七章 植基於可調整式量化表及離散餘 弦轉換之浮水印技術. 2 Outlines 介紹 介紹 灰階浮水印藏入 灰階浮水印藏入 灰階浮水印取回 灰階浮水印取回 實驗結果 實驗結果.
Fourier Analysis Without Tears : Computational Photography Alexei Efros, CMU, Fall 2005 Somewhere in Cinque Terre, May 2005.
Hao Jiang Computer Science Department Sept. 27, 2007
Toward Optimized MPEG-4 Decoder 羅仲耘 吳方荃楊士萱教授 指導. Outline 專題方向簡介 改善項目 改善方法 未來工作.
Case Study ARM Platform-based JPEG Codec HW/SW Co-design
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.
牽涉兩個變數的 Data Table 汪群超 11/1/98. Z=-X 2 +4X-Y 2 +6Y-7 觀察 Z 值變化的 X 範圍 觀察 Z 值變化的 Y 範圍.
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.
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.
JPEG Compression in Matlab
Discrete Fourier Transform. FFT and Its Applications FFTSHIFT Shift zero-frequency component to the center of spectrum. For vectors, FFTSHIFT(X) swaps.
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 - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
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
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.
JPEG CIS 658 Fall 2005.
Hardware/Software Codesign Case Study : JPEG Compression.
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.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
Fig1: component of Demo Set. Fig2:Load Map of M16C Family.
Image Coding/ Compression
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.
CS654: Digital Image Analysis
Introduction to JPEG m Akram Ben Ahmed
Case Study ARM Platform-based JPEG Codec HW/SW Co-design
John Hamann Vickey Yeh Compression of Stereo Images.
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.
JPEG Compression What is JPEG? Motivation
Digital Image Processing Lecture 21: Lossy Compression May 18, 2005
Digital Image Processing Lecture 21: Lossy Compression
A Simple Image Compression : JPEG
JPEG Image Coding Standard
Discrete Cosine Transform
Image Pyramids and Applications
CIS679: MPEG MPEG.
Discrete Fourier Transform
CIS679: JPEG (more) Review of JPEG More about JPEG Lab project.
JPG picture compresion
JPEG implementation and improvement
Lossless JPEG transcoding
Image Compression Techniques
The JPEG Standard.
Image Coding and Compression
Fourier Analysis Without Tears
Presentation transcript:

Discrete Fourier Transform

FFT and Its Applications FFTSHIFT Shift zero-frequency component to the center of spectrum. For vectors, FFTSHIFT(X) swaps the left and right halves of X. For matrices, FFTSHIFT(X) swaps the first and third quadrants and the second and fourth quadrants. For N-D arrays, FFTSHIFT(X) swaps "half-spaces" of X along each dimension.

Example of 1-D Fourier Transform

fftBox.m – Plot Fourier Spectrum % % Script file: fftBox.m % Fourier Spectrum Plot of Box function % X1=linspace(0,1,17); Y1=ones(1,length(X1)); X2=linspace(1,16,241); Y2=zeros(1,length(X2)); X=[X1 X2]; Y=[Y1 Y2]; W=abs(fftshift(fft(Y))); subplot(2,1,1) plot(X,Y,'r'); axis([0 16, 0,1.2]); title('Box function') subplot(2,1,2) plot(W,'b-'); title('Fourier Spectrum of Box function')

2-D Discrete Fourier Transform

Example of 2-D FFT Matlab Code % Script file: fourier.m - 2D Fourier Transform % Pictures on P.113 of Gonzalez, Woods, Eddins m=128; n=128; f=zeros(m,n); f(56:71,48:79)=255; F0=fft2(f); S0=abs(F0); Fc=fftshift(fft2(f)); Sc=abs(Fc); Fd=fft2(fftshift(f)); Sd=log(1+abs(Fc)); subplot(2,2,1) imshow(f,[]) subplot(2,2,2) imshow(S0,[]) subplot(2,2,3) imshow(Sc,[ ]) subplot(2,2,4) imshow(Sd,[ ])

2-D FFT with CenterShift

2-D FFT on Texture Images

Discrete Cosine Transform Partition an image into nonoverlapping 8 by 8 blocks, and apply a 2d DCT on each block to get DC and AC coefficients. Most of the high frequency coefficients become insignificant, only the DC term and some low frequency AC coefficients are significant. Fundamental for JPEG Image Compression

Discrete Cosine Transform (DCT) X: a block of 8x8 pixels A=Q 8 : 8x8 DCT matrix as shown above Y=AXA t

DCT on a 8x8 Block

Quantized DCT Coefficients

Matlab Code for 2d DCT Q=xlsread('Qtable.xls','A2:H9'); fin=fopen('block8x8.txt','r'); fout=fopen('dctO.txt','w'); fgetl(fin); X=fscanf(fin,'%f',[8,8]); fclose(fin); X=X'; Y=dct2(X-128,[8,8]); fprintf(fout,'DCT coefficients\n'); for i=1:8 for j=1:8 fprintf(fout,'%6.1f',Y(i,j)); end; fprintf(fout,'\n'); end Y=Y./Q; % Y=fix(Y+0.5*(Y>0)); for i=1:8 for j=1:8 if (Y(i,j)>0) Y(i,j)=fix(Y(i,j)+0.5); else Y(i,j)=fix(Y(i,j)-0.5); end end fprintf(fout,'Quantized DCT coefficients\n'); for i=1:8 for j=1:8 fprintf(fout,'%4d',Y(i,j)); end; fprintf(fout,'\n'); end fclose(fout);

DCT-Based JPEG Conversion Input image shift 128 DCT round quantize with quantize matrix convert 2D matrix to 1D array run-length encoding huffman encoding write to file

Standard Quantization Table run-length encoding 產生一維結果 : -26,-3,0,……,-1,-1,0,0,0,0……. 後皆為零,簡化可以減少資料儲存量

JPEG Decoding image result shift 128 IDCT quantize with quantize matrixconvert 1D array to 2D matrix run-length decoding huffman decoding read compression file

未採用流程

壓縮結果差異

壓縮數據比較 原始檔案 CameraManPluspluslenaboats 原始大小 ( 壓縮比 ) 49.3 KB468 KB257 KB188 KB 壓縮格式壓縮大小 zip KB (82.61%) 111KB (23.72%) 219KB (85.21%) 137KB (72.87%) rar KB (74.24%) 97.3KB (20.79%) 164KB (63.81%) 116KB (61.7%) jpg KB (26.17%) 26.5KB (5.662%) 62.0KB (24.12%) 46.6KB (24.79) project KB (22.75%) 9.48KB (2.024%) 28.1KB (10.95%) 24.3KB (12.93%)

壓縮數據比較