Image Processing using Partial Differential Equations (PDE) - - PowerPoint PPT Presentation

image processing using partial differential equations pde
SMART_READER_LITE
LIVE PREVIEW

Image Processing using Partial Differential Equations (PDE) - - PowerPoint PPT Presentation

Image Processing using Partial Differential Equations (PDE) Restoration, segmentation, tracking, optical flow estimation, registration Pierre Kornprobst NeuroMathComp project team INRIA Sophia Antipolis - M editerran ee Vision Student


slide-1
SLIDE 1

Image Processing using Partial Differential Equations (PDE)

Restoration, segmentation, tracking, optical flow estimation, registration

Pierre Kornprobst

NeuroMathComp project team INRIA Sophia Antipolis - M´ editerran´ ee Vision Student Talks [ViST]

April 2014

Kornprobst (INRIA) PDEs April 2014 1 / 48

slide-2
SLIDE 2

My goals today

Introduce methodology

Kornprobst (INRIA) PDEs April 2014 2 / 48

slide-3
SLIDE 3

My goals today

Introduce methodology Show links between formulations (min, ∂.

∂t ,

  • )

Kornprobst (INRIA) PDEs April 2014 2 / 48

slide-4
SLIDE 4

My goals today

Introduce methodology Show links between formulations (min, ∂.

∂t ,

  • )

Show a success story: level-sets

Kornprobst (INRIA) PDEs April 2014 2 / 48

slide-5
SLIDE 5

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

Kornprobst (INRIA) PDEs April 2014 3 / 48

slide-6
SLIDE 6

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

Kornprobst (INRIA) PDEs April 2014 3 / 48

slide-7
SLIDE 7

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets

Kornprobst (INRIA) PDEs April 2014 3 / 48

slide-8
SLIDE 8

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 3 / 48

slide-9
SLIDE 9

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 4 / 48

slide-10
SLIDE 10

An image is seen as a function defined in continuous space

u : Ω ⊂ I R2 → I R

Kornprobst (INRIA) PDEs April 2014 5 / 48

slide-11
SLIDE 11

A PDE defines an evolution

u(t, x) / ∂u ∂t = H(t, x, u, ∇u, ∇2u) v(x) ≡ u(∞, x)

Kornprobst (INRIA) PDEs April 2014 6 / 48

slide-12
SLIDE 12

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 7 / 48

slide-13
SLIDE 13

Gaussian filtering

Let u0 an image, we define : uσ(x) = (Gσ ∗ u0)(x) avec Gσ(x) = 1 2π σ2 exp

  • − |x|2

2 σ2

  • .

σ = 0 σ = 5 σ = 11 σ = 17

Kornprobst (INRIA) PDEs April 2014 8 / 48

slide-14
SLIDE 14

Heat equation

A linear PDE ∂u ∂t (t, x) = ∆u(t, x), t ≥ 0, u(0, x) = u0(x). t = 0 t = 12.5 t = 60.5 t = 93.5 A notion of scale

Kornprobst (INRIA) PDEs April 2014 9 / 48

slide-15
SLIDE 15

Solution of the heat equation is a convolution

u(t, x) = (G√

2 t ∗ u0)(x)

Gaussian filtering One operation in a large neighbourhood

σ = 0 σ = 5 σ = 11 σ = 17

t = 0 t = 12.5 t = 60.5 t = 93.5 Heat equation A succession of local operations

Kornprobst (INRIA) PDEs April 2014 10 / 48

slide-16
SLIDE 16

Take home messages

PDE appear as a natural way to smooth images. When it is linear, a PDE (or equivalently the convolution) do not preserve edges.

Kornprobst (INRIA) PDEs April 2014 11 / 48

slide-17
SLIDE 17

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 12 / 48

slide-18
SLIDE 18

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 13 / 48

slide-19
SLIDE 19

Solution 1: Make convolution ”nonlinear”

Bilateral filtering (Tomasi, Manduchi [1998])

Given u0, we define u by : u(x) = 1 w(x)

  • d(x − ξ)˜

d(u0(x) − u0(ξ))u0(ξ)dξ with w(x) =

  • d(x − ξ)˜

d(u0(x) − u0(ξ))dξ

Kornprobst (INRIA) PDEs April 2014 14 / 48

slide-20
SLIDE 20

Denoising and Simplification

before after

Kornprobst (INRIA) PDEs April 2014 15 / 48

slide-21
SLIDE 21

Denoising and Simplification

before after

Computer Graphics community like it!

Numerous improvements, extensions, efficient implementations and great applications

Kornprobst (INRIA) PDEs April 2014 15 / 48

slide-22
SLIDE 22

Do your own comics

Winnemoller, Olsen, Gooch [2006]

before after

(video-spiderman.avi) Kornprobst (INRIA) PDEs April 2014 16 / 48

slide-23
SLIDE 23

Tone management for photographic look

Bae, Paris, Durand [2006]

Kornprobst (INRIA) PDEs April 2014 17 / 48

slide-24
SLIDE 24

Tone management for photographic look

Bae, Paris, Durand [2006]

”Clearing winter storm”, Ansel Adams

Kornprobst (INRIA) PDEs April 2014 17 / 48

slide-25
SLIDE 25

Tone management for photographic look

Bae, Paris, Durand [2006]

Our classical picture

Kornprobst (INRIA) PDEs April 2014 18 / 48

slide-26
SLIDE 26

Tone management for photographic look

Bae, Paris, Durand [2006]

model before

Kornprobst (INRIA) PDEs April 2014 19 / 48

slide-27
SLIDE 27

Tone management for photographic look

Bae, Paris, Durand [2006]

model after

Kornprobst (INRIA) PDEs April 2014 20 / 48

slide-28
SLIDE 28

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 21 / 48

slide-29
SLIDE 29

Solution 2: Modify the heat equation

Heat equation ∂u ∂t = ∆u = div( ? ∇u)

Kornprobst (INRIA) PDEs April 2014 22 / 48

slide-30
SLIDE 30

Solution 2: Modify the heat equation

Heat equation ∂u ∂t = ∆u = div( ? ∇u) Perona and Malik model [1990] ∂u ∂t = div (c(|∇u|2)

scalar

∇u) with c(s) = 1/√1 + s exp(−s)

Kornprobst (INRIA) PDEs April 2014 22 / 48

slide-31
SLIDE 31

Solution 2: Modify the heat equation

Heat equation ∂u ∂t = ∆u = div( ? ∇u) Perona and Malik model [1990] ∂u ∂t = div (c(|∇u|2)

scalar

∇u) with c(s) = 1/√1 + s exp(−s) Buades, Coll et Morel [2005]: Bilateral filter is related to Perona and Malik model

Kornprobst (INRIA) PDEs April 2014 22 / 48

slide-32
SLIDE 32

Diffusion acts on isophotes

Kornprobst (INRIA) PDEs April 2014 23 / 48

slide-33
SLIDE 33

Diffusion can interpreted w.r.t. local image structures

Nonlinear diffusion is non only a ”controlled” diffusion but it is also related to a directional diffusion depending on local image structures Most diffusion operators can be rewritten as:

  • . . .
  • uTT +
  • . . .
  • uNN

Kornprobst (INRIA) PDEs April 2014 24 / 48

slide-34
SLIDE 34

How to better take into account local image structure?

Limitation of previous models: Estimation of T, N is local

Kornprobst (INRIA) PDEs April 2014 25 / 48

slide-35
SLIDE 35

How to better take into account local image structure?

Limitation of previous models: Estimation of T, N is local Solution: Use structure tensor kρ ∗ ∇uσ∇ut

σ = kρ ∗

uσxx uσxy uσxy uσyy

  • Kornprobst (INRIA)

PDEs April 2014 25 / 48

slide-36
SLIDE 36

How to better take into account local image structure?

Limitation of previous models: Estimation of T, N is local Solution: Use structure tensor kρ ∗ ∇uσ∇ut

σ = kρ ∗

uσxx uσxy uσxy uσyy

  • Weickert [1996]

∂u ∂t = div (D(kρ ∗ ∇uσ∇ut

σ)

matrix

∇u)

Kornprobst (INRIA) PDEs April 2014 25 / 48

slide-37
SLIDE 37

Example

Original Chaleur Perona-Malik Weickert

Kornprobst (INRIA) PDEs April 2014 26 / 48

slide-38
SLIDE 38

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 27 / 48

slide-39
SLIDE 39

When a PDE is a gradient descent of an optimisation problem (also called variational problem)

v(x) = Argmin

u(x)

E(u) =

F(x, u, ∇u, ∇2u)dx

Kornprobst (INRIA) PDEs April 2014 28 / 48

slide-40
SLIDE 40

Solution 3: Define an optimisation problem

Let us start from a model of formation of images, for example : u0 = R u + η where η is a white Gaussian noise and R is a linear operator.

Kornprobst (INRIA) PDEs April 2014 29 / 48

slide-41
SLIDE 41

