Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Prochain SlideShare
Chargement dans…5
×

# Signal Processing Course : Approximation

3 321 vues

Publié le

Slides for a course on signal and image processing.

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Soyez le premier à commenter

### Signal Processing Course : Approximation

1. 1. Approximation and Coding with Orthogonal Decompositions Gabriel Peyréhttp://www.ceremade.dauphine.fr/~peyre/numerical-tour/
2. 2. Overview• Approximation and Compression• Decay of Approximation Error• Fourier for Smooth Functions• Wavelet for Piecewise Smooth Functions• Curvelets and Finite Elements for Cartoons
3. 3. Sparse Approximation in a Basis
4. 4. Sparse Approximation in a Basis
5. 5. Sparse Approximation in a Basis
6. 6. Hard Thresholding
7. 7. Approximation SpeedApproximation error decay: (usually polynomial)
8. 8. Approximation Speed Approximation error decay: (usually polynomial) fM ||) log10 (||fLog/Log plot: approx. a ne curve log10 (M/N )
9. 9. Efficiency of Transforms fM ||) log10 (||f Fourier DCT log10 (M/N )Local DCT Wavelets
10. 10. Overview• Approximation and Compression• Decay of Approximation Error• Fourier for Smooth Functions• Wavelet for Piecewise Smooth Functions• Curvelets and Finite Elements for Cartoons
11. 11. Compression by Transform-coding forwardf transform a[m] = ⇥f, m⇤ R Image f Zoom on f
12. 12. Compression by Transform-coding forward f transform a[m] = ⇥f, m⇤ R q[m] Z bin T ⇥ 2T T T 2T a[m |a[m]|Quantization: q[m] = sign(a[m]) Z T a[m] ˜ Image f Zoom on f Quantized q[m]
13. 13. Compression by Transform-coding forward codi f transform a[m] = ⇥f, m⇤ R q[m] Z ng bin T ⇥ 2T T T 2T a[m |a[m]|Quantization: q[m] = sign(a[m]) Z T a[m] ˜Entropic coding: use statistical redundancy (many 0’s). Image f Zoom on f Quantized q[m]
14. 14. Compression by Transform-coding forward codi f transform a[m] = ⇥f, m⇤ R q[m] Z ng bin T ing decod dequantization a[m] ˜ q[m] Z ⇥ 2T T T 2T a[m |a[m]|Quantization: q[m] = sign(a[m]) Z T a[m] ˜Entropic coding: use statistical redundancy (many 0’s).Dequantization: Image f Zoom on f Quantized q[m]
15. 15. Compression by Transform-coding forward codi f transform a[m] = ⇥f, m⇤ R q[m] Z ng bin T ing decod backward dequantizationfR = a[m] ˜ m a[m] ˜ q[m] Z transform m IT ⇥ 2T T T 2T a[m |a[m]|Quantization: q[m] = sign(a[m]) Z T a[m] ˜Entropic coding: use statistical redundancy (many 0’s).Dequantization: Image f Zoom on f Quantized q[m] fR , R =0.2 bit/pixel
16. 16. Thresholding vs. Quantizing
17. 17. Non-linear Approximation and Compression
18. 18. Non-linear Approximation and Compression 2T T T 2T a[m] a[m] ˜ ⇥ |a[m]|Quantization: q[m] = sign(a[m]) Z T T =⇥ |a[m] a[m]| ˜ ⇥ 1 2Dequantization: a[m] = sign(q[m]) |q[m]| + ˜ T 2
19. 19. Non-linear Approximation and Compression 2T T T 2T a[m] a[m] ˜ ⇥ |a[m]|Quantization: q[m] = sign(a[m]) Z T T =⇥ |a[m] a[m]| ˜ ⇥ 1 2Dequantization: a[m] = sign(q[m]) |q[m]| + ˜ T 2 ⇤ ⇤ ⇤ ⇥2 T ||f fR || = 2 (a[m] a[m]) ˜ 2 |a[m]| + 2 m 2 |a[m]|<T |a[m]| T ||f fM ||2 #=M Theorem: ||f fR ||2 ||f fM ||2 + M T 2 /4 where M = # {m a[m] = 0}. ˜
20. 20. A Naive Support Coding ApproachCoding: relate # bits R to # coe cients M . +1 (H1 ) Ordered coe cients | f, m ⇥| decays like m 2 . =⇤ ||f fM ||2 ⇥ M .
21. 21. A Naive Support Coding ApproachCoding: relate # bits R to # coe cients M . +1 (H1 ) Ordered coe cients | f, m ⇥| decays like m 2 . =⇤ ||f fM ||2 ⇥ M .f RN sampled from f0 , error: ||f f0 ||2 ⇥ N (H2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2 : M ⇥ N ⇥/ .
22. 22. A Naive Support Coding ApproachCoding: relate # bits R to # coe cients M . +1 (H1 ) Ordered coe cients | f, m ⇥| decays like m 2 . =⇤ ||f fM ||2 ⇥ M .f RN sampled from f0 , error: ||f f0 ||2 ⇥ N (H2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2 : M ⇥ N ⇥/ .Simple coding strategy: R = Rval + Rind ⇥ N = Rind log2 = O(M log2 (N/M )) = O(M log2 (M )). M
23. 23. A Naive Support Coding ApproachCoding: relate # bits R to # coe cients M . +1 (H1 ) Ordered coe cients | f, m ⇥| decays like m 2 . =⇤ ||f fM ||2 ⇥ M .f RN sampled from f0 , error: ||f f0 ||2 ⇥ N (H2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2 : M ⇥ N ⇥/ .Simple coding strategy: R = Rval + Rind ⇥ N = Rind log2 = O(M log2 (N/M )) = O(M log2 (M )). M = Rval = O(M | log2 (T )|) = O(M log2 (M ))
24. 24. A Naive Support Coding ApproachCoding: relate # bits R to # coe cients M . +1 (H1 ) Ordered coe cients | f, m ⇥| decays like m 2 . =⇤ ||f fM ||2 ⇥ M .f RN sampled from f0 , error: ||f f0 ||2 ⇥ N (H2 ) To ensure ||f f0 ||2 ⇥ ||f fM ||2 : M ⇥ N ⇥/ .Simple coding strategy: R = Rval + Rind ⇥ N = Rind log2 = O(M log2 (N/M )) = O(M log2 (M )). M = Rval = O(M | log2 (T )|) = O(M log2 (M )) Theorem: Under hypotheses (H1 ) and (H2 ), ||f fR ||2 = O(R log (R)).
25. 25. Entropic Coders
26. 26. Entropic Coders
27. 27. Entropic Coders
28. 28. JPEG-2000 Overview
29. 29. JPEG-2000 Overview
30. 30. JPEG-2000 Overview
31. 31. JPEG-2000 Overview
32. 32. JPEG-2000 Overview
33. 33. Contextual Coding 3 × 3 context window code block width
34. 34. JPEG-2000 vs. JPEG, 0.2bit/pixel
35. 35. Overview• Approximation and Compression• Decay of Approximation Error• Fourier for Smooth Functions• Wavelet for Piecewise Smooth Functions• Curvelets and Finite Elements for Cartoons
36. 36. 1D Fourier Approximation
37. 37. 1D Fourier Approximation
38. 38. Sobolev and Fourier
39. 39. Singularities and Fourier 1 0.8 0.6 0.4 0.2 0 1 0.8 0.6 0.4 0.2 0 1 0.8 0.6 0.4 0.2 0 1 0.8 0.6 0.4 0.2 0
40. 40. Sobolev for Images
41. 41. Sobolev for Images
42. 42. Overview• Approximation and Compression• Decay of Approximation Error• Fourier for Smooth Functions• Wavelet for Piecewise Smooth Functions• Curvelets and Finite Elements for Cartoons
43. 43. Magnitude of Wavelet Coefficients 2 p=2Vanishing moments: k < p, (x)x dx = 0 k 1 0 −1 −2 −1 0 1 2 2 p=3 1 0 −1 −2 −1 0 1 2 1.5 p=4 1 0.5 f (x) 0 −0.5 −1 −2 0 2 4
44. 44. Magnitude of Wavelet Coefficients 2 p=2Vanishing moments: k < p, (x)x dx = 0 k 1 x 2j n If f is C on supp(⇥j,n ), p : t= 0 2j ⇤ ⇥ ⇤ 1 x 2 n j d −1⇥f, j,n ⇤ = d f (x) dx = 2j 2 R(2j t) (t)dt 2j 2 2j −2 −1 0 1 2 2 f (x) = P (x 2 n) + R(x j 2 n) = P (2 t) + R(2 t) j j j p=3 1 0| f, j,n ⇥| Cf || ||1 2j( +d/2) −1 −2 −1 0 1 2 1.5 p=4 1 0.5 f (x) 0 −0.5 −1 −2 0 2 4
45. 45. Magnitude of Wavelet Coefficients 2 p=2Vanishing moments: k < p, (x)x dx = 0 k 1 x 2j n If f is C on supp(⇥j,n ), p : t= 0 2j ⇤ ⇥ ⇤ 1 x 2 n j d −1⇥f, j,n ⇤ = d f (x) dx = 2j 2 R(2j t) (t)dt 2j 2 2j −2 −1 0 1 2 2 f (x) = P (x 2 n) + R(x j 2 n) = P (2 t) + R(2 t) j j j p=3 1 0 d| f, j,n ⇥| Cf || ||1 2j( +d/2) | f, j,n ⇥| ||f || || ||1 2j 2 −1 −2 −1 0 1 2 1.5 p=4 1 0.5 f (x) 0 −0.5 −1 −2 0 2 4
46. 46. 1D Wavelet Coefficient Behavior 1 0.8 0.6 0.4 0.2 0 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
47. 47. 1D Wavelet Coefficient Behavior 1 0.8 0.6 0.4 0.2 0 0.2 0.1 0 −0.1 −0.2 0.2If f is C in supp( j,n ), then 0.1 0 2 j( +1/2) −0.1 | f, j,n ⇥| ||f ||C || ||1 −0.2 0.5 0 −0.5 0.5 0 −0.5
48. 48. 1D Wavelet Coefficient Behavior 1 0.8 0.6 0.4 0.2 0 0.2 0.1 0 −0.1 −0.2 0.2If f is C in supp( j,n ), then 0.1 0 2 j( +1/2) −0.1 | f, j,n ⇥| ||f ||C || ||1 −0.2 0.5If f is bounded (e.g. around 0 a singularity), then −0.5 0.5 | f, j,n ⇥| 2 j/2 ||f || || ||1 0 −0.5
49. 49. Piecewise Regular Functions in 1D Theorem: If f is C outside a ﬁnite set of discontinuities: O(M 1 ) (Fourier), n [M ] = ||f fM ||2 n = O(M 2 ) (wavelets).For Fourier, linear non-linear, sub-optimal.For wavelets, linear non-linear, optimal.
50. 50. Examples of 1D Approximations −1 −1.5 −2 −2.5 −3 −3.5 10.8 −40.6 −4.50.4 −50.2 0 −5.5 −6 −2 −1.8 −1.6 −1.4 −1.2 −1 −0.8 1 10.8 0.80.6 0.60.4 0.40.2 0.2 0 0 1 10.8 0.80.6 0.60.4 0.40.2 0.2 0 0 1 10.8 0.80.6 0.60.4 0.40.2 0.2 0 0
51. 51. Localizing the Singular Support S = {x1 , x2 } Small coe cient f (x) | f, jn ⇥| < Tx1 x2 Large coe cient j2 j1 Singular support: |Cj | K|S| = constant
52. 52. Localizing the Singular Support S = {x1 , x2 } Small coe cient f (x) | f, jn ⇥| < T x1 x2 Large coe cient j2 j1 Singular support: |Cj | K|S| = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1/2)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j/2
53. 53. Localizing the Singular Support S = {x1 , x2 } Small coe cient f (x) | f, jn ⇥| < T x1 x2 Large coe cient j2 j1 Singular support: |Cj | K|S| = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1/2)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j/2 1 Singular: 2j1 = (T /C) +1/2Cut-o scales (depends on T ): Regular: 2j2 = (T /C)2
54. 54. Localizing the Singular Support S = {x1 , x2 } Small coe cient f (x) | f, jn ⇥| < T x1 x2 Large coe cient j2 j1 Singular support: |Cj | K|S| = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1/2)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j/2 1 Singular: 2j1 = (T /C) +1/2Cut-o scales (depends on T ): Regular: 2j2 = (T /C)2Hand-made approximate: ˜ fM = f, j,n ⇥ j,n + f, j,n ⇥ j,n j j2 n Cj c j j1 n Cj
55. 55. Computing Error and #Coefficients f (x) |Cj | K|S| = constant n Cj : |⇥f, c j,n ⇤| C2j( +1/2) j2 j1 n Cj : |⇥f, j,n ⇤| C2j/2 1 2 j1 = (T /C) +1/2 2j2 = (T /C)2||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj (K|S|) C 2 2j + 2 j C 2 2j(2 +1) Singulatities j<j2 j<j1 = O(2 + 2j2 2 j1 ) = O(T + T 2 2 +1/2 ) = O(T 2 +1/2 ) regular part
56. 56. Computing Error and #Coefficients f (x) |Cj | K|S| = constant n Cj : |⇥f, c j,n ⇤| C2j( +1/2) j2 j1 n Cj : |⇥f, j,n ⇤| C2j/2 1 2 j1 = (T /C) +1/2 2j2 = (T /C)2||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj (K|S|) C 2 2j + 2 j C 2 2j(2 +1) Singulatities j<j2 j<j1 = O(2 + 2 j2 2 j1 ) = O(T + T2 2 +1/2 ) = O(T 2 +1/2 ) regular partM |Cj | + c |Cj | K|S| + 2 j j j2 j j1 j j2 j j1 1 1 = O(| log(T )| + T +1/2 ) = O(T +1/2 )
57. 57. Computing Error and #Coefficients f (x) |Cj | K|S| = constant n Cj : |⇥f, c j,n ⇤| C2j( +1/2) j2 j1 n Cj : |⇥f, j,n ⇤| C2j/2 1 2 j1 = (T /C) +1/2 2j2 = (T /C)2||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj (K|S|) C 2 2j + 2 j C 2 2j(2 +1) Singulatities j<j2 j<j1 = O(2 + 2 j2 2 j1 ) = O(T + T2 2 +1/2 ) = O(T 2 +1/2 ) regular partM |Cj | + c |Cj | K|S| + 2 j j j2 j j1 j j2 j j1 1 1 = O(| log(T )| + T +1/2 ) = O(T +1/2 ) ||f fM ||2 = O(M 2 )
58. 58. 2D Wavelet ApproximationIf f is C in supp( j,n ), then | f, j,n ⇥| 2j( +1) ||f ||C || ||1If f is bounded (e.g. around a singularity), then | f, j,n ⇥| 2j ||f || || ||1
59. 59. Piecewise Regular Functions in 2D Theorem: If f is C outside a set of ﬁnite length edge curves, O(M 1/2 ) (Fourier), n [M ] = ||f fM ||2 n = O(M 1 ) (wavelets).Fourier Wavelet, both sub-optimal.Wavelets: same result for BV functions (optimal).
60. 60. Example of 2D Approximations
61. 61. Localizing the Singular Support in 2Df (x, y) Length(S) = L j2 j1 |Cj | LK2 j = constant
62. 62. Localizing the Singular Support in 2D f (x, y) Length(S) = L j2 j1 |Cj | LK2 j = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j
63. 63. Localizing the Singular Support in 2D f (x, y) Length(S) = L j2 j1 |Cj | LK2 j = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j 1 Singular: 2j1 = (T /C) +1Cut-o scales (depends on T ): Regular: 2j2 = T /C
64. 64. Localizing the Singular Support in 2D f (x, y) Length(S) = L j2 j1 |Cj | LK2 j = constant Regular, n Cj : c |⇥f, j,n ⇤| C2j( +1)Coe cient behavior: Singular, n Cj : |⇥f, j,n ⇤| C2j 1 Singular: 2 j1 = (T /C) +1Cut-o scales (depends on T ): Regular: 2j2 = T /CHand-made approximate: ˜ fM = f, j,n ⇥ j,n + f, j,n ⇥ j,n j j2 n Cj c j j1 n Cj
65. 65. Computing Error and #Coefficients f (x, y) |Cj | LK2 j = constant n Cj : |⇥f, c j,n ⇤| C2j( +1) j2 n Cj : |⇥f, j,n ⇤| C2j j1 1 2 j1 = (T /C) +1 2j2 = T /C||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj LK2 j C 2 22j + 2 2j C 2 22j( +1) Singulatities j<j2 j<j1 = O(2 + 2 j2 2 j1 ) = O(T + T 2 +1 ) = O(T ) regular part
66. 66. Computing Error and #Coefficients f (x, y) |Cj | LK2 j = constant n Cj : |⇥f, c j,n ⇤| C2j( +1) j2 n Cj : |⇥f, j,n ⇤| C2j j1 1 2 j1 = (T /C) +1 2j2 = T /C||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj LK2 j C 2 22j + 2 2j C 2 22j( +1) Singulatities j<j2 j<j1 = O(2 + 2 j2 2 j1 ) = O(T + T 2 +1 ) = O(T ) regular partM |Cj | + c |Cj | LK2 j + 2 2j j j2 j j1 j j2 j j1 1 = O(T 1 +T +1 ) = O(T 1 )
67. 67. Computing Error and #Coefficients f (x, y) |Cj | LK2 j = constant n Cj : |⇥f, c j,n ⇤| C2j( +1) j2 n Cj : |⇥f, j,n ⇤| C2j j1 1 2 j1 = (T /C) +1 2j2 = T /C||f fM ||2 ||f ˜ fM ||2 |⇥f, j,n ⇤| 2 + |⇥f, j,n ⇤| 2 j<j2 ,n Cj c j<j1 ,n Cj LK2 j C 2 22j + 2 2j C 2 22j( +1) Singulatities j<j2 j<j1 = O(2 + 2 j2 2 j1 ) = O(T + T 2 +1 ) = O(T ) regular partM |Cj | + c |Cj | LK2 j + 2 2j j j2 j j1 j j2 j j1 1 = O(T 1 +T +1 ) = O(T 1 ) ||f fM ||2 = O(M 1 )
68. 68. Overview• Approximation and Compression• Decay of Approximation Error• Fourier for Smooth Functions• Wavelet for Piecewise Smooth Functions• Curvelets and Finite Elements for Cartoons
69. 69. Geometrically Regular ImagesGeometric image model: f is C outside a set of C edge curves. BV image: level sets have ﬁnite lengths. Geometric image: level sets are regular. | f| Geometry = cartoon image Sharp edges Smoothed edges
70. 70. Geometic Construction : Finite ElementsApproximation of f , C2 outside C2 edges. ˜Piecewise linear approximation on M triangles: fM .
71. 71. Geometic Construction : Finite ElementsApproximation of f , C2 outside C2 edges. Regular areas: M/2 equilateral triangles. ˜Piecewise linear approximation on M triangles: fM . 1/2 M 1/2 M
72. 72. Geometic Construction : Finite ElementsApproximation of f , C2 outside C2 edges. Regular areas: M/2 equilateral triangles. ˜Piecewise linear approximation on M triangles: fM . 1/2 M 1/2 M Singular areas: M/2 anisotropic triangles.
73. 73. Geometic Construction : Finite ElementsApproximation of f , C2 outside C2 edges. Regular areas: M/2 equilateral triangles. ˜Piecewise linear approximation on M triangles: fM . 1/2 M 1/2 M Singular areas: M/2 anisotropic triangles. Theorem: If f is C2 outside a set of C2 contours, then one has for an adapted ˜ triangulation ||f fM ||2 = O(M 2 ). Di culties to build e cient approximations. No optimal strategies (greedy solutions).
74. 74. Greedy Triangulation OptimizationBougleux, Peyr´, Cohen, ECCV’08 e
75. 75. Curvelet Atoms [Candes, Donoho] [Candes, Demanet, Ying, Donoho]Parabolic dyadic scaling:Rotation: “width length2 ”
76. 76. Curvelet Tight FrameAngular sampling:Spacial sampling:Tight frame of L2 (R2 ):
77. 77. Curvelet Approximation M -term curvelet approximation: Theorem: If f is C2 outside a set of C2 edges, ||f fM ||2 = O(M 2 (log M )3 ).Discrete curvelets: O(N log(N )) algorithm.Redundancy 5 =⇥ not e cient for compression.
78. 78. Curvelets DenoisingWorks on elongated edges.Works also on locally parallel textures !
79. 79. Conclusion
80. 80. Conclusion
81. 81. Conclusion 1 0.8 0.6 0.4 0.2 0
82. 82. Conclusion 1 0.8 0.6 0.4 0.2 0