examples of ill-posed problems - m15/allgemeines€¦ · examples of ill-posed problems michael...

50
Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014 Chapter 1 Examples of Ill-Posed Problems Ill-Posed Problems in Image and Signal Processing WS 2014/2015 Michael Moeller Optimization and Data Analysis Department of Mathematics TU M ¨ unchen

Upload: others

Post on 25-Mar-2020

5 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Chapter 1Examples of Ill-Posed ProblemsIll-Posed Problems in Image and Signal ProcessingWS 2014/2015

Michael MoellerOptimization and Data Analysis

Department of MathematicsTU Munchen

Page 2: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What are ill-posed problems?

Definition (Well-posed problems (Hadamard))

A problem is well-posed if the following three properties hold.1 Existence: For all suitable data, a solution exists.2 Uniqueness: For all suitable data, the solution is unique.3 Stability: The solution depends continuously on the data.

Definition (Ill-posed problems)

A problem that violates any of the three properties ofwell-posedness is called an ill-posed problem.

Page 3: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Differentiation

Data from: Microsoft Research GeoLife GPS Trajectories

Time ’12:44:12’ ’12:44:13’ ’12:44:15’Latitude 39.974408918 39.974397078 39.973982524Longitude 116.30352210 116.30352693 116.30362184

How fast did this person go?

Page 4: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Differentiation

0 100 200 300 400 500 600 700 800 900 10000

5

10

15

Measurements

met

ers

per

seco

nd

Usain Bolt World Record

New world record? Top speed of 161.78 km/h?

Page 5: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Differentiation is ill-posed

Computation:

The solution does not depend continuously on the data.

Ill-posedness of differentiation

For f , f δ ∈ C1([0,1]), although the error in the data

‖f − f δ‖ ≤ δ

is arbitrary small, the error between the derivatives

‖∂x f − ∂x f δ‖

can be arbitrary large!

Page 6: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Why is that interesting in practice?

In practice, measurements are NEVER exact!

0 50 100 150 200 2500

0.5

1

1.5

2Measurements when dropping a ball

Hei

ght z

(t)

Measurements50 100 150

−2

−1.5

−1

−0.5

0

0.5

1x 10

−3 Acceleration during free fall

Acc

eler

atio

n ∂ ttz(

t)

Measurements

Page 7: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 1: Bound the noise in a stronger norm, e.g.

‖nδ‖2Y =

∫ 1

0|nδ(x)|2 dx +

∫ 1

0|∂xnδ(x)|2 dx ,

(a norm in the Sobolev space H1([0,1])).

→ Unrealistic in practice!→ In our example this would assume the prior knowledge thatthe frequency k of the noise is bounded!

Page 8: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 1: Bound the noise in a stronger norm, e.g.

‖nδ‖2Y =

∫ 1

0|nδ(x)|2 dx +

∫ 1

0|∂xnδ(x)|2 dx ,

(a norm in the Sobolev space H1([0,1])).

→ Unrealistic in practice!→ In our example this would assume the prior knowledge thatthe frequency k of the noise is bounded!

Page 9: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 1: Bound the noise in a stronger norm, e.g.

‖nδ‖2Y =

∫ 1

0|nδ(x)|2 dx +

∫ 1

0|∂xnδ(x)|2 dx ,

(a norm in the Sobolev space H1([0,1])).

→ Unrealistic in practice!→ In our example this would assume the prior knowledge thatthe frequency k of the noise is bounded!

Page 10: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 2: Assume additional regularity of the estimatedsolution fα and use regularization. Solve

−α∂xx fα(x) + fα(x) = f δ(x) (RD)

for fα.

→ Allows us to bound the error in the derivatives.

→ Computation on the board.

Page 11: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 2: Assume additional regularity of the estimatedsolution fα and use regularization. Solve

−α∂xx fα(x) + fα(x) = f δ(x) (RD)

for fα.

→ Allows us to bound the error in the derivatives.

→ Computation on the board.

Page 12: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

What can we do?

We need more information or additional assumptions!

