Image Analysis Lecture 5
Image Analysis Lecture 5
4. Practical 13/05
1
Introduction to problems
inverse
2
© Dr Priscilla Cañizares
What have we got in store for today
- Some examples
3
er than
ey modelling
involve workingitout
from known parameters.
unknown parameters
have
urce? two data: d1 and d2 , and one unknown model parameter, the density ⇢.
her than modelling it from known parameters.
Inverse
el is then problem:
density ⇥ mass 1D example
= volume:
easurement (CT).
out unknown
Modelparameters
parameters and data are related through a physical model
it from known parameters.
uring its mass and volume. d2 ⇢ = d1
own
uring model parameter,
its mass
• Forward the the
and volume.
problem: We know density Our
density ⇢. and volume V, and we want to determine the mass M
https://en.wikipedia.org/wiki/Density
own• Inverse
modelproblem:
parameter, thethedensity
determine Our
density ⇢.of an 4 by measuring its mass, M, and volume, V:
object
2 3 2 3
T1 = a + bz1 T 1 1 z1 7 ?
6 7 6 2 3 Gm=d Linear model
6 7 6 7
T2 = a + bz1 6 T 2 7 61 z2 7 a
6 7=6 74 5 (8)
.. 6 .. 7 6 .. .. 7 d = [T1,T2, …,TN] Measurements
. 6 . 7 6. . 7 b
4 5 4 5
m =[a,b]T Unknowns
TN = a + bzN TN 1 zN
(7)
5
ff
Ax=b
6
Ax=b
• A takes the form:
7
Ax=b
• A takes the form:
8
Model Kernel, e.g
(b)
Instrument Fourier transform
Measurement
A = MK
<latexit sha1_base64="LbJeO1AJIU02UrTsFO5+FA6FBTI=">AAAB7nicbVDLSgNBEOyNrxhfUY9eBoPgKeyKRC9C1IsgQgTzgGQJs5NJMmR2dpnpFcKSj/DiQRGvfo83/8ZJsgeNFjQUVd10dwWxFAZd98vJLS2vrK7l1wsbm1vbO8XdvYaJEs14nUUy0q2AGi6F4nUUKHkr1pyGgeTNYHQ99ZuPXBsRqQccx9wP6UCJvmAUrdS8JBfkjtx2iyW37M5A/hIvIyXIUOsWPzu9iCUhV8gkNabtuTH6KdUomOSTQicxPKZsRAe8bamiITd+Ojt3Qo6s0iP9SNtSSGbqz4mUhsaMw8B2hhSHZtGbiv957QT7534qVJwgV2y+qJ9IghGZ/k56QnOGcmwJZVrYWwkbUk0Z2oQKNgRv8eW/pHFS9irlyv1pqXqVxZGHAziEY/DgDKpwAzWoA4MRPMELvDqx8+y8Oe/z1pyTzezDLzgf30yajkE=</latexit>
wikipedia
https://www.ucsf.edu/
(a)
(c)
https://my.clevelandclinic.org/
https://education.riaus.org.au/
The properties of the system/object observed determine the type of detection instruments/sensors
(b) https://imagine.gsfc.nasa.gov/science/toolbox/emspectrum_observatories1.html
(a) https://www.researchgate.net/publication/231608920_Multimodal_di use_imaging_system
9 (c) https://www.space.fm/astronomy/planetarysystems/electromagneticspectrum.html
ff
6 T 2 7 61 z 2 z 2 7 6 7 ds
6 7=6 7 6b7 Ii = I0 (10)
6 .. 7 6 .. dI.. 74 5 exp c(c, y)ds
6 . 7 6 . . = c(x, 7 y)I (11)rayi
4 5 4 ds 5 c
Example: X-ray imaging y = Ax + ✏
<latexit sha1_base64="sItikn8UtbrpmAdlzCvVwEAHz6M=">AAACAHicbVDLSsNAFJ34rPVVdeHCzWARBKEkItWNUHXjsoJ9QBPKZHrTDp08mJmIIWTjr7hxoYhbP8Odf+OkzUJbD1w4nHMv997jRpxJZZrfxsLi0vLKammtvL6xubVd2dltyzAWFFo05KHoukQCZwG0FFMcupEA4rscOu74Jvc7DyAkC4N7lUTg+GQYMI9RorTUr+wn+BKntuvhqww/4hMbIsl47lTNmjkBnidWQaqoQLNf+bIHIY19CBTlRMqeZUbKSYlQjHLIynYsISJ0TIbQ0zQgPkgnnTyQ4SOtDLAXCl2BwhP190RKfCkT39WdPlEjOevl4n9eL1behZOyIIoVBHS6yIs5ViHO08ADJoAqnmhCqGD6VkxHRBCqdGZlHYI1+/I8aZ/WrHqtfndWbVwXcZTQATpEx8hC56iBblETtRBFGXpGr+jNeDJejHfjY9q6YBQze+gPjM8fyWaVSA==</latexit>
TN 1 zN zN 2 " Z #
Ii = I0 exp c(c, y)ds " Z #
" Z # rayi
I 2 6 7 c 7 6 7
6 1
7 I0 Ii s XM
6 . 7 = 66 1 s
7 IsN22 . . . s 76 .. 7
s
6 I1 =7 6 I011= 12 sij6cj . 1M . . . .
s 7 7 64 7
21 2M
5
(14) 6 . 7
6 I2 7 I6 4 5 7 6 c2 s7 sN 2 . . . sN M 4 5
6 7=6 s0
s
j=1 . . . s 7 6 7N 1 (15)
6 .. 7 4 21 22 I 2M
5 6 .. 7 cM
6 . 7 N 6 . 7
4 5 sN 1 sN 2 . . . sN M 4 5
2 3 IN 2 3 cM
7
I 2 3 c
6 17 6 1
7 7
6 7 6 s11 s12 .10. . s1M 7 6 7
fi
Concept of inverse problem: curve tting
11
fi
Solving linear inverse problems:
13.1. LEAST SQUARES PROBLEMS AND THE PSEUDO-INVERSE 639
= i di G
j ij mj di GikkmGm
G
k
k G d = 0 (19)
i j k Or in matrix form:
T TT
G Gm G
G d
Gm= 0 GT d = 0
M
X 6XN N
X
@E
=0=2 mk Giq Gik 2 G"
iq di # 1
@mq k i i
pred T T " # 1" #
m = G G G pred
d T pred T T
1
T
m = G G =G d
m G G G d
T T
G Gm G d=0 13
ffi
2
<latexit sha1_base64="GPJj6F6JYhwPTI4cNnSKzZx1HC4=">AAACBXicbVC7TsMwFHXKq5RXgBGGiAqpDFRJhQpjBQtjkehDakrkuE5r1XYi20FEaRcWfoWFAYRY+Qc2/ga3zQAtR7q6R+fcK/seP6JEKtv+NnJLyyura/n1wsbm1vaOubvXlGEsEG6gkIai7UOJKeG4oYiiuB0JDJlPccsfXk381j0WkoT8ViUR7jLY5yQgCCoteeahywj30gePjN1RUNL95DTxiDu6q3gVzyzaZXsKa5E4GSmCDHXP/HJ7IYoZ5gpRKGXHsSPVTaFQBFE8LrixxBFEQ9jHHU05ZFh20+kVY+tYKz0rCIUurqyp+nsjhUzKhPl6kkE1kPPeRPzP68QquOimhEexwhzNHgpiaqnQmkRi9YjASNFEE4gE0X+10AAKiJQOrqBDcOZPXiTNStmplqs3Z8XaZRZHHhyAI1ACDjgHNXAN6qABEHgEz+AVvBlPxovxbnzMRnNGtrMP/sD4/AH3XJg7</latexit>
min kf (xi ) y i k2
xi
14
We can’t just remove outliers
2
<latexit sha1_base64="GPJj6F6JYhwPTI4cNnSKzZx1HC4=">AAACBXicbVC7TsMwFHXKq5RXgBGGiAqpDFRJhQpjBQtjkehDakrkuE5r1XYi20FEaRcWfoWFAYRY+Qc2/ga3zQAtR7q6R+fcK/seP6JEKtv+NnJLyyura/n1wsbm1vaOubvXlGEsEG6gkIai7UOJKeG4oYiiuB0JDJlPccsfXk381j0WkoT8ViUR7jLY5yQgCCoteeahywj30gePjN1RUNL95DTxiDu6q3gVzyzaZXsKa5E4GSmCDHXP/HJ7IYoZ5gpRKGXHsSPVTaFQBFE8LrixxBFEQ9jHHU05ZFh20+kVY+tYKz0rCIUurqyp+nsjhUzKhPl6kkE1kPPeRPzP68QquOimhEexwhzNHgpiaqnQmkRi9YjASNFEE4gE0X+10AAKiJQOrqBDcOZPXiTNStmplqs3Z8XaZRZHHhyAI1ACDjgHNXAN6qABEHgEz+AVvBlPxovxbnzMRnNGtrMP/sD4/AH3XJg7</latexit>
min kf (xi ) y i k2
xi
15
2
<latexit sha1_base64="GPJj6F6JYhwPTI4cNnSKzZx1HC4=">AAACBXicbVC7TsMwFHXKq5RXgBGGiAqpDFRJhQpjBQtjkehDakrkuE5r1XYi20FEaRcWfoWFAYRY+Qc2/ga3zQAtR7q6R+fcK/seP6JEKtv+NnJLyyura/n1wsbm1vaOubvXlGEsEG6gkIai7UOJKeG4oYiiuB0JDJlPccsfXk381j0WkoT8ViUR7jLY5yQgCCoteeahywj30gePjN1RUNL95DTxiDu6q3gVzyzaZXsKa5E4GSmCDHXP/HJ7IYoZ5gpRKGXHsSPVTaFQBFE8LrixxBFEQ9jHHU05ZFh20+kVY+tYKz0rCIUurqyp+nsjhUzKhPl6kkE1kPPeRPzP68QquOimhEexwhzNHgpiaqnQmkRi9YjASNFEE4gE0X+10AAKiJQOrqBDcOZPXiTNStmplqs3Z8XaZRZHHhyAI1ACDjgHNXAN6qABEHgEz+AVvBlPxovxbnzMRnNGtrMP/sD4/AH3XJg7</latexit>
min kf (xi ) y i k2
xi
16
n n i
number of solutions that give the same minimum prediction error is greater than one, the
i=1
LS fails. The inverse of the "data" matrix is null, and hence the determinant is singular:
N
X
Measures
E = eofe distance T 2
ei (16) [GT G] 1
/
z12
1
z12
(30)
Aside from the Euclidian norm, there are other possible measures of distance. For in-
stance, we can equally well quantify the length by summing the absolute values of the
N
X L1 norm: kekelements
1 = max |ei |
of a vector.
⇥ ⇤ i
L1 norm: kek1 = |ei | 1
L1 norm: kek1 =
N
⇥X
|ei |1
⇤
Gives non-zero weight to the largest element = i=1
i=1 ⇥ XN
⇤
selection of e with largest absolute value
2 1/2
L norm: kek = |ei |
B. N Solving inverse problems using data-driven models
2 2
⇥ X ⇤ ..
i=1
2 1/2 .
L2 norm: kek2 = |ei | Ln norm: kekn =
⇥XN
|ei |n
⇤1/n
L1 i=1
i=1 (31)
The
.. main idea is to develop a mathematically coherent L foundation for 2 combining
. LL norm: kek = max |e |
driven models, and in particular those based on deep learning, with domain-specific k
1 (32) 1 i
i
N
⇥ X n ⇤1/n We choose the norm depending on the data: If the data is very accurate, then the fact that
outlier
Ln norm: kekn edge |ei |
= contained the prediction falls far from its observed value is important; we might choose a higher-order
in physical-analytical models.norm.The focus is on solving ill-posed inverse
i=1 If the data is scattered widely across the trend, then no significance can be placed upon
lems that are at the core of many challenging (17)applications in the natural sciences, me
a few large prediction errors; the low-order norm gives equal weight to errors of different sizes.
and life
• Succesive higher norms sciences, as well as in
give the largest entry of e engineering and industry.
• High-order norms gives preference to higher errors 11
Measures of distance: L1 vs L2
Model: di = m1 + m2 zi (21)
M =2 (22)
N >M (23)
18
Singular Value Decomposition
SVD is to nd patterns in data by providing a hierarchical representation of the data in a new coordinate system.
• To characterise the input and output geometry of a linear map between vector spaces.
• To compress an image.
• …
19
fi
fi
• SVD factorises A as a product of two orthogonal transformations with a diagonal matrix
A = U ⌃V T
(or AV = U ⌃)
The
• We SVDof the
can think writes A as a product
the transformations as rotaionsofand
two orthogonal
the diagonal matrix astransformations
with a a scaling, e.g, dilation
agonal matrix (a scaling operation) in between. It says that we can rep
any transformation by a rotation from “input” coordinates
1
A into convenient
Aordinates, followed by a simple scaling operation, followed by a rotation i
“output” coordinates. Furthermore, the diagonal scaling ⌃ comes out with
elements sorted in decreasing order.
D Singular
and economy SVD are (25)
shown
A = X
in
U ⌃ =
Fig.
V ⇤U⌃V
XX
1.1.
,
matrix
has
The
and
a =
trillion
XX
It is often impractical
columns
elements.
Ûhas
It is often impractical
compute matrixthe and
a
⇤
trillion
of
Sirovich
Û
It is
to construct
It is often
elements.
often
4 the
to construct
first compute
columns
Û
observed
impractical
matrix
6
thespan
? 46
impractical
offirst
XX
6 the matrix
5V
7 6
Sirovich
that
to construct
using
columns
what
it
7 6⇤
7
5
= 6
7 because
the
ofÛ
observed
is possible
4to construct
because
7⇤ 6
6 matrix
is
ofnow
4 using
⌃V
thethe
that
to
of the
known
size.of
bypass
it
matrix
large
XXlarge
what
is XX
because
as isthe
7
possible
this
size of
now
method
6
large
to
the5because
state-
4
of the
known
7
7
the
bypass
76
6
6
7 state-
7 large
this
of the large
5 ⇤
large size of the
of xashas
5 4 the amethodTT of
7
7
7
6
6
4the state-
7 state-
5
7
7
5
0
⇤
m Ulet m alone XX U T
Value Decomposition d d d dimension
Vector space complementary and orthogonal to snapshots
U
let alone
1.2.2 Method of Snapshots
n, solve
dimension n, let dimension
[40]. snapshots [40].
dimension
the eigenvalue
1.2.2 Method
alone solven,the let6
6
n, problem;
of Snapshots
eigenvalue
alone solveproblem;
|
solve
the
7
if x the
has aeigenvalue
million
6 if x hasproblem;
7 eigenvalue
6 {z
problem;
elements,
x has a7
a millionifelements,
0 }|
if
then
7
6 million
UU
6then elements,
million
6{z }
UU elements,
== U U
7 then
7
=thenII
XX⇤ XX has ⇤ a trillion elements. Sirovich
XX ⇤
has a trillion
observed elements.
that it is Sirovich
possible to observed
bypass thisthatlargeit is size
possible to bypass this large
ace that is complementary and orthogonal to that spanned by Û. has a trillion
XX elements.
⇤
has a trillion6
Sirovich elements.
observed 7 6
Sirovich
that it observed
is possible that
to bypass
it is 7
possible
this 6
large
to bypass 7 large
this
It is often impractical to construct It is often
4 the impractical
matrix XX 4to construct
5 because
⇤
of thethe
largematrix
size ofXX the5because
⇤
state-
4 of the large
5 of the state-
matrix andand
matrix compute
compute the
thefirst
matrix and matrix
columns
first compute
mm columns theand
offirst
U compute
oflet
using
m using
columns
Ualonewhat the
what
is U first
ofnow
U is now
using
known columns
mwhat known
as is
thenow of
asU
method
known⌃
the using
of as thewhat
method methodofis ofnow known as the method of
ng
d = the
(u first
, u
U1(and 2 ,
V)
ns of U are called .d. left and
are unitary
The full
. , u ),
d V right
= singu-
(square)
left singular
d matrices
SVD and
(v , v , . . . ,
vectorsd containing
1 2 with orthogonal
economy
v ) of X
dimension
columns
2 snapshots
and
snapshots SVD
thethe
n,
[40].
let
first
alone
are
2 2
[40]. 3snapshots
columns
solve
XX has a trillion elements. XX
⇤ d left
the
shownof and
dimension
eigenvalue
V
Sirovich
⇤
3 2
[40].snapshots
areright
in
n,
has observed Fig.
[40]. singu-
problem;
a trillion that with
|
solve
if
1.1.
32
elements.U
x
=
the
has
d The
a
(u
eigenvalue
million
with
,
{z
Sirovich
it is possible 1 u 2columns
,U. .
to observed
bypass
problem;
elements,
3=
. ,
2 (u
d thisu ),
}
that
d
|
then
V ,
if
u=
x
of
has
,
(v
{z .
,Û
.
v
a
.
,
million
2 . . .span
? elements, then
3u} ), V = (v , v , . . . , v ) con
,
1 it is2 possible to
large
d 1T , vd )T con
d bypass
d this large
1 2 d
6 matrix and compute
7 6 the first mmatrix
6 andof6
columns
7 compute
U using the first
what7 is6now U
m columns
known of
asU using
the
7 what
method
6 ofis⌃ now known
7 U of
as the method U = UU =
and
lar values
ar vectors. is a diagonal
The diagonalmatrix containing
elements of ˆ
the
2
singular
6
C
3
values
7
are
6262
called
37 2 6
singular
32 76
lar vectors
32 7 Economy
and
6 3
is a SVD
diagonal
7 matrix containing the ss
a vector space that is 66complementary and orthogonal
lar vectors 7 6 to7 that7 spanned by Û.
and ⌃ is a diagonal matrix containing the
⌃ . . . > 0. m⇥m
snapshots [40]. snapshots [40].
. . . > 0.
d = 1 2 d ⌃ 2
6
2 7
3 6 6
2
7 76666 1 2 7
77 26
6
6
3 7
3
6 7 6d
6
2 7
3 6
2 ⌃ d d 3 2 7
3 2 3 3
r d
6 7 76
6 7 76666 77 6 6 76 76 7 Economy
6 7 6 3 23 SVD
7 73 3
hey are ordered from largest to smallest.
In Python: 6 The
6 6 6
2
rank 7 6
of
7 76666
3 6
2
X is
2 6
7
77equal
6
6 6
3
to
7
3 6
27 7 6with U7
3 6
2
= 7
(u6 , u7 , . . . 7
7 2
, u 6 V = (v 7, v
67 ), 7 , . . . , v ) con
The columns of are called left singular 6 7 6 vectors of 7 6 and the columns of are
76 76
r
7 6 6 6 7 6 7 7 6 7 6 7 6 7 6 7
1 72
U 6 6
6 7 766
76 666 7
6 7 6 6
k
7
7 76
67 7 6 X7 d
6 7 6
2
1 72
7 67 6 7 6
d
7
3 6
d
ˆ 77 6677 7766277 V 77377
7 7 ⇤ 7 27 V d
3
of non-zero singular values.
1 import numpy as np 6
6
6
6
7
7
7
7
6
=6
66
6
6
6
6
66
6
77 =
6
7 7
6 6
6 6
7 76
7 7 6
7
7
7
lar
7
6
6
vectors
76
7 6 and
7 6
2
7
7
ˆ
6 7 67 6⌃
6
⌃ 7 is
7
67 6a diagonal
6 7
3 6
rmatrix 7containing the
r
⇤7 7
uations
then attempt
2 A =
right singular vectors. The
to solve
np.random.rand(20, a modified
5) system
6 6
6 6 diagonal
of
6
equations
6
6
77
7 7
7
66
66
6
=66
6
7 76666
6
6
66
6
6
66
77
7
6
7
=
7
6 6
elements
6
6
77 6 6
6
7 76
7
7
7
7
6
67
7
7 of
7
7
6
76 ⌃ 74
6 ˆ 7
7 2
6
6 C⌃
7
7
6
6
4m⇥m
d7
7
6
6
7 6 7 65
7
7
6
6
V
are
7 6 7
5
67
7 67 7 65called
7 6 7
4
7 6
7
7 7
67
776 singular
6
75
17
7
7
7
6 6 7 76666
7 6Û Û
6677 6 6
7 76
7 76 7 76 76
6
7 6 7 67 7
4
7 67 7 6 776 17 7
matrix U is unitary if UU⇤ = U⇤#Ufull
3 U, s, Vt = np.linalg.svd(A)
= I.SVD 6 6 7 7=6=66
6 6677 6 6 7=767 = 76 76 7 67 7 67 7 6 776 7
4 U, s, Vt values and they
= np.linalg.svd(A, are ordered
6
6 4
4
6
full_matrices=False)
alued matrices, this is the same as the regular transpose
6 6 from
X
7
75
5
⇤
7
6 # reduced
6 7
7
66
6
444
7 7=6X
66
64
6
6
largest
SVD
6
T
.
6
6
6
6
6
66
7
7
5 5 4 4 to7 smallest.
7 6
6 6 7
7
7
7
74
5
7 76
6
7
6
6
7
74
7 5
7 76
6
6
76
76
74
5
7
The rank of X is equal to
76
74
5
7
7 67
7 67
7 65
76
7 67 7 6
7
7 65 7 6
76 74
7
776
754
7
7
5
6 6 7 7 66 66 7 767 7 6 7 7 76 76 7 7
the number of non-zero
In MATLAB: ⇤ 6 singular
6 66
4 7 5 64 values.
7
7 7 66 6
Au = Ud Ud f, 4
6
66
46
7
7
7
7
5 54
6
7 76
6
7 76
7
7
5 5 4 4 5 54
7
7
5
76
76
54
76 7
76 7
54 5
7
7
5 17
21
1 A = randn(20,5);
Here, we establish the notation that a truncated SVD basis (and the result
Spectral expansion of the operator A ˜
proximated matrix X̃) will be denoted by X̃ = Ũ⌃Ṽ . Because ⌃ is diagon
⇤
Cumulative energy
k
0.8
Singular value,
4
10 r = 100
0.6 r = 20
Copyright © 2017 Brunton & Kutz.
2
10
r = 5 All Rights Reserved. 0.4
0.2
0
10 0
0 500 1000 1500 0 500 1000 1500
k k
Figure 1.4: (a) Singular values k. (b) Cumulative
22
energy in the first k modes.
F
Here, we establish the notation that a truncated SVD basis (and the resultin
Spectral expansion of the operator A ˜
pproximated matrix X̃) will be denoted by X̃ = Ũ⌃Ṽ . Because ⌃ is diagona
⇤
23
-deficient
.3 least
Pseudoinverse squares
Rank-deficient least squares
Rank-de cient least squares: Linear inverse problem
Figure 1: Schematic illustration of SVD in terms of three linear transformations.
A is square and full-rank it has an inverse. Its SVD has a square ⌃ tha
of our other linear algebra tools, SVD provides ye
The inverse of A (if it exists) can be determined easily from the SVD, namely:
esystems.
21 3
linear systems.
s1
6 1 7
The logic is that we can find the inverse mapping by undoing each of the three operations we did
when multiplying A: first, undo the last rotation by multiplying by U > ; second, un-stretch by
⌃ = diag( 1, 2 ,1. . . 1 )
,T nT
multiplying by 1/si along each axis, third, un-rotate by multiplying by V . (See Fig 2).
= b x = V ⌃
Ax 1= b x = V ⌃ U b
Ax U b
⌃ = diag(1/ 1 , 1/ 2 , . . . , 1/ n )
(1/ , 1/ 1 . . . , 1/T
, 1). This 1 may 1 be the1 Tsimplest
A 1
A = (V S 1
U > )(U SV > )
= (U ⌃V ) = (V T
)
test. Note that back substitution takes less arithmetic th
1 2 n ⌃ 1
= ⌃ (U > U )SV >
1
A U V U =VS
= V (S 1
S)V >
lication.
=I
.s process is nice and stable, and it’s very clear exactly whe
6 24
2
fi
rotate stretch rotate
k-deficient
Rank-deficient least squares
least
Rank-de cient least squares: Linearsquares
inverse problem Figure 1: Schematic illustration of SVD in terms of three linear transformations.
tithofmost
our of
other linear algebra tools, SVD provides
•If A is non-square and/or rank de cient, it doesn’t have inverse
The inverse of A (if it exists) can be determined easily from the SVD, namely:
arvesystems.
21 3
linear systems.
s1
6 1 7
1 6 s2 7
S =6 .. 7 (2)
4 . 5
1
sn
The logic is that we can find the inverse mapping by undoing each of the three operations we did
when multiplying A: first, undo the last rotation by multiplying by U > ; second, un-stretch by
multiplying by 1/si along each axis, third, un-rotate by multiplying by V . (See Fig 2).
Ax = b x =
Ax = b x = V ⌃ V⌃ U b
1 1T T
U b
• The inverse of A is singular, but we can multiply three matrices instead which is a numerically stable
roblem!
operation It’s just three matrix multiplications. The inve
It’s just three matrix multiplications. The inver Figure 2: Illustrating the inverse of a matrix in terms of its SVD.
just•However:
diag(1/ 1 , 1/ 2 , . . . , 1/ n ). This may be the simple
Another way to see that this definition of the inverse is correct is via:
plication.
=I
- Zero singular values means this approach will fail
We can do a similar analysis of AA 1.
n. 25 2
fi
fi
s1
6 . ..
clear up7 front if the process will fail: it’s when we divide
6 7
6
Pseudoinverse
6 s
value. 7
7
6 k 7.
S=6
6 0 One 7 of the strengths of the SVD is that it works when th
7
6 7
4 How
. . . would
5 we go about solving a singular system? More s
•Generalize the SVD-basedweinverse:
solve
0 Ax ⇡ b, A square n ⇥ n, rank r < n?
This is no longer a system of equations we can expec
A can then be written similarly to the inverse:
solution,
† since ran(A) ⇢† IR and b† might
n
not be in there. I
<latexit sha1_base64="7xoT9aIDWn2OgrgHLkDoewgkKCE=">AAAB9XicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEWi9C1YvHCvYD2rRsNpt26WYTdjdqCf0fXjwo4tX/4s1/47bNQVsfDDzem2FmnhdzprRtf1u5ldW19Y38ZmFre2d3r7h/0FRRIgltkIhHsu1hRTkTtKGZ5rQdS4pDj9OWN7qZ+q0HKhWLxL0ex9QN8UCwgBGsjdR7Qpfoqpd2fTyYIK9fLNllewa0TJyMlCBDvV/86voRSUIqNOFYqY5jx9pNsdSMcDopdBNFY0xGeEA7hgocUuWms6sn6MQoPgoiaUpoNFN/T6Q4VGoceqYzxHqoFr2p+J/XSXRw4aZMxImmgswXBQlHOkLTCJDPJCWajw3BRDJzKyJDLDHRJqiCCcFZfHmZNM/KTqVcuTsv1a6zOPJwBMdwCg5UoQa3UIcGEJDwDK/wZj1aL9a79TFvzVnZzCH8gfX5AyP2kac=</latexit>
x=A b ⇤
<latexit sha1_base64="EbuIfjSMY5eUNVRwvJDtvUpanI0=">AAACBXicbZC7TsMwFIZPyq2UW4ARBosKialKECosSAUWxiJIW6kNleO4rVXnIttBqqIsLLwKCwMIsfIObLwNbpsBWo5k+dP/nyP7/F7MmVSW9W0UFhaXlleKq6W19Y3NLXN7pyGjRBDqkIhHouVhSTkLqaOY4rQVC4oDj9OmN7wa+80HKiSLwjs1iqkb4H7IeoxgpaWuuX9xn3Z83M/QOWrc5uzoG0uVdc2yVbEmhebBzqEMedW75lfHj0gS0FARjqVs21as3BQLxQinWamTSBpjMsR92tYY4oBKN51skaFDrfioFwl9QoUm6u+JFAdSjgJPdwZYDeSsNxb/89qJ6p25KQvjRNGQTB/qJRypCI0jQT4TlCg+0oCJYPqviAywwETp4Eo6BHt25XloHFfsaqV6c1KuXeZxFGEPDuAIbDiFGlxDHRwg8AjP8ApvxpPxYrwbH9PWgpHP7MKfMj5/AO+2mEA=</latexit>
A = V S Ua ,unique solution. If Ax
† † > A ⇤ =b V S U
is minimum, so is A(x + y) ⇤
6 . 7
6
6
.. doing this
7
7 is a combination of the procedures we used
values that are non-zero, and leaving all zero
for ov
6 1 7
S =6
†
6
s mined systems
7
7 . using QR.
singular
First
values
we
at
expand
zero.
the residual we’re k
0
6
6
4
using
.. the
7
7 SVD of A and then transform it by U T
(which d
. 5
norm 0of the residual):
kAx bk = kU ⌃V x T
bk = k⌃V x
2 T
U T
umber 26
† 1 ⇤
A = V m ⌃ m Um ,
If the operator does not have full rank
where Vm = (v1 , v2 , . . . , vm ), Um = (u1 , u2 , . . . , um ) and ⌃
values.
• Despite the pseudo-inverse of A exists, it can be unstable. Large condition number
Note that the pseudo inverse allows us to define a uniq
stable as kAkkA k = †
1/ k may still be large. To study t
the solution as <latexit sha1_base64="NyTJyM+kQ4Q8kw7ywSWCc2fDIKI=">AAACFHicbVDLSsNAFJ34rPUVdelmsAiCUBIX1WXRhS4r2Ac0JUymk3ToTDLMTEpLzEe48SP8ATcuFHHrwp1/4/Sx0NYDFw7n3Mu99wSCUaUd59taWl5ZXVsvbBQ3t7Z3du29/YZKUolJHScska0AKcJoTOqaakZaQhLEA0aaQf9q7DcHRCqaxHd6JEiHoyimIcVIG8m3T4fQQ0LIZAgh9FTKfQq9UCKcpT4N8sxTNOLIp/nAp75dcsrOBHCRuDNSql7DJ8+/j2q+/eV1E5xyEmvMkFJt1xG6kyGpKWYkL3qpIgLhPopI29AYcaI62eSpHB4bpQvDRJqKNZyovycyxJUa8cB0cqR7at4bi/957VSHF52MxiLVJMbTRWHKoE7gOCHYpZJgzUaGICypuRXiHjKRaJNj0YTgzr+8SBpnZbdSrtyaNC7BFAVwCI7ACXDBOaiCG1ADdYDBA3gGr+DNerRerHfrY9q6ZM1mDsAfWJ8/BASh0A==</latexit>
X ui b
• Writing the solution in components x⇡ vi
i k
i X hui , f i
1 ⇤
e=
u Vk ⌃k Uk f =
we can see that for small singular values the noise components gets ampli ed. i=1 i
: X ! Forward ! R
e.g. parameter
r model parameters models
k⇥d
A 2 R estimation.
to the
data in
A physical
the
: X ! Y isphenomena
absence of that noise
theobservational relate
forward operator, a kno
n.u
Bounded linear operator, typically ill-behaved
operatorAthat maps our model parameters to data in the absence
: X ! Y is a linear forward operator (a mapping ) acof observa
A
<latexit sha1_base64="FVgAUwTikBreAgApENvaUaa0fWI=">AAAB6HicbVDLTgJBEOzFF+IL9ehlIjHxRHaNQY+oF4+QyCOBDZkdemFkdnYzM2tCCF/gxYPGePWTvPk3DrAHBSvppFLVne6uIBFcG9f9dnJr6xubW/ntws7u3v5B8fCoqeNUMWywWMSqHVCNgktsGG4EthOFNAoEtoLR3cxvPaHSPJYPZpygH9GB5CFn1FipftMrltyyOwdZJV5GSpCh1it+dfsxSyOUhgmqdcdzE+NPqDKcCZwWuqnGhLIRHWDHUkkj1P5kfuiUnFmlT8JY2ZKGzNXfExMaaT2OAtsZUTPUy95M/M/rpCa89idcJqlByRaLwlQQE5PZ16TPFTIjxpZQpri9lbAhVZQZm03BhuAtv7xKmhdlr1Ku1C9L1dssjjycwCmcgwdXUIV7qEEDGCA8wyu8OY/Oi/PufCxac042cwx/4Hz+AJZvjNA=</latexit>
+n
<latexit sha1_base64="njoZ2DUOlaEp40/Sn3jSFkYPquQ=">AAAB6nicbVBNS8NAEJ34WetX1aOXxSIIQklEqseiF48V7Qe0oWy2k3bpZhN2N0IJ/QlePCji1V/kzX/jts1BWx8MPN6bYWZekAiujet+Oyura+sbm4Wt4vbO7t5+6eCwqeNUMWywWMSqHVCNgktsGG4EthOFNAoEtoLR7dRvPaHSPJaPZpygH9GB5CFn1Fjp4ZzIXqnsVtwZyDLxclKGHPVe6avbj1kaoTRMUK07npsYP6PKcCZwUuymGhPKRnSAHUsljVD72ezUCTm1Sp+EsbIlDZmpvycyGmk9jgLbGVEz1IveVPzP66QmvPYzLpPUoGTzRWEqiInJ9G/S5wqZEWNLKFPc3krYkCrKjE2naEPwFl9eJs2LiletVO8vy7WbPI4CHMMJnIEHV1CDO6hDAxgM4Ble4c0Rzovz7nzMW1ecfOYI/sD5/AGWno1c</latexit>
=
<latexit sha1_base64="dfa12l/r87/D93uS51ywGerJGEM=">AAAB6HicbVDLSgNBEOyNrxhfUY9eBoPgKeyKRC9C0IvHBMwDkiXMTnqTMbOzy8ysEEK+wIsHRbz6Sd78GyfJHjSxoKGo6qa7K0gE18Z1v53c2vrG5lZ+u7Czu7d/UDw8auo4VQwbLBaxagdUo+ASG4Ybge1EIY0Cga1gdDfzW0+oNI/lgxkn6Ed0IHnIGTVWqt/0iiW37M5BVomXkRJkqPWKX91+zNIIpWGCat3x3MT4E6oMZwKnhW6qMaFsRAfYsVTSCLU/mR86JWdW6ZMwVrakIXP198SERlqPo8B2RtQM9bI3E//zOqkJr/0Jl0lqULLFojAVxMRk9jXpc4XMiLEllClubyVsSBVlxmZTsCF4yy+vkuZF2auUK/XLUvU2iyMPJ3AK5+DBFVThHmrQAAYIz/AKb86j8+K8Ox+L1pyTzRzDHzifP5BfjMw=</latexit>
29
which are simple
The inverse generalisations of the discrete case.
ill see, instances of the model function are made in terms of localproblem,
averages,then, consists of undoing the convolution. Sometimes, the o
this introduction,
generalisations wecase.
of the discrete will focus(filter)
on linear continuous
k may not inverse
be known perfectly problems
(blind of the
deconvolution). form:
Other image-related
Well-posedness In this introduction, we will focus on linear continuous inverse problems of the
problems include denoising, where a noisy version of the image is measured, and inpa f
f = Au + n , u† ⇡ A 1 (f )
f = Au + n , u ⇡ A †
(f )
1. Example: X-ray tomography
1
(10)
†
f = Au + n , u ⇡ A (f ) 1
(10)
where u 2 Rd is the unknown solution we want to find, f 2 Rk is given (our measur
?
1
( )
<latexit sha1_base64="xmBBnrQX2zbVbBK0U83smbUZUYI=">AAAB7XicbVBNSwMxEJ2tX7V+VT16CRbBi2VXSvVY9eKxgv2Adi3ZNNvGZpMlyQpl6X/w4kERr/4fb/4b03YP2vpg4PHeDDPzgpgzbVz328mtrK6tb+Q3C1vbO7t7xf2DppaJIrRBJJeqHWBNORO0YZjhtB0riqOA01Ywupn6rSeqNJPi3oxj6kd4IFjICDZWal49pGfepFcsuWV3BrRMvIyUIEO9V/zq9iVJIioM4VjrjufGxk+xMoxwOil0E01jTEZ4QDuWChxR7aezayfoxCp9FEplSxg0U39PpDjSehwFtjPCZqgXvan4n9dJTHjpp0zEiaGCzBeFCUdGounrqM8UJYaPLcFEMXsrIkOsMDE2oIINwVt8eZk0z8tetVy9q5Rq11kceTiCYzgFDy6gBrdQhwYQeIRneIU3RzovzrvzMW/NOdnMIfyB8/kD6K2Otg==</latexit>
A -n
1
<latexit sha1_base64="xmBBnrQX2zbVbBK0U83smbUZUYI=">AAAB7XicbVBNSwMxEJ2tX7V+VT16CRbBi2VXSvVY9eKxgv2Adi3ZNNvGZpMlyQpl6X/w4kERr/4fb/4b03YP2vpg4PHeDDPzgpgzbVz328mtrK6tb+Q3C1vbO7t7xf2DppaJIrRBJJeqHWBNORO0YZjhtB0riqOA01Ywupn6rSeqNJPi3oxj6kd4IFjICDZWal49pGfepFcsuWV3BrRMvIyUIEO9V/zq9iVJIioM4VjrjufGxk+xMoxwOil0E01jTEZ4QDuWChxR7aezayfoxCp9FEplSxg0U39PpDjSehwFtjPCZqgXvan4n9dJTHjpp0zEiaGCzBeFCUdGounrqM8UJYaPLcFEMXsrIkOsMDE2oIINwVt8eZk0z8tetVy9q5Rq11kceTiCYzgFDy6gBrdQhwYQeIRneIU3RzovzrvzMW/NOdnMIfyB8/kD6K2Otg==</latexit>
31
Solvability and regularization
bk2
x
MxN
min kxk2 Ax = b
<latexit sha1_base64="goLaFoIk3/OtfLoR2ZaRQtDzwJQ=">AAAB9XicbVBNT8JAEJ3iF+IX6tHLRmLiibTEoEeiF4+YyEdCa7NdtrBhu212twoB/ocXDxrj1f/izX/jAj0o+JJJXt6bycy8IOFMadv+tnJr6xubW/ntws7u3v5B8fCoqeJUEtogMY9lO8CKciZoQzPNaTuRFEcBp61gcDPzW49UKhaLez1KqBfhnmAhI1gb6cGNmPCHyJ0M3Ylf8Yslu2zPgVaJk5ESZKj7xS+3G5M0okITjpXqOHaivTGWmhFOpwU3VTTBZIB7tGOowBFV3nh+9RSdGaWLwliaEhrN1d8TYxwpNYoC0xlh3VfL3kz8z+ukOrzyxkwkqaaCLBaFKUc6RrMIUJdJSjQfGYKJZOZWRPpYYqJNUAUTgrP88ippVspOtVy9uyjVrrM48nACp3AODlxCDW6hDg0gIOEZXuHNerJerHfrY9Gas7KZY/gD6/MHRV6SYQ==</latexit>
<latexit sha1_base64="DqHz5KaE3QRpMGd31GWdDDDnlUQ=">AAAB7HicbVBNSwMxEJ3Ur1q/qh69BIvgqeyKVC9C1YvHCm5baJeSTbNtaDa7JFmxLP0NXjwo4tUf5M1/Y9ruQVsfDDzem2FmXpAIro3jfKPCyura+kZxs7S1vbO7V94/aOo4VZR5NBaxagdEM8El8ww3grUTxUgUCNYKRrdTv/XIlOaxfDDjhPkRGUgeckqMlbzrJ3wV9MoVp+rMgJeJm5MK5Gj0yl/dfkzTiElDBdG64zqJ8TOiDKeCTUrdVLOE0BEZsI6lkkRM+9ns2Ak+sUofh7GyJQ2eqb8nMhJpPY4C2xkRM9SL3lT8z+ukJrz0My6T1DBJ54vCVGAT4+nnuM8Vo0aMLSFUcXsrpkOiCDU2n5INwV18eZk0z6purVq7P6/Ub/I4inAEx3AKLlxAHe6gAR5Q4PAMr/CGJHpB7+hj3lpA+cwh/AH6/AEEfY4v</latexit>
subject to
x
32
Solvability and regularization
bk2
x
MxN
min kxk2 Ax = b
<latexit sha1_base64="goLaFoIk3/OtfLoR2ZaRQtDzwJQ=">AAAB9XicbVBNT8JAEJ3iF+IX6tHLRmLiibTEoEeiF4+YyEdCa7NdtrBhu212twoB/ocXDxrj1f/izX/jAj0o+JJJXt6bycy8IOFMadv+tnJr6xubW/ntws7u3v5B8fCoqeJUEtogMY9lO8CKciZoQzPNaTuRFEcBp61gcDPzW49UKhaLez1KqBfhnmAhI1gb6cGNmPCHyJ0M3Ylf8Yslu2zPgVaJk5ESZKj7xS+3G5M0okITjpXqOHaivTGWmhFOpwU3VTTBZIB7tGOowBFV3nh+9RSdGaWLwliaEhrN1d8TYxwpNYoC0xlh3VfL3kz8z+ukOrzyxkwkqaaCLBaFKUc6RrMIUJdJSjQfGYKJZOZWRPpYYqJNUAUTgrP88ippVspOtVy9uyjVrrM48nACp3AODlxCDW6hDg0gIOEZXuHNerJerHfrY9Gas7KZY/gD6/MHRV6SYQ==</latexit>
<latexit sha1_base64="DqHz5KaE3QRpMGd31GWdDDDnlUQ=">AAAB7HicbVBNSwMxEJ3Ur1q/qh69BIvgqeyKVC9C1YvHCm5baJeSTbNtaDa7JFmxLP0NXjwo4tUf5M1/Y9ruQVsfDDzem2FmXpAIro3jfKPCyura+kZxs7S1vbO7V94/aOo4VZR5NBaxagdEM8El8ww3grUTxUgUCNYKRrdTv/XIlOaxfDDjhPkRGUgeckqMlbzrJ3wV9MoVp+rMgJeJm5MK5Gj0yl/dfkzTiElDBdG64zqJ8TOiDKeCTUrdVLOE0BEZsI6lkkRM+9ns2Ak+sUofh7GyJQ2eqb8nMhJpPY4C2xkRM9SL3lT8z+ukJrz0My6T1DBJ54vCVGAT4+nnuM8Vo0aMLSFUcXsrpkOiCDU2n5INwV18eZk0z6purVq7P6/Ub/I4inAEx3AKLlxAHe6gAR5Q4PAMr/CGJHpB7+hj3lpA+cwh/AH6/AEEfY4v</latexit>
subject to
x
f = Au + ✏
This expression can be written as:
19 where ✏ is Gaussian distributed withGaussian
zero mean
✓ ◆
and variance I. Assuming ui
min
u
log Ppost (u|f )
distribution 2 ⇤
! µpost 1= ⌃post 1 Af !
mally
1 distributed with zero mean and unit
P (X =variance
u|µ, ⌃) = p
d
(2⇡) k⌃k
exp
2
(u µ)T ⌃ 1 (u µ)
T 1
Ppost (u|f ) = exp (u µpost ) ⌃ (u µpost )
2 and the variance: d problem dimension !
1 1
Ppost (u|fHence,
) =weexpwill find thatkAU k
f problem
our imaging kuk
has no unique solution, and If
Where the mean is given by: 2 2 2
it does not depend on the data in a stable way, e.g. small errors◆
✓ in the
1 meas
get heavily amplified, producing useless solutions.1 We⇤are in a situation where
⌃post = A A+I
✓ ◆ to understand indirect measurements (from, e.g. our sensor or detector) and
2 ⇤ 19
µpost = ⌃post ANotice
f that the MAP estimate is given19 by:
and the variance:
2 2 2
✓ ◆ min kAu fk + kuk
1 u
1 ⇤
⌃post = A A +Which
I coincides with the solution of the Tikhonov least-sq
35
Examples of ill-possed inverse problems
36
P P 1
6 N x i y i
7
6P P 2 P 7
= 6 Deconvolution
xi xi xi yi 7 (29)
4P P P 2 5
yi xi yi yi
• y lacks the high-frequency content of x, and H is the convolution by a blurring kernel.
min kGm 2
dk2 (30)
m Used to improve the contrast and sharpness of images
Deconvolution lter
y =H⇤x+✏ (31)
H point spread function
10
.wikipedia.org/
Deconvolution lter
37
fi
fi
yi xi yi yi
10
Noisy
* =
Reconstructed image
38
P P P 2
yi xi yi yi
Inpainting
2
min kGm dk2
m
y =H⇤x+✏
10
• Not enough information to reconstruct the image
Video
Staring:
Prof. Carola-Bibiane Schöenlieb &
Prof. Samuli Siltanen
https://scikit-image.org
39