Professional Documents
Culture Documents
Script 05 Nonlinear Isotropic Diffusion Filtering II Semidiscrete and Fully Discrete Theory
Script 05 Nonlinear Isotropic Diffusion Filtering II Semidiscrete and Fully Discrete Theory
3 4
Nonlinear Isotropic Diffusion Filtering II:
Semidiscrete and Fully Discrete Theory 5 6
7 8
Contents
9 10
1. Motivation 11 12
2. Semidiscrete Well-Posedness and Scale-Space Theory
13 14
An Example
15 16
Application to the Example
Examples 19 20
3 4
Perona-Malik filter avoids blurring and delocalisation of edges
5 6
edge enhancement by rapidly decreasing diffusivity function in |∇u|2
11 12
practical properties of regularised Perona–Malik filter:
13 14
• more robust under noise
• less staircasing 15 16
• keeps advantages of Perona–Malik filter (well-localised, enhanced edges)
17 18
theoretical properties of regularised Perona–Malik filter:
Outline MI
A
Lecture 5: 1 2
3 4
Nonlinear Isotropic Diffusion Filtering II:
Semidiscrete and Fully Discrete Theory 5 6
7 8
Contents
9 10
1. Motivation 11 12
2. Semidiscrete Well-Posedness and Scale-Space Theory
13 14
An Example
15 16
Application to the Example
Examples 19 20
Motivation MI
A
Motivation 1 2
3 4
Lecture 4 dealt with isotropic nonlinear diffusion filters in the continuous setting.
15 16
17 18
19 20
21 22
23 24
6136
Outline MI
A
Lecture 5: 1 2
3 4
Nonlinear Isotropic Diffusion Filtering II:
Semidiscrete and Fully Discrete Theory 5 6
7 8
Contents
9 10
1. Motivation 11 12
2. Semidiscrete Well-Posedness and Scale-Space Theory
13 14
An Example
15 16
Application to the Example
Examples 19 20
3 4
Example of a Space Discretisation
5 6
We want a spatial discretisation of the regularised diffusion equation
7 8
∂tu = div g(|∇uσ |2) ∇u
9 10
= ∂x g(|∇uσ |2) ∂xu + ∂y g(|∇uσ |2) ∂y u .
11 12
We apply central differences twice with half the step size in both directions.
13 14
This gives a compact approximation of the second order derivative in pixel (i, j):
15 16
1 k k
∂x g ∂xu ≈ g ∂xu i+1/2,j − g ∂xu i−1/2,j
h1 17 18
1 gi+1,j + gi,j ui+1,j − ui,j gi,j + gi−1,j ui,j − ui−1,j
≈ · − · 19 20
h1 2 h1 2 h1
21 22
where gi+1/2,j was replaced by the average of gi+1,j and gi,j .
As usual, h1 denotes the pixel size in x-direction. 23 24
6136
Here we can use central differences with full step size in both directions: 7 8
gi,j = g (∂xuσ )2 + (∂y uσ )2 i,j
9 10
2 2 !
uσ,i+1,j − uσ,i−1,j uσ,i,j+1 − uσ,i,j−1
≈ g + . 11 12
2h1 2h2
13 14
We end up with one ordinary differential equation (ODE) for each inner pixel (i, j):
15 16
dui,j 1 gi+1,j + gi,j ui+1,j − ui,j gi,j + gi−1,j ui,j − ui−1,j
= · − ·
dt h1 2 h1 2 h1 17 18
1 gi,j+1 + gi,j ui,j+1 − ui,j gi,j + gi,j−1 ui,j − ui,j−1
+ · − · . 19 20
h2 2 h2 2 h2
The formula remains valid at boundary pixels with reflecting boundary conditions: 3 4
7 8
Remember that g is a nonlinear C∞ function of |∇uσ |2 (cf. Lecture 4).
9 10
Thus, also gi,j is a nonlinear C∞ function of its argument.
It may depend on the entire set of pixel values {uk,` | k = 1, ..., n; ` = 1, ..., m}. 11 12
This even holds in the Perona-Malik case (i.e. without Gaussian regularisation): 13 14
17 18
19 20
21 22
23 24
6136
X2 X
duk g` + gk 5 6
= (u` − uk ),
dt n=1
2h2n
`∈Nn (k)
7 8
where Nn(k) are the neighbours of pixel k in n-direction
(x for n = 1, y for n = 2; boundary pixels have less neighbours). 9 10
This can be written as a system of ordinary differential equations (ODEs):
11 12
dū(t)
= A(ū(t)) ū(t),
dt 13 14
where ū(t) = (u1, ..., uN )>, and the N × N matrix A(ū(t)) = (ak,`(ū(t))) satisfies
15 16
gk +g`
2h2n
(` ∈ Nn(k)),
17 18
P
2 P gk +g`
ak,` := − 2h2n
(` = k),
n=1 `∈Nn (k) 19 20
0 (else).
21 22
Note that ak,` is a C∞ function of u for all k and `, since g is C∞.
23 24
7 8
9 10
Assumptions
11 12
Let f ∈ RN denote our discrete initial image.
We consider a general ODE system with the structure 13 14
dū(t) 15 16
= A(ū(t)) ū(t),
dt
17 18
ū(t)(0) = f ,
19 20
and assume that the N × N matrix A(ū(t)) = (ai,j (ū(t))) satisfies five properties:
21 22
23 24
6136
23 24
(a) Well-Posedness 3 4
There exists a unique solution.
5 6
It depends continuously on f and the right hand side of the ODE system.
7 8
(b) Average Grey Level Invariance
9 10
N N
1 X 1 X 11 12
uj (t) = fj =: µ ∀ t > 0.
N j=1 N j=1
13 14
15 16
(c) Maximum–Minimum Principle
17 18
min fj ≤ ui(t) ≤ max fj ∀ i, ∀ t > 0.
j j 19 20
21 22
23 24
6136
i=1
1
P
N
13 14
decreasing even central moments |ui(t) − µ|2n,
N
i=1
P
N 15 16
increasing entropy − ui(t) ln ui(t).
i=1 17 18
21 22
lim ui(t) = µ ∀ i.
t→∞
23 24
7 8
The symmetry (S2) is easy to check: For k 6= ` we have
gk + g` 9 10
ak,` = = a`,k (` ∈ Nn(k)),
2h2n
ak,` = 0 = a`,k (` 6∈ Nn(k)). 11 12
13 14
Zero column sums (S3) follow from
2
X X X 15 16
gk + g`
a`,` = − = − ak,` ∀ `.
n=1 k∈Nn (`)
2h2n 17 18
k,k6=`
19 20
Nonnegative off-diagonals (S4) are guaranteed by the definition of ak,` on Slide 6.
Irreducibility (S5) is satisfied: For two pixels i and j, consider any connecting path 21 22
along neighbours. For two such neighbours k and ` we have ak,` = gk2h+g 2 > 0.
`
n 23 24
6136
13 14
15 16
17 18
19 20
21 22
23 24
Outline MI
A
Lecture 5: 1 2
3 4
Nonlinear Isotropic Diffusion Filtering II:
Semidiscrete and Fully Discrete Theory 5 6
7 8
Contents
9 10
1. Motivation 11 12
2. Semidiscrete Well-Posedness and Scale-Space Theory
13 14
An Example
15 16
Application to the Example
Examples 19 20
3 4
Examples
5 6
dū(t)
Let the nonlinear ODE system = A(ū(t)) ū(t) satisfy (S1)–(S5).
dt
We want to study two different time discretisations. 7 8
9 10
1. Explicit Scheme
ū(t)k+1 − ū(t)k 11 12
= A(ū(t)k ) ū(t)k
τ
13 14
leads to matrix-vector multiplication
15 16
k+1
ū(t) = I + τ A(ū(t) ) ū(t)k ,
k
17 18
where τ is the time step size,
19 20
the upper index denotes the time level,
and I is the N × N unit matrix. 21 22
23 24
ū(t)k+1 − ū(t)k 3 4
= A(ū(t)k ) ū(t)k+1
τ
5 6
requires to solve a linear system of equations:
7 8
I − τ A(ū(t)k ) ū(t)k+1 = ū(t)k . 9 10
19 20
21 22
23 24
6136
Assumptions 3 4
ū(t)0 = f , 7 8
ū(t)k+1 = Q(ū(t)k ) ū(t)k , ∀ k ∈ N0 ,
9 10
where the N × N matrix Q = (qi,j ) is a (nonlinear) function of ū(t)k that satisfies
11 12
k k
(D1) Smoothness: qi,j (ū(t) ) is continuous in ū(t) for all i, j
13 14
k k
(D2) Symmetry: qi,j (ū(t) ) = qj,i(ū(t) ) ∀ i, j
XN 15 16
(D3) Unit Column Sums: qi,j (ū(t)k ) = 1 ∀j
i=1 17 18
k
(D4) Nonnegativity: qi,j (ū(t) ) ≥ 0 ∀ i, j
19 20
(D5) Positive Diagonal: qi,i(ū(t)k ) > 0 ∀i
21 22
(D6) Irreducibility
23 24
(a) Well-Posedness 3 4
Obviously the solution ū(t)k exists and is unique.
5 6
It depends continuously on f for every k > 0.
7 8
(b) Average Grey Level Invariance
9 10
N N
1 X k 1 X 11 12
u = fj =: µ ∀ k ∈ N0 .
N j=1 j N j=1
13 14
21 22
23 24
6136
13 14
lim uki = µ ∀ i.
k→∞
15 16
17 18
19 20
21 22
23 24
The discrete requirements (D1)–(D6) constitute simple design criteria for reliable 3 4
nonlinear diffusion algorithms.
5 6
Let A = (ai,j ) : R → R
N N ×N
satisfy the semidiscrete requirements (S1)–(S5).
Let us now check if the explicit and semi-implicit discretisations satisfy (D1)–(D6). 7 8
1. Explicit Scheme 9 10
ū(t)k+1 = I + τ A(ū(t)k ) ū(t)k
| {z } 11 12
Q(ū(t)k )
fulfils immediately the following discrete requirements: 13 14
• Smoothness of Q (D1) follows from the smoothness of A (S1). 15 16
• Symmetry of Q (D2) follows from the symmetry of A (S2).
17 18
• Unit column sums of Q (D3) follow from vanishing column sums of A (S3).
• Irreducibility of Q (D6) follows from irreducibility of A (S5): 19 20
For k 6= `, note that qk,` > 0 if ak,` > 0.
• For off-diagonal elements, nonnegativity (D4) follows from qi,j = τ ai,j and the 21 22
nonnegative off-diagonals of A (S4).
23 24
6136
3 4
τ k
0 h22
gi,j+1/2 0
5 6
− hτ2 gi,j+1/2
k
2 7 8
τ k τ k
h21
gi−1/2,j − hτ2 k
gi−1/2,j + 1 − τ
h21
k
gi+1/2,j h21
gi+1/2,j
1
9 10
− hτ2 gi,j−1/2
k
2
11 12
τ k
0 h22
gi,j−1/2 0
13 14
k
• The diffusivity gi+1/2,j k
is approximated by the average of gi+1,j k
and gi,j . 15 16
• This stencil performs weighted averaging with time- and space-variant weights. 17 18
The weights depend on the evolving image and become small at edges.
Nevertheless, all weights sum up to 1. 19 20
The time step size restriction guarantees nonnegative weights and stability.
21 22
• Setting g := 1 gives the homogeneous diffusion stencil from Lecture 3.
23 24
6136
−1 3 4
ū(t)k+1 = I − τ A(ū(t)k ) ū(t)k
5 6
One can show that (D1)–(D6) are satisfied for arbitrarily (!) large time steps τ .
It can be an interesting alternative to the explicit scheme, 7 8
if we can solve the resulting linear system of equations efficiently.
9 10
Such solvers will be discussed in the next lecture.
11 12
13 14
15 16
17 18
19 20
21 22
23 24
covers even discrete nonlocal processes that do not come from PDEs
7 8
holds in any dimension
9 10
also applicable for data on surfaces or graphs
11 12
13 14
15 16
17 18
19 20
21 22
23 24
6136
Summary MI
A
Summary 1 2
3 4
Complete well-posedness and scale-space theories exist also for the semidiscrete
7 8
• existence, uniqueness, stability w.r.t. initial image
9 10
• extremum principle
• average grey level invariance 11 12
• many simplifying Lyapunov functions/sequences
13 14
• convergence to constant steady-state
15 16
The semidiscrete theory is satisfied by standard finite difference discretisation
References MI
A
References 1 2
(https://www.mia.uni-saarland.de/weickert/Papers/book.pdf)
(Chapters 3 and 4 present a slightly more general semidiscrete and discrete theory covering also 5 6
anisotropic diffusion filters.)
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24