DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May...

8
DCT cs195g: Computational Photograph James Hays, Brown, Spring 201 Somewhere in Cinque Terre, May 2005 ides from Alexei Efros

Transcript of DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May...

Page 1: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

DCT

cs195g: Computational PhotographyJames Hays, Brown, Spring 2010

Somewhere in Cinque Terre, May 2005

Slides from Alexei Efros

Page 2: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Campbell-Robson contrast sensitivity curveCampbell-Robson contrast sensitivity curve

Page 3: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Depends on Color

R G B

Page 4: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Lossy Image Compression (JPEG)

Block-based Discrete Cosine Transform (DCT)

Page 5: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Using DCT in JPEG

The first coefficient B(0,0) is the DC component, the average intensity

The top-left coeffs represent low frequencies, the bottom right – high frequencies

Page 6: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Image compression using DCT

DCT enables image compression by concentrating most image information in the low frequencies

Loose unimportant image info (high frequencies) by cutting B(u,v) at bottom right

The decoder computes the inverse DCT – IDCT

•Quantization Table3 5 7 9 11 13 15 17

5 7 9 11 13 15 17 19

7 9 11 13 15 17 19 21

9 11 13 15 17 19 21 23

11 13 15 17 19 21 23 25

13 15 17 19 21 23 25 27

15 17 19 21 23 25 27 29

17 19 21 23 25 27 29 31

Page 7: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

Block size in JPEG

Block size• small block

– faster – correlation exists between neighboring pixels

• large block– better compression in smooth regions

• It’s 8x8 in standard JPEG

Page 8: DCT cs195g: Computational Photography James Hays, Brown, Spring 2010 Somewhere in Cinque Terre, May 2005 Slides from Alexei Efros.

JPEG compression comparison

89k 12k