Slide 1

Slide 1 text

Approximation and Coding with Orthogonal Decompositions Gabriel Peyré http://www.ceremade.dauphine.fr/~peyre/numerical-tour/

Slide 2

Slide 2 text

Overview • Approximation and Compression • Decay of Approximation Error • Fourier for Smooth Functions • Wavelet for Piecewise Smooth Functions • Curvelets and Finite Elements for Cartoons

Slide 3

Slide 3 text

Sparse Approximation in a Basis

Slide 4

Slide 4 text

Sparse Approximation in a Basis

Slide 5

Slide 5 text

Sparse Approximation in a Basis

Slide 6

Slide 6 text

Hard Thresholding

Slide 7

Slide 7 text

(usually polynomial) Approximation Speed Approximation error decay:

Slide 8

Slide 8 text

(usually polynomial) Approximation Speed Approximation error decay: log 10 (||f fM ||) Log/Log plot: approx. a ne curve log 10 (M/N)

Slide 9

Slide 9 text

Efficiency of Transforms Fourier DCT Local DCT Wavelets log 10 (||f fM ||) log 10 (M/N)

Slide 10

Slide 10 text

Overview • Approximation and Compression • Decay of Approximation Error • Fourier for Smooth Functions • Wavelet for Piecewise Smooth Functions • Curvelets and Finite Elements for Cartoons

Slide 11

Slide 11 text

f forward Compression by Transform-coding a[m] = ⇥f, m ⇤ R Image f Zoom on f transform

Slide 12

Slide 12 text

