image compression and watermarking · 2017. 11. 20. · reading • digital image processing, 4th...

24
Image Compression and Watermarking Image Processing CSE 166 Lecture 14

Upload: others

Post on 04-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Image Compression and Watermarking

Image ProcessingCSE 166

Lecture 14

Page 2: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Reading

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

CSE 166, Fall 2017 2

Page 3: Image Compression and Watermarking · 2017. 11. 20. · 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 

Page 4: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Fidelity criteriasubjective (qualitative)

CSE 166, Fall 2017 4

Page 5: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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)

Page 6: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Compression system

CSE 166, Fall 2017 6

Page 7: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 8: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Symbol‐based coding

CSE 166, Fall 2017 8

(0,2) (3,10) …

Page 9: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Block‐transform coding

CSE 166, Fall 2017 9

Encoder

Decoder

Page 10: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Block‐transform coding

CSE 166, Fall 2017 10

Discrete cosine transformWalsh‐Hadamard transform

4x4 subimages (4x4 basis images)

Page 11: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 12: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Block‐transform coding

CSE 166, Fall 2017 12

2x2 4x4 8x8

Reconstruction error versus subimage size

DCT subimage size:

Page 13: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 14: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Predictive coding model

CSE 166, Fall 2017 14

Encoder

Decoder

Page 15: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Predictive coding

CSE 166, Fall 2017 15

Input image

Prediction error image

Example: previous pixel coding

Histograms

Page 16: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Wavelet coding

CSE 166, Fall 2017 16

Encoder

Decoder

Page 17: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Wavelet coding

CSE 166, Fall 2017 17

Detail coefficients below 25 are truncated to zero

Page 18: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 19: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 20: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Image watermarking

• Visible watermarks• Invisible watermarks

CSE 166, Fall 2017 20

Page 21: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Visible watermark

CSE 166, Fall 2017 21

Original image minus watermark

Watermarked image

Watermark

Page 22: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Invisible image watermarking system

CSE 166, Fall 2017 22

Encoder

Decoder

Page 23: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

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

Page 24: Image Compression and Watermarking · 2017. 11. 20. · Reading • Digital Image Processing, 4th edition – Chapter 7: Image Compression and Watermarking CSE 166, Fall 2017 2

Invisible watermark

CSE 166, Fall 2017 24

Watermarked images

Example: DCT‐based watermarking

Extracted robust invisible 

watermark