Top Banner
Image Compression Signals and image processing by computer Winter 2012-13 Yael Erez
16

Image Compression

Feb 16, 2016

Download

Documents

nuala

Image Compression. Signals and image processing by computer Winter 2012-13 Yael Erez. Binary Images. Bit Map Very simple Representation size = image size Large memory. Coding Scheme. image. code. Encode. code. image. Decode. Binary Images Encoding. Run Length - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Image Compression

Image Compression

Signals and image processing by computerWinter 2012-13

Yael Erez

Page 2: Image Compression

Binary Images• Bit Map

• Very simple• Representation size = image size• Large memory

1001010001000110

Page 3: Image Compression

Coding Scheme

Encode

Decode

image code

imagecode

Page 4: Image Compression

Binary Images Encoding

• Run Length• Very efficient for some images. Less efficient for

others.

Page 5: Image Compression

Binary Images Encoding

• Chain Code• Begin from some pixel on the contour and decode

directions (clockwise). (interior is full).• Small code, but complicated to decode and

encode• Same image – several codes

02

1

3

0

213

4

56

7

Page 6: Image Compression

Entropy• Image x with L gray levels, and normalized

histogram values • Measure of uncertainty (surprise):• Entropy:

1

02 ))((log)(}{

L

k

khkhxH

)(kh

symbolbits

Entropy=7.4451

))((log2 kh

Page 7: Image Compression

Entropy• Uniform distribution:

• P(1)=1

LLL

LkhkhxHL

k22

1

02 log1log1*))((log)(}{

01log*1))((log)(}{ 2

1

02

L

k

khkhxH

Page 8: Image Compression

Entropy Encoding• Symbol 0 1 2 3• Code 00 01 10 11• Mean code length 2 bits/sample

• H(x) 0.5 0.3 0.1 0.1• Entropy 1.6855

bits/sample

• How can we reduce the mean code length?

Page 9: Image Compression

Huffman Coding• Symbol: 0 1 2 3• H(x) 0.5 0.3 0.1 0.1• Entropy 1.6855

bits/sample

• Huffman 0 10 110 111• Huffman mean code length 1.7 bits/sample

• Prefix code

Page 10: Image Compression

• Create dictionary:Huffman Binary Tree

1

0

2

3

0.3

0.5

0.10.1

0.2

0.5

1

0

1

0

01

1

Symbol prob

code0

10

110

111

• How can we decode?

Page 11: Image Compression

Prediction• Pixels are not independent!

Entropy=2.6276

• Huffman encoding yields 2.6466 bits/sample

Page 12: Image Compression

Differential Encoding

Prediction

image Compressed image- Encodin

g

Prediction

Compressed image image+Decodin

g

• Very sensitive to errors!

Page 13: Image Compression

SummaryCode length

WSWG

Entropy encoding

Prediction,Transforms + Entropy encoding

Lossy compression

Page 14: Image Compression

DPCM

Page 15: Image Compression

DPCM

Page 16: Image Compression

Simplified JPEG

DCT8x8

blocks

Quantizer

Entropy encodin

gQ factor 1. RLE

2. Entropy encoding