f forward Compression by Transform-coding a[m] = ⇥f, m ⇤ R Quantization: q[m] = sign(a[m]) |a[m]| T ⇥ Z Image f Zoom on f transform ˜ a[m] T T 2T 2T a[m Quantized q[m] bin T q[m] Z

Slide 13

Slide 13 text

f forward coding Compression by Transform-coding a[m] = ⇥f, m ⇤ R Quantization: q[m] = sign(a[m]) |a[m]| T ⇥ Z Image f Zoom on f transform Entropic coding: use statistical redundancy (many 0’s). ˜ a[m] T T 2T 2T a[m Quantized q[m] bin T q[m] Z

Slide 14

Slide 14 text

f forward coding Compression by Transform-coding a[m] = ⇥f, m ⇤ R Quantization: q[m] = sign(a[m]) |a[m]| T ⇥ Z Image f Zoom on f decoding q[m] Z ˜ a[m] dequantization transform Entropic coding: use statistical redundancy (many 0’s). ˜ a[m] T T 2T 2T a[m Quantized q[m] bin T q[m] Z Dequantization:

Slide 15

Slide 15 text

f forward coding Compression by Transform-coding a[m] = ⇥f, m ⇤ R Quantization: q[m] = sign(a[m]) |a[m]| T ⇥ Z Image f Zoom on f fR , R =0.2 bit/pixel decoding q[m] Z ˜ a[m] dequantization transform backward fR = m IT ˜ a[m] m transform Entropic coding: use statistical redundancy (many 0’s). ˜ a[m] T T 2T 2T a[m Quantized q[m] bin T q[m] Z Dequantization:

Slide 16

Slide 16 text

Thresholding vs. Quantizing

Slide 17

Slide 17 text

Non-linear Approximation and Compression

Slide 18

Slide 18 text

Non-linear Approximation and Compression ˜ a[m] T T 2T 2T a[m] Quantization: q[m] = sign(a[m]) |a[m]| T ⇥ Z =⇥ |a[m] ˜ a[m]| T 2 Dequantization: ˜ a[m] = sign(q[m]) |q[m]| + 1 2 ⇥ T

Slide 19

Slide 19 text

Non-linear Approximation and Compression ||f fM ||2 # = M Theorem: ||f fR ||2 ||f fM ||2 + MT2/4 where M = # {m \ ˜ a[m] = 0}. ||f fR ||2 = ⇤ m (a[m] ˜ a[m])2 ⇤ |a[m]|

Slide 20

Slide 20 text

A Naive Support Coding Approach Coding: relate # bits R to # coe cients M. (H 1 ) Ordered coe cients | f, m ⇥| decays like m +1 2 . =⇤ ||f fM ||2 ⇥ M .

Slide 21

Slide 21 text

A Naive Support Coding Approach Coding: relate # bits R to # coe cients M. (H 1 ) Ordered coe cients | f, m ⇥| decays like m +1 2 . f RN sampled from f0 , error: (H 2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2: M ⇥ N⇥/ . ||f f0 ||2 ⇥ N =⇤ ||f fM ||2 ⇥ M .

Slide 22

Slide 22 text

A Naive Support Coding Approach Simple coding strategy: R = Rval + Rind = Rind log 2 N M ⇥ = O(M log 2 (N/M)) = O(M log 2 (M)). Coding: relate # bits R to # coe cients M. (H 1 ) Ordered coe cients | f, m ⇥| decays like m +1 2 . f RN sampled from f0 , error: (H 2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2: M ⇥ N⇥/ . ||f f0 ||2 ⇥ N =⇤ ||f fM ||2 ⇥ M .

Slide 23

Slide 23 text

A Naive Support Coding Approach Simple coding strategy: R = Rval + Rind = Rind log 2 N M ⇥ = O(M log 2 (N/M)) = O(M log 2 (M)). = Rval = O(M| log 2 (T)|) = O(M log 2 (M)) Coding: relate # bits R to # coe cients M. (H 1 ) Ordered coe cients | f, m ⇥| decays like m +1 2 . f RN sampled from f0 , error: (H 2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2: M ⇥ N⇥/ . ||f f0 ||2 ⇥ N =⇤ ||f fM ||2 ⇥ M .

Slide 24

Slide 24 text

A Naive Support Coding Approach Simple coding strategy: R = Rval + Rind = Rind log 2 N M ⇥ = O(M log 2 (N/M)) = O(M log 2 (M)). Theorem: Under hypotheses (H 1 ) and (H 2 ), ||f fR ||2 = O(R log (R)). = Rval = O(M| log 2 (T)|) = O(M log 2 (M)) Coding: relate # bits R to # coe cients M. (H 1 ) Ordered coe cients | f, m ⇥| decays like m +1 2 . f RN sampled from f0 , error: (H 2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2: M ⇥ N⇥/ . ||f f0 ||2 ⇥ N =⇤ ||f fM ||2 ⇥ M .

Slide 25

Slide 25 text

Entropic Coders

Slide 26

Slide 26 text

Entropic Coders

Slide 27

Slide 27 text

Entropic Coders

Slide 28

Slide 28 text

JPEG-2000 Overview

Slide 29

Slide 29 text

JPEG-2000 Overview

Slide 30

Slide 30 text

JPEG-2000 Overview

Slide 31

Slide 31 text

JPEG-2000 Overview

Slide 32

Slide 32 text

JPEG-2000 Overview

Slide 33

Slide 33 text

Contextual Coding code block width 3 × 3 context window

Slide 34

Slide 34 text

JPEG-2000 vs. JPEG, 0.2bit/pixel

Slide 35

Slide 35 text

Overview • Approximation and Compression • Decay of Approximation Error • Fourier for Smooth Functions • Wavelet for Piecewise Smooth Functions • Curvelets and Finite Elements for Cartoons

Slide 36

Slide 36 text

1D Fourier Approximation

Slide 37

Slide 37 text

1D Fourier Approximation

Slide 38

Slide 38 text

Sobolev and Fourier

Slide 39

Slide 39 text

Singularities and Fourier 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

Slide 40

Slide 40 text

Sobolev for Images

Slide 41

Slide 41 text

Sobolev for Images

Slide 42

Slide 42 text

Overview • Approximation and Compression • Decay of Approximation Error • Fourier for Smooth Functions • Wavelet for Piecewise Smooth Functions • Curvelets and Finite Elements for Cartoons

Slide 43

Slide 43 text

Vanishing moments: p = 3 p = 4 Magnitude of Wavelet Coefficients f(x) −1 0 1 2 −2 −1 0 1 2 −2 −1 0 1 2 −1 0 1 2 −2 0 2 4 −1 −0.5 0 0.5 1 1.5 k < p, (x)xkdx = 0 p = 2

Slide 44

Slide 44 text

Vanishing moments: p = 3 p = 4 Magnitude of Wavelet Coefficients f(x) −1 0 1 2 −2 −1 0 1 2 −2 −1 0 1 2 −1 0 1 2 −2 0 2 4 −1 −0.5 0 0.5 1 1.5 k < p, (x)xkdx = 0 p = 2 | f, j,n ⇥| Cf || ||1 2j( +d/2) t = x 2jn 2j ⇥f, j,n ⇤ = 1 2j d 2 ⇤ f(x) x 2jn 2j ⇥ dx = 2j d 2 ⇤ R(2jt) (t)dt If f is C on supp(⇥j,n ), p : f(x) = P(x 2jn) + R(x 2jn) = P(2jt) + R(2jt)

Slide 45

Slide 45 text

Vanishing moments: p = 3 p = 4 Magnitude of Wavelet Coefficients f(x) −1 0 1 2 −2 −1 0 1 2 −2 −1 0 1 2 −1 0 1 2 −2 0 2 4 −1 −0.5 0 0.5 1 1.5 k < p, (x)xkdx = 0 | f, j,n ⇥| ||f|| || ||1 2j d 2 p = 2 | f, j,n ⇥| Cf || ||1 2j( +d/2) t = x 2jn 2j ⇥f, j,n ⇤ = 1 2j d 2 ⇤ f(x) x 2jn 2j ⇥ dx = 2j d 2 ⇤ R(2jt) (t)dt If f is C on supp(⇥j,n ), p : f(x) = P(x 2jn) + R(x 2jn) = P(2jt) + R(2jt)

Slide 46

Slide 46 text

1D Wavelet Coefficient Behavior −0.2 −0.1 0 0.1 0.2 −0.2 −0.1 0 0.1 0.2 −0.5 0 0.5 −0.5 0 0.5 0 0.2 0.4 0.6 0.8 1

Slide 47

Slide 47 text

1D Wavelet Coefficient Behavior If f is C in supp( j,n ), then | f, j,n ⇥| 2j( +1/2)||f||C || ||1 −0.2 −0.1 0 0.1 0.2 −0.2 −0.1 0 0.1 0.2 −0.5 0 0.5 −0.5 0 0.5 0 0.2 0.4 0.6 0.8 1

Slide 48

Slide 48 text

1D Wavelet Coefficient Behavior If f is C in supp( j,n ), then | f, j,n ⇥| 2j( +1/2)||f||C || ||1 | f, j,n ⇥| 2j/2||f|| || ||1 If f is bounded (e.g. around a singularity), then −0.2 −0.1 0 0.1 0.2 −0.2 −0.1 0 0.1 0.2 −0.5 0 0.5 −0.5 0 0.5 0 0.2 0.4 0.6 0.8 1

Slide 49

Slide 49 text

For Fourier, linear non-linear, sub-optimal. For wavelets, linear non-linear, optimal. Piecewise Regular Functions in 1D Theorem: If f is C outside a finite set of discontinuities: n[M] = ||f fn M ||2 = O(M 1) (Fourier), O(M 2 ) (wavelets).

Slide 50

Slide 50 text

Examples of 1D Approximations 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 −2 −1.8 −1.6 −1.4 −1.2 −1 −0.8 −6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −1

Slide 51

Slide 51 text

Large coe cient | f, jn ⇥| < T x1 x2 S = {x1, x2 } Localizing the Singular Support f(x) j1 j2 Small coe cient Singular support: |Cj | K|S| = constant

Slide 52

Slide 52 text

Large coe cient | f, jn ⇥| < T x1 x2 S = {x1, x2 } Localizing the Singular Support f(x) j1 j2 Small coe cient Singular support: Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1/2) Singular, n Cj : |⇥f, j,n ⇤| C2j/2 |Cj | K|S| = constant

Slide 53

Slide 53 text

Large coe cient | f, jn ⇥| < T x1 x2 S = {x1, x2 } Localizing the Singular Support f(x) j1 j2 Small coe cient Singular support: Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1/2) Singular, n Cj : |⇥f, j,n ⇤| C2j/2 Cut-o scales (depends on T): Singular: 2j1 = (T/C) 1 +1/2 Regular: 2j2 = (T/C)2 |Cj | K|S| = constant

Slide 54

Slide 54 text

Large coe cient | f, jn ⇥| < T Hand-made approximate: ˜ fM = j j2 n Cj f, j,n ⇥ j,n + j j1 n Cc j f, j,n ⇥ j,n x1 x2 S = {x1, x2 } Localizing the Singular Support f(x) j1 j2 Small coe cient Singular support: Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1/2) Singular, n Cj : |⇥f, j,n ⇤| C2j/2 Cut-o scales (depends on T): Singular: 2j1 = (T/C) 1 +1/2 Regular: 2j2 = (T/C)2 |Cj | K|S| = constant

Slide 55

Slide 55 text

||f fM ||2 ||f ˜ fM ||2 j

Slide 56

Slide 56 text

||f fM ||2 ||f ˜ fM ||2 j

Slide 57

Slide 57 text

||f fM ||2 ||f ˜ fM ||2 j

Slide 58

Slide 58 text

2D Wavelet Approximation If f is C in supp( j,n ), then | f, j,n ⇥| 2j( +1)||f||C || ||1 | f, j,n ⇥| 2j||f|| || ||1 If f is bounded (e.g. around a singularity), then

Slide 59

Slide 59 text

Fourier Wavelet, both sub-optimal. Wavelets: same result for BV functions (optimal). Piecewise Regular Functions in 2D n[M] = ||f fn M ||2 = O(M 1/2) (Fourier), O(M 1) (wavelets). Theorem: If f is C outside a set of finite length edge curves,

Slide 60

Slide 60 text

Example of 2D Approximations

Slide 61

Slide 61 text

Length(S) = L Localizing the Singular Support in 2D j1 j2 f(x, y) |Cj | LK2 j = constant

Slide 62

Slide 62 text

Length(S) = L Localizing the Singular Support in 2D j1 j2 f(x, y) Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1) Singular, n Cj : |⇥f, j,n ⇤| C2j |Cj | LK2 j = constant