Goal: Continuous dependence of ‖∂x f δ − ∂x f‖X on ‖f δ − f‖Y .

Option 2: Assume additional regularity of the estimatedsolution fα and use regularization. Solve

−α∂xx fα(x) + fα(x) = f δ(x) (RD)

for fα.

→ Allows us to bound the error in the derivatives.

→ Computation on the board.

Page 13: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Error estimation for regularized derivatives

For fα determined by

−α∂xx fα(x) + fα(x) = f δ(x) (RD)

and twice continuously differentiable f , we can choose α suchthat

‖∂x fα − ∂x f‖2 ≤√

C√δ,

although‖f δ − f‖2 ≤ δ.

Observation

Even when regularization is used, the order of thereconstruction error is worse than the order of the error in thedata.

Page 14: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Error estimation for regularized derivatives

For fα determined by

−α∂xx fα(x) + fα(x) = f δ(x), (RD)

let us make a (seemingly small) change and only assume thatf is one time continuously differentiable.

Computation on the board shows:

Observation

Without additional smoothness assumptions on the exactsolution, the convergence of the regularized solutions isarbitrarily slow!

Page 15: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Error estimation for regularized derivatives

For fα determined by

−α∂xx fα(x) + fα(x) = f δ(x), (RD)

let us make a (seemingly small) change and only assume thatf is one time continuously differentiable.

Computation on the board shows:

Observation

Without additional smoothness assumptions on the exactsolution, the convergence of the regularized solutions isarbitrarily slow!

Page 16: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Looking ahead...

What did we do by computing −α∂xx fα(x) + fα(x) = f δ(x)?

In this lecture we will learn that fα as computed above, solves

fα = arg minu‖u − f δ‖2

2 + α‖∂xu‖22.

→ Tikhonov regularization!

Page 17: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Looking ahead...

What did we do by computing −α∂xx fα(x) + fα(x) = f δ(x)?

In this lecture we will learn that fα as computed above, solves

fα = arg minu‖u − f δ‖2

2 + α‖∂xu‖22.

→ Tikhonov regularization!

Page 18: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Looking ahead...

What did we do by computing −α∂xx fα(x) + fα(x) = f δ(x)?

In this lecture we will learn that fα as computed above, solves

fα = arg minu‖u − f δ‖2

2 + α‖∂xu‖22.

→ Tikhonov regularization!

Page 19: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Discrete differentiation by finite differences

In practice: Evaluations fi of the function at grid points xi withxi+1 − xi = h. Typically, one computes

∂x f (xi ) ≈fi − fi−1

hleft sided differences

∂x f (xi ) ≈fi+1 − fi

hright sided differences

∂x f (xi ) ≈fi+1 − fi−1

2hcentral differences

We will see in the exercises:• The finite difference approximation of the derivative gets

better as h decreases.• The error due to taking finite differences of noisy data

increases as h decreases.→ The step size has to be chosen carefully!

Page 20: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Discrete differentiation by finite differences

In practice: Evaluations fi of the function at grid points xi withxi+1 − xi = h. Typically, one computes

∂x f (xi ) ≈fi − fi−1

hleft sided differences

∂x f (xi ) ≈fi+1 − fi

hright sided differences

∂x f (xi ) ≈fi+1 − fi−1

2hcentral differences

We will see in the exercises:• The finite difference approximation of the derivative gets

better as h decreases.• The error due to taking finite differences of noisy data

increases as h decreases.→ The step size has to be chosen carefully!

Page 21: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Discrete differentiation by finite differences

In practice: Evaluations fi of the function at grid points xi withxi+1 − xi = h. Typically, one computes

∂x f (xi ) ≈fi − fi−1

hleft sided differences

∂x f (xi ) ≈fi+1 − fi

hright sided differences

∂x f (xi ) ≈fi+1 − fi−1

2hcentral differences

We will see in the exercises:• The finite difference approximation of the derivative gets

better as h decreases.• The error due to taking finite differences of noisy data

increases as h decreases.→ The step size has to be chosen carefully!

Page 22: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Summary: Differentiation

What we have learned about the differentiation of a function:

1 Without regularization an arbitrarily small error in the datacan lead to an arbitrarily large error in the derivative!

2 Even with regularization the order with which the error inthe derivative decays is worse than the order of the error inthe data!

3 We need additional smoothness assumption on the truefunction f to even derive an estimate on the error!

Page 23: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Forward diffusion

Heat Equation

The heat equation with zero Dirichlet boundary conditions isgiven by the following partial differential equation (PDE):

∂tu(x , t) = ∂xxu(x , t) for x ∈]0, π[, t ∈ R+

u(0, t) = 0 ∀t ∈ R+

u(π, t) = 0 ∀t ∈ R+

u(x ,0) = f (x) for x ∈]0, π[

Naive idea:

ui,j+1 − ui,j

∆t≈

ui+1,j − 2ui,j + ui−1,j

∆x

Does it work both ways - forward and backward?

Page 24: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

The 1d heat equation

First homework:f (y) = sin(m y), ∀δ,T , ∃m : ‖u(·,T )− 0‖2 ≤ δ, but ‖f‖∞ = 1.

Conclusion from homework

The backward heat equation is ill-posed!

A computation on the board shows:

Solution of the heat equation

The solution of the 1d heat equation with zero Dirichletboundary conditions is given by

u(x , t) =

∫ π

0k(x , y , t)f (y) dy ,

k(x , y , t) =2π

∞∑n=1

e−n2t sin(nx) sin(ny).

Page 25: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

The 1d heat equation

First homework:f (y) = sin(m y), ∀δ,T , ∃m : ‖u(·,T )− 0‖2 ≤ δ, but ‖f‖∞ = 1.

Conclusion from homework

The backward heat equation is ill-posed!

A computation on the board shows:

Solution of the heat equation

The solution of the 1d heat equation with zero Dirichletboundary conditions is given by

u(x , t) =

∫ π

0k(x , y , t)f (y) dy ,

k(x , y , t) =2π

∞∑n=1

e−n2t sin(nx) sin(ny).

Page 26: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

Original image

Page 27: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

Blurry image f = k ∗ u

Page 28: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

Reconstructed image u = F−1(F(f )/F(k))

Page 29: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

Blurry noisy image f = k ∗ u + n,⇒ F(f ) ≈ F(k) · F(u)

Page 30: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

Reconstruction by F−1(F(f )/F(k))

Page 31: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Some things about image processing

What is an image?

Continuous representation: Function u : Ω→ R (grayscale)or u : Ω→ R3 (color), where Ω ⊂ R2 (typically open andbounded).

Discrete representation: Matrix u ∈ Rn×m (grayscale) orthree matrices u1, u2, u3 ∈ Rn×m (color). The discretepoints/entries of the matrix are called pixels.

Page 32: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Blurring

Continuous model for a blurred image:

f (x , y) =

∫R2

k(s − x , t − y)u(s, t) ds dt

with a convolution kernel k , e.g.

k(s, t) =1

2πσ2 exp(−s2 + t2

2σ2

)

Page 33: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

The Fourier Theorem states that

f = k ∗ u ⇒ F(f ) = F(k)F(u).

Riemann-Lebesgue Lemma

Let k : R2 → R be absolutely integrable, i.e.∫ ∞−∞

∫ ∞−∞|k(x , y)| dx dy <∞.

Then |F(k)(µ, ν)| → 0 for ‖(µ, ν)‖ → ∞.

The reconstruction of

u = F−1(F(f )

F(k)

)becomes unstable!

Page 34: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring

The Fourier Theorem states that

f = k ∗ u ⇒ F(f ) = F(k)F(u).

Riemann-Lebesgue Lemma

Let k : R2 → R be absolutely integrable, i.e.∫ ∞−∞

∫ ∞−∞|k(x , y)| dx dy <∞.

Then |F(k)(µ, ν)| → 0 for ‖(µ, ν)‖ → ∞.

The reconstruction of

u = F−1(F(f )

F(k)

)becomes unstable!

Page 35: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

How can we discretize a blur?

Image: u ∈ Rn×m.

Blur kernel: k ∈ Rr×r , typically r << minn,m. Assume zerovalues outside.

For example

k =

0.0030 0.0133 0.0219 0.0133 0.00300.0133 0.0596 0.0983 0.0596 0.01330.0219 0.0983 0.1621 0.0983 0.02190.0133 0.0596 0.0983 0.0596 0.01330.0030 0.0133 0.0219 0.0133 0.0030

Let r be odd.

fi,j =r∑

h=1

r∑l=1

kh,r ui+h− r+12 ,j+l− r+1

2

Page 36: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

How can we discretize a blur?

Image: u ∈ Rn×m.

Blur kernel: k ∈ Rr×r , typically r << minn,m. Assume zerovalues outside. For example

k =

0.0030 0.0133 0.0219 0.0133 0.00300.0133 0.0596 0.0983 0.0596 0.01330.0219 0.0983 0.1621 0.0983 0.02190.0133 0.0596 0.0983 0.0596 0.01330.0030 0.0133 0.0219 0.0133 0.0030

Let r be odd.

fi,j =r∑

h=1

r∑l=1

kh,r ui+h− r+12 ,j+l− r+1

2

Page 37: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

How can we discretize a Gaussian blur?

Image: u ∈ Rn×m.

Gaussian blur kernel: Separable!

f (x , y) =1

2πσ2

∫Ω

exp(− (s − x)2 + (t − y)2

2σ2

)u(s, t) ds dt

=1√2πσ

∫exp

(− (t − y)2

2σ2

)v(x , t) dt

with

v(x , t) =1√2πσ

∫exp

(− (s − x)2

2σ2

)u(s, t) ds

We only have to do two 1d convolutions!

Page 38: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

How can we discretize a Gaussian blur?

Image: u ∈ Rn×m.

Gaussian blur kernel: Separable!

f (x , y) =1

2πσ2

∫Ω

exp(− (s − x)2 + (t − y)2

2σ2

)u(s, t) ds dt

=1√2πσ

∫exp

(− (t − y)2

2σ2

)v(x , t) dt

with

v(x , t) =1√2πσ

∫exp

(− (s − x)2

2σ2

)u(s, t) ds

We only have to do two 1d convolutions!

Page 39: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizationsGaussian blur kernel: Separable!

k =(

0.1615 0.2180 0.2409 0.2180 0.1615)

fi,j =r∑

h=1

kh

r∑l=1

kl ui+h− r+12 ,j+l− r+1

2

Or in the pure 1d case

ci =r∑

h=1

khbi+h− r+12

can be written as

~c =

... ... ... ... ...0 k 0 ... 00 0 k ... 00 ... 0 k 0... ... ... ... ...

︸ ︷︷ ︸

A1

~b

Page 40: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

~c =

... ... ... ... ...0 k 0 ... 00 0 k ... 00 ... 0 k 0... ... ... ... ...

︸ ︷︷ ︸

A1

~b

What happens at the boundary? What are b0,b−1,...?

Most common assumption for image blurring:bh = b1 for h ≤ 1, bh = bn for h ≥ n.

First rows of the matrix A1:k1 + k2 + k3 k4 k5 ... 0

k1 + k2 k3 k4 ... 0k1 k2 k3 ... 00 k 0 ... 0... ... ... ... ...

Page 41: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

~c =

... ... ... ... ...0 k 0 ... 00 0 k ... 00 ... 0 k 0... ... ... ... ...

︸ ︷︷ ︸

A1

~b

What happens at the boundary? What are b0,b−1,...?

Most common assumption for image blurring:bh = b1 for h ≤ 1, bh = bn for h ≥ n.

First rows of the matrix A1:k1 + k2 + k3 k4 k5 ... 0

k1 + k2 k3 k4 ... 0k1 k2 k3 ... 00 k 0 ... 0... ... ... ... ...

Page 42: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

~c =

... ... ... ... ...0 k 0 ... 00 0 k ... 00 ... 0 k 0... ... ... ... ...

︸ ︷︷ ︸

A1

~b

What happens at the boundary? What are b0,b−1,...?

Most common assumption for image blurring:bh = b1 for h ≤ 1, bh = bn for h ≥ n.

First rows of the matrix A1:k1 + k2 + k3 k4 k5 ... 0

k1 + k2 k3 k4 ... 0k1 k2 k3 ... 00 k 0 ... 0... ... ... ... ...

Page 43: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

• We know how to write a 1d blur as c = A1b. For image u:

v = A1u ∈ Rn×m.

• Now we need to blur v in x-direction. Generate matrixA2 ∈ Rm×m with the kernel k appearing in the columns,and the boundaries treated similar to the y -direction case.

• Computef = A1uA2.

• Kronecker product:

A⊗ B =

A1,1B A1,2B ... A1,mBA2,1B A2,2B ... A2,mB... ... ... ...

Am,1B Am,2B ... Am,mB

∈ Rnm×nm

Vectorization

f = A1uA2 ⇔ vec(f ) = (AT2 ⊗ A1)vec(u).

Page 44: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

• We know how to write a 1d blur as c = A1b. For image u:

v = A1u ∈ Rn×m.

• Now we need to blur v in x-direction. Generate matrixA2 ∈ Rm×m with the kernel k appearing in the columns,and the boundaries treated similar to the y -direction case.

• Computef = A1uA2.

• Kronecker product:

A⊗ B =

A1,1B A1,2B ... A1,mBA2,1B A2,2B ... A2,mB... ... ... ...

Am,1B Am,2B ... Am,mB

∈ Rnm×nm

Vectorization

f = A1uA2 ⇔ vec(f ) = (AT2 ⊗ A1)vec(u).

Page 45: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring - discretizations

• We know how to write a 1d blur as c = A1b. For image u:

v = A1u ∈ Rn×m.

• Now we need to blur v in x-direction. Generate matrixA2 ∈ Rm×m with the kernel k appearing in the columns,and the boundaries treated similar to the y -direction case.

• Computef = A1uA2.

• Kronecker product:

A⊗ B =

A1,1B A1,2B ... A1,mBA2,1B A2,2B ... A2,mB... ... ... ...

Am,1B Am,2B ... Am,mB

∈ Rnm×nm

Vectorization

f = A1uA2 ⇔ vec(f ) = (AT2 ⊗ A1)vec(u).

Page 46: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring as a linear equation

• We have discretized f = k ∗ u as

~f = A~u.

• Matlab: A is invertible!• Unique solution with A−1 → Problem not ill-posed?!?

• Give it a try! Use backslash.

How is this possible?

Page 47: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring as a linear equation

• We have discretized f = k ∗ u as

~f = A~u.

• Matlab: A is invertible!• Unique solution with A−1 → Problem not ill-posed?!?• Give it a try! Use backslash.

How is this possible?

Page 48: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring as a linear equation

• We have discretized f = k ∗ u as

~f = A~u.

• Matlab: A is invertible!• Unique solution with A−1 → Problem not ill-posed?!?• Give it a try! Use backslash.

How is this possible?

Page 49: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Deblurring as a linear equation

• We have discretized f = k ∗ u as

~f = A~u.

• Matlab: A is invertible!• Unique solution with A−1 → Problem not ill-posed?!?• Give it a try! Use backslash.

How is this possible?

Page 50: Examples of Ill-Posed Problems - M15/Allgemeines€¦ · Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014

Examples of Ill-PosedProblems

Michael Moeller

Ill-Posedness

Differentiation

Inverse Diffusion

Image Deblurring

updated 11.10.2014

Implementation

• When writing a convolution as a matrix vectormultiplication, always use sparse matrices!

• A full double matrix (AT2 ⊗ A1) for a 256× 256 image is

over 34GB!

• See “help spdiags“ in Matlab.

• See “help kron” in Matlab.

• See “help reshape” in Matlab.