<<

Image Compression and Watermarking

Image Processing CSE 166 Lecture 13 Announcements

• Assignment 5 is due Nov 23, 11:59 PM • Quiz 5 is Nov 25 • Assignment 6 will be released Nov 23 – Due Dec 2, 11:59 PM • Reading – Chapter 8: and Watermarking • Sections 8.1, 8.9, 8.10, and 8.12

CSE 166, Fall 2020 2

• Data redundancy

where compression ratio

where

CSE 166, Fall 2020 3 Data redundancy in images

Coding Spatial Irrelevant redundancy redundancy information

Does not need all Information is Information is 8 bits unnecessarily not useful replicated

CSE 166, Fall 2020 4 Image information

• Entropy

where

– It is not possible to encode input image with fewer than bits/pixel

CSE 166, Fall 2020 5 Fidelity criteria, objective (quantitative) • Total error

• Root-mean-square error

• Mean-square to noise ratio (SNR)

CSE 166, Fall 2020 6 Fidelity criteria, subjective (qualitative)

CSE 166, Fall 2020 7 Approximations Objective (quantitative) quality rms error (in intensity levels) Lower is 5.17 15.67 14.17 better

(a) (b) (c) (a) is better Subjective (qualitative) quality, relative than (b), (b) is better CSE 166, Fall 2020 than (c)8 Compression system

CSE 166, Fall 2020 9 Compression methods

• Lempel-Ziv-Welch (LZW) coding • Run-length coding • Symbol-based coding • Bit-plane coding • Block transform coding • Predictive coding • coding

CSE 166, Fall 2020 10 Symbol-based coding

(0,2) (3,10) …

CSE 166, Fall 2020 11 Block-transform coding

Encoder

Decoder

CSE 166, Fall 2020 12 Block-transform coding

• Example: discrete cosine transform

where

• Inverse

CSE 166, Fall 2020 13 Block-transform coding 4x4 subimages (4x4 basis images)

Walsh-Hadamard transform Discrete cosine transform

CSE 166, Fall 2020 14 Block-transform coding 8x8 Walsh- subimages Fourier Hadamard cosine transform transform transform

Retain 32 largest coefficients

Error image

Lower is rms error 2.32 1.78 1.13 CSE 166, Fall 2020 better 15 Block-transform coding

Reconstruction error versus subimage size

DCT subimage size: 2x2 4x4 8x8 CSE 166, Fall 2020 16 JPEG uses block DCT-based coding Zoomed Compression Scaled error compression reconstruction image reconstruction

25:1

Compression ratio

52:1

CSE 166, Fall 2020 17 Predictive coding model

Encoder

Decoder

CSE 166, Fall 2020 18 Predictive coding Example: previous pixel coding

Input image

Histograms

Prediction error image

CSE 166, Fall 2020 19 Wavelet coding

Encoder

Decoder

CSE 166, Fall 2020 20 Wavelet coding

Detail coefficients below 25 are truncated to zero

CSE 166, Fall 2020 21 JPEG-2000 uses wavelet-based coding Zoomed Compression Scaled error compression reconstruction image reconstruction

25:1

Compression ratio

52:1

CSE 166, Fall 2020 22 JPEG-2000 uses wavelet-based coding Zoomed Compression Scaled error compression reconstruction image reconstruction

75:1

Compression ratio

105:1

CSE 166, Fall 2020 23 Image watermarking

• Visible watermarks • Invisible watermarks

CSE 166, Fall 2020 24 Visible watermark Watermark

Watermarked Original image image minus watermark CSE 166, Fall 2020 25 Invisible image watermarking system

Encoder

Decoder

CSE 166, Fall 2020 26 Invisible watermark Example: watermarking using two least significant bits

Original image Extracted watermark Two least significant bits

JPEG Fragile compressed invisible watermark

CSE 166, Fall 2020 27 Invisible watermark Example: DCT-based watermarking

Watermarked Extracted images robust (different invisible watermarks) watermark

CSE 166, Fall 2020 28 Next Lecture

• Morphological image processing • Reading – Chapter 9: Morphological image processing • Sections 9.1, 9.2, 9.3, and 9.5 (through subsection connected components)

CSE 166, Fall 2020 29