Slide 63

Slide 63 text

Length(S) = L Localizing the Singular Support in 2D j1 j2 f(x, y) Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1) Singular, n Cj : |⇥f, j,n ⇤| C2j Cut-o scales (depends on T): Singular: 2j1 = (T/C) 1 +1 Regular: 2j2 = T/C |Cj | LK2 j = constant

Slide 64

Slide 64 text

Hand-made approximate: ˜ fM = j j2 n Cj f, j,n ⇥ j,n + j j1 n Cc j f, j,n ⇥ j,n Length(S) = L Localizing the Singular Support in 2D j1 j2 f(x, y) Coe cient behavior: Regular, n Cc j : |⇥f, j,n ⇤| C2j( +1) Singular, n Cj : |⇥f, j,n ⇤| C2j Cut-o scales (depends on T): Singular: 2j1 = (T/C) 1 +1 Regular: 2j2 = T/C |Cj | LK2 j = constant

Slide 65

Slide 65 text

||f fM ||2 ||f ˜ fM ||2 j

Slide 66

Slide 66 text

||f fM ||2 ||f ˜ fM ||2 j

Slide 67

Slide 67 text

||f fM ||2 = O(M 1) ||f fM ||2 ||f ˜ fM ||2 j

Slide 68

Slide 68 text

