Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th...

Post on 04-Oct-2020

2 views 0 download

Transcript of Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th...

Image Compression and Watermarking

Image ProcessingCSE 166

Lecture 14

Reading

• Digital Image Processing, 4th edition– Chapter 7: Image Compression and Watermarking

CSE 166, Fall 2017 2

Data redundancy in images

CSE 166, Fall 2017 3

Coding redundancy

Spatial redundancy

Irrelevant information

Does not need all 8 bits

Information is unnecessarily replicated

Information is not useful 

Fidelity criteriasubjective (qualitative)

CSE 166, Fall 2017 4

Approximations

CSE 166, Fall 2017 5

5.17 15.67 14.17

(a) (b) (c)

Objective (quantitative) qualityrms error (in intensity levels)

Subjective (qualitative) quality, relative

Lower is better

(a) is better than (b).

(b) is better than (c)

Compression system

CSE 166, Fall 2017 6

Compression methods• Huffman coding• Golomb coding• Arithmetic coding• Lempel‐Ziv‐Welch (LZW) coding• Run‐length coding• Symbol‐based coding• Bit‐plane coding• Block transform coding• Predictive coding• Wavelet coding

CSE 166, Fall 2017 7

Symbol‐based coding

CSE 166, Fall 2017 8

(0,2) (3,10) …

Block‐transform coding

CSE 166, Fall 2017 9

Encoder

Decoder

Block‐transform coding

CSE 166, Fall 2017 10

Discrete cosine transformWalsh‐Hadamard transform

4x4 subimages (4x4 basis images)

Block‐transform coding

CSE 166, Fall 2017 11

Fourier transform

cosine transform

Walsh‐Hadamardtransform

2.32 1.78 1.13rms error

Retain 32 largest 

coefficients

Error image

8x8 subimages

Lower is better

Block‐transform coding

CSE 166, Fall 2017 12

2x2 4x4 8x8

Reconstruction error versus subimage size

DCT subimage size:

JPEG uses block DCT‐based coding

CSE 166, Fall 2017 13

Compression reconstruction

Scaled error image

Zoomed compression reconstruction

25:1

52:1

Compression ratio

Predictive coding model

CSE 166, Fall 2017 14

Encoder

Decoder

Predictive coding

CSE 166, Fall 2017 15

Input image

Prediction error image

Example: previous pixel coding

Histograms

Wavelet coding

CSE 166, Fall 2017 16

Encoder

Decoder

Wavelet coding

CSE 166, Fall 2017 17

Detail coefficients below 25 are truncated to zero

JPEG‐2000 uses wavelet‐based coding

CSE 166, Fall 2017 18

Compression reconstruction

Scaled error image

Zoomed compression reconstruction

25:1

52:1

Compression ratio

JPEG‐2000 uses wavelet‐based coding

CSE 166, Fall 2017 19

Compression reconstruction

Scaled error image

Zoomed compression reconstruction

75:1

105:1

Compression ratio

Image watermarking

• Visible watermarks• Invisible watermarks

CSE 166, Fall 2017 20

Visible watermark

CSE 166, Fall 2017 21

Original image minus watermark

Watermarked image

Watermark

Invisible image watermarking system

CSE 166, Fall 2017 22

Encoder

Decoder

Invisible watermark

CSE 166, Fall 2017 23

Two least significant 

bits

JPEGcompressed

Fragile invisible 

watermark

Originalimage Extracted

watermark

Example: watermarking using two least significant bits

Invisible watermark

CSE 166, Fall 2017 24

Watermarked images

Example: DCT‐based watermarking

Extracted robust invisible 

watermark