Solution 3: Define an optimisation problem

Let us start from a model of formation of images, for example : u0 = R u + η where η is a white Gaussian noise and R is a linear operator. Solve the least-square problem inf

u

|u0 − Ru|2 dx → R∗u0 − R∗Ru = 0 is an ill-posed problem Why? Opertor R∗R is usually hard to invert (not bijective or low eingenvalues)

Kornprobst (INRIA) PDEs April 2014 29 / 48

slide-42
SLIDE 42

Constrain possible solutions thanks to a regularity constraint

Tikhonov et Arsenin [1977] inf

u

|u0 − Ru|2 dx + λ

|∇u|2dx

Kornprobst (INRIA) PDEs April 2014 30 / 48

slide-43
SLIDE 43

Constrain possible solutions thanks to a regularity constraint

Tikhonov et Arsenin [1977] inf

u

|u0 − Ru|2 dx + λ

|∇u|2dx The two main ingredients are here!

Kornprobst (INRIA) PDEs April 2014 30 / 48

slide-44
SLIDE 44

Constrain possible solutions thanks to a regularity constraint

Tikhonov et Arsenin [1977] inf

u

|u0 − Ru|2 dx + λ

|∇u|2dx The two main ingredients are here! To minimise, compute the Euler-Lagrange equation, and in that case, we find again the Laplacian operator. EL(u) = λ△u − (R∗Ru − R∗u0) = 0, ∂u ∂t = EL(u).

Kornprobst (INRIA) PDEs April 2014 30 / 48

slide-45
SLIDE 45

So, quadratic penalty gives linear diffusion, and othewise?

Consider a general formulation : inf

u

E(u) =

(u0 − Ru)2 dx + λ

φ(|∇u|) dx Diffusion operator : div φ′(|∇u|) |∇u| ∇u

  • = φ′(|∇u|)

|∇u| uTT + φ′′(|∇u|) uNN

Kornprobst (INRIA) PDEs April 2014 31 / 48

slide-46
SLIDE 46

So, quadratic penalty gives linear diffusion, and othewise?

Consider a general formulation : inf

u

E(u) =

(u0 − Ru)2 dx + λ

φ(|∇u|) dx Diffusion operator : div φ′(|∇u|) |∇u| ∇u

  • = φ′(|∇u|)

|∇u| uTT + φ′′(|∇u|) uNN Choosing φ will have consequences on the solution regularity and as a consequence on the functional space to consider to study the variational formulation (not commented today, but lots of interesting maths here) φ(s) = 2

  • 1 + s2 − 2

→ u ∈ BV (Ω) (preserve discontinuities)

Kornprobst (INRIA) PDEs April 2014 31 / 48

slide-47
SLIDE 47

Take home messages

PDE appear as a natural way to smooth images. When it is linear, a PDE (or equivalently the convolution) do not preserve edges. Nonlinearity is needed to preserve discontinuities (seen in all formulations) PDE may or may not derive from an optimisation problem.

Kornprobst (INRIA) PDEs April 2014 32 / 48

slide-48
SLIDE 48

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 33 / 48

slide-49
SLIDE 49

A curve evolves

Lagrangian formulation ∂c ∂t (t, q) = v(κ, ...) N c(0, q) = c0(q). Example with v = κ

Kornprobst (INRIA) PDEs April 2014 34 / 48

slide-50
SLIDE 50

A curve evolves... but what could be the interest?

Kornprobst (INRIA) PDEs April 2014 35 / 48

slide-51
SLIDE 51

A curve evolves... but what could be the interest? Example: Segmentation

Kornprobst (INRIA) PDEs April 2014 35 / 48

slide-52
SLIDE 52

A curve evolves... but what could be the interest? Example: Segmentation

Kornprobst (INRIA) PDEs April 2014 35 / 48

slide-53
SLIDE 53

A curve evolves... but what could be the interest? Example: Segmentation

... How to formalise the problem? By defining optimisation problems!

Kornprobst (INRIA) PDEs April 2014 35 / 48

slide-54
SLIDE 54

*** IF TIME *** Active contours, Kass, Witkin etal [1987]

inf

c J(c) = b

  • a
  • c′(q)
  • 2dq + β

b

  • a
  • c′′(q)
  • 2dq
  • internal energy

+ λ

b

  • a

g2( |∇I(c(q))|) dq

  • external energy

,

(g decreasing)

– : J(c) not intrinsic (depends on paramerisation) – : Because of regularity constraint, topology changes are impossible (restricted to a single convex object). – : Numerically, curve has to be initialised close to the object to segment

Kornprobst (INRIA) PDEs April 2014 36 / 48

slide-55
SLIDE 55

*** IF TIME *** What about a model with curvature?

inf

c J1(c) = b

  • a
  • c′(q)
  • 2 dq + λ

b

  • a

g2( |∇I(c(q))| )dq – : Still not intrinsic. + : No high order terms in the Euler equation. + : It can be shown that curvature also decreases.

Kornprobst (INRIA) PDEs April 2014 37 / 48

slide-56
SLIDE 56

*** IF TIME *** Idea!

Caselles, Kimmel, Kichenassamy [1995,..] : inf

c J2(c) = b

  • a

g( |∇I(c(q))| )

  • c′(q)
  • dq.

+ : Model is intrinsic! + : Equivalent to infc J1, Aubert, Blanc-F´ erraud [1999] + : Euler equation is a curve evolution : ∂c ∂t = (κg − ∇g, N) N

Kornprobst (INRIA) PDEs April 2014 38 / 48

slide-57
SLIDE 57

Ok, but numerically, evolving a curve is not trivial

Distribution of points won’t stay homogeneous Stability problems Topology changes...

Kornprobst (INRIA) PDEs April 2014 39 / 48

slide-58
SLIDE 58

Idea: The Level-Sets method

Dervieux, Thomasset [1980], Osher, Sethian [1988]

A curve seen as an isophote of a function Evolve curve is equivalent to evolve function ∂c ∂t = v N, c(0, q) = c0(q). = ⇒ ∂u ∂t = v |∇u| u(0, x) = u0(x).

Kornprobst (INRIA) PDEs April 2014 40 / 48

slide-59
SLIDE 59

Many advantages

Fixed system of coordinates Easy handling of topology changes Applicable in any dimension (think about surfaces in 3D!) Equation can be solved with suitable numerical schemes coming from hyperbolic equations.

Kornprobst (INRIA) PDEs April 2014 41 / 48

slide-60
SLIDE 60

Exemple: Segmentation based on objects contours

Caselles, Kimmel, etal [1997], etc

∂u ∂t = g(|∇I|) |∇u| div ∇u |∇u|

  • + αg(|∇I|) |∇u| + ∇g, ∇u

Kornprobst (INRIA) PDEs April 2014 42 / 48

slide-61
SLIDE 61

Exemple: Segmentation based on regions

Chan, Vese [1999]

inf

i1,i2,c F(i1, i2, c) = µ|c| +

  • inside(c)

|u0 − i1|2dx +

  • utside(c)

|u0 − i2|2dx

Kornprobst (INRIA) PDEs April 2014 43 / 48

slide-62
SLIDE 62

These are just two examples...

Many other applications have been considered (e..g, textures, 3D

  • bjects in medical images, tracking of moving objects).

New methods to improve speed (e.g., fast marching). Use shape priors. Keep function as a distance function across iterations to avoid periodic re-initialisation steps. etc.

Kornprobst (INRIA) PDEs April 2014 44 / 48

slide-63
SLIDE 63

1 Can we use PDEs to do some interesting image processing?

Definitions From Gaussian filtering to the heat equation

2 Three solutions to go further

Solution 1: Make convolution ”nonlinear” Solution 2: Modify the heat equation Solution 3: Define an optimisation problem

3 A success story: Levels-sets 4 Conclusion

Kornprobst (INRIA) PDEs April 2014 45 / 48

slide-64
SLIDE 64

Take home messages

PDE appear as a natural way to smooth images. When it is linear, a PDE (or equivalently the convolution) do not preserve edges. Nonlinearity is needed to preserve discontinuities (seen in all formulations) PDE may or may not derive from an optimisation problem. The notion of time evolution can be related to a notion of scale (in image restoration) but also to different aspects like a motion (in level-sets) (not shown here) Many theoretical results allow to prove if your problem is well defined or not. Giving formulations in a continuous setting offers high intuitions and discretisation aspects only come when simulations are needed. There has been a high activity in this area in [1990–2010] with lots of papers!

Kornprobst (INRIA) PDEs April 2014 46 / 48

slide-65
SLIDE 65

If you want to learn more

1999 2001 2002 2002, 2006, 2014 Sethian Sapiro Osher, Fedwik Aubert, Kornprobst

Kornprobst (INRIA) PDEs April 2014 47 / 48

slide-66
SLIDE 66

Thank you!

http://www-sop.inria.fr/members/Pierre.Kornprobst

Kornprobst (INRIA) PDEs April 2014 48 / 48