Overview • Approximation and Compression • Decay of Approximation Error • Fourier for Smooth Functions • Wavelet for Piecewise Smooth Functions • Curvelets and Finite Elements for Cartoons

Slide 69

Slide 69 text

Geometric image model: f is C outside a set of C edge curves. BV image: level sets have finite lengths. Geometric image: level sets are regular. Geometry = cartoon image Sharp edges Smoothed edges Geometrically Regular Images | f|

Slide 70

Slide 70 text

Approximation of f, C2 outside C2 edges. Piecewise linear approximation on M triangles: ˜ fM . Geometic Construction : Finite Elements

Slide 71

Slide 71 text

Approximation of f, C2 outside C2 edges. Piecewise linear approximation on M triangles: ˜ fM . Geometic Construction : Finite Elements Regular areas: M/2 equilateral triangles. M 1/2 M 1/2

Slide 72

Slide 72 text

Approximation of f, C2 outside C2 edges. Piecewise linear approximation on M triangles: ˜ fM . Geometic Construction : Finite Elements Regular areas: M/2 equilateral triangles. M 1/2 M 1/2 M/2 anisotropic triangles. Singular areas:

Slide 73

Slide 73 text

Approximation of f, C2 outside C2 edges. Piecewise linear approximation on M triangles: ˜ fM . Di culties to build e cient approximations. No optimal strategies (greedy solutions). Theorem: If f is C2 outside a set of C2 contours, then one has for an adapted triangulation ||f ˜ fM ||2 = O(M 2). Geometic Construction : Finite Elements Regular areas: M/2 equilateral triangles. M 1/2 M 1/2 M/2 anisotropic triangles. Singular areas:

Slide 74

Slide 74 text

Greedy Triangulation Optimization Bougleux, Peyr´ e, Cohen, ECCV’08

Slide 75

Slide 75 text

Curvelet Atoms Parabolic dyadic scaling: Rotation: [Candes, Donoho] [Candes, Demanet, Ying, Donoho] “width length2”

Slide 76

Slide 76 text

Curvelet Tight Frame Spacial sampling: Tight frame of L2(R2): Angular sampling:

Slide 77

Slide 77 text

Discrete curvelets: O(N log(N)) algorithm. Redundancy 5 =⇥ not e cient for compression. M-term curvelet approximation: Curvelet Approximation Theorem: If f is C2 outside a set of C2 edges, ||f fM ||2 = O(M 2(log M)3).

Slide 78

Slide 78 text

Works on elongated edges. Works also on locally parallel textures ! Curvelets Denoising

Slide 79

Slide 79 text

Conclusion

Slide 80

Slide 80 text

Conclusion

Slide 81

Slide 81 text

Conclusion 0 0.2 0.4 0.6 0.8 1

Slide 82

Slide 82 text

Conclusion 0 0.2 0.4 0.6 0.8 1