Realistic Image Synthesis SS2018
Probability: Theory and practice
Philipp Slusallek Karol Myszkowski Gurprit Singh
- 1
Probability: Theory and practice Philipp Slusallek Karol - - PowerPoint PPT Presentation
Probability: Theory and practice Philipp Slusallek Karol Myszkowski Gurprit Singh 1 Realistic Image Synthesis SS2018 Administrative updates Please register for the exams (in HISPOS for Computer Science). Withdrawal deadline is
Realistic Image Synthesis SS2018
Philipp Slusallek Karol Myszkowski Gurprit Singh
Realistic Image Synthesis SS2018
2
Realistic Image Synthesis SS2018
3
σ-
Realistic Image Synthesis SS2018
3
σ-
Realistic Image Synthesis SS2018
3
σ-
Realistic Image Synthesis SS2018
3
σ-
Realistic Image Synthesis SS2018
3
σ-
Realistic Image Synthesis SS2018
4
Realistic Image Synthesis SS2018 5
Scene designed by David Coeurjolly
Image Plane
Realistic Image Synthesis SS2018 6
Image Plane Scene designed by David Coeurjolly
Realistic Image Synthesis SS2018 7
4 spp
Image rendered using PBRT
Realistic Image Synthesis SS2018 8
256 spp
Image rendered using PBRT
Realistic Image Synthesis SS2018 9
4096 spp
Image rendered using PBRT
Realistic Image Synthesis SS2018 10
Realistic Image Synthesis SS2018 11
Realistic Image Synthesis SS2018 12
Realistic Image Synthesis SS2018 13
Realistic Image Synthesis SS2018 14
4 spp
Image rendered using PBRT
Realistic Image Synthesis SS2018
15
Realistic Image Synthesis SS2018
16
Realistic Image Synthesis SS2018
17
Realistic Image Synthesis SS2018
18
Realistic Image Synthesis SS2018
19
Ω = {1, 2, 3, 4, 5, 6}
{2, 3, 5}
Realistic Image Synthesis SS2018
19
Ω = {1, 2, 3, 4, 5, 6}
{2, 3, 5}
Realistic Image Synthesis SS2018
19
Ω = {1, 2, 3, 4, 5, 6}
{2, 3, 5}
Realistic Image Synthesis SS2018
20
Ω = {1, 2, 3, 4, 5, 6}
Ω Ω
Realistic Image Synthesis SS2018
20
Ω = {1, 2, 3, 4, 5, 6}
A probability assigns each element or each subset of a positive real value
Ω Ω
Realistic Image Synthesis SS2018
20
Ω = {1, 2, 3, 4, 5, 6}
A probability assigns each element or each subset of a positive real value
Ω Ω
The first requirement leads to the concept of -algebra
σ
Realistic Image Synthesis SS2018
20
Ω = {1, 2, 3, 4, 5, 6}
A probability assigns each element or each subset of a positive real value
Ω Ω
The first requirement leads to the concept of -algebra
σ
The second to the mathematical construct of a measure
Realistic Image Synthesis SS2018
21
1
Ω
Realistic Image Synthesis SS2018
21
1
Ω
Realistic Image Synthesis SS2018
21
1
Ω
Realistic Image Synthesis SS2018
21
1
Ω
Realistic Image Synthesis SS2018
21
1
Ω
Realistic Image Synthesis SS2018
22
Ω Ω Ω
1
Realistic Image Synthesis SS2018
22
Ω Ω Ω
1
Realistic Image Synthesis SS2018
22
Ω Ω
The first requirement leads to the concept of Borel -algebra
σ Ω
1
Realistic Image Synthesis SS2018
22
Ω Ω
The first requirement leads to the concept of Borel -algebra
σ
The second to the mathematical construct of a Lebesgue measure
Ω
1
Realistic Image Synthesis SS2018
23
Ω
Realistic Image Synthesis SS2018
23
Ω
Realistic Image Synthesis SS2018
23
Ω
Realistic Image Synthesis SS2018
23
theoretical operations of: countable unions, countable intersections, and complement
Ω
Realistic Image Synthesis SS2018
24
Realistic Image Synthesis SS2018
24
subsets)
Realistic Image Synthesis SS2018
25
subsets)
Σ = {{φ}, {0}, {1}, {0, 1}} Ω = {0, 1}
Realistic Image Synthesis SS2018
26
subsets)
Ω = {a, b, c, d} Σ = {{φ}, {0}, {1}, {0, 1}} Ω = {0, 1} Σ = {{φ}, {a, b}, {c, d}, {a, b, c, d}}
Realistic Image Synthesis SS2018
27
Realistic Image Synthesis SS2018
27
countable intersections, and complement of open sets
Realistic Image Synthesis SS2018
28
countable intersections, and complement of open sets
I = [p, q), p, q ∈ R
Fixed half-interval
Realistic Image Synthesis SS2018
29
countable intersections, and complement of open sets
I = [p, q), p, q ∈ R T = [α, β) ⊆ [p, q)
Fixed half-interval Collection of all half-intervals
Realistic Image Synthesis SS2018
30
countable intersections, and complement of open sets
I = [p, q), p, q ∈ R T = [α, β) ⊆ [p, q)
Fixed half-interval Collection of all half-intervals
Here, is not a -algebra because, generally speaking, neither the union nor the difference of two half-intervals is a half-interval.
T σ
Realistic Image Synthesis SS2018
31
It is the mathematical construct that allows defining a measure
Realistic Image Synthesis SS2018
32
Realistic Image Synthesis SS2018
32
subset of a sigma-algebra a non-negative real number.
Realistic Image Synthesis SS2018
32
subset of a sigma-algebra a non-negative real number.
sets is equal to the sum of the measures of the individual sets
Realistic Image Synthesis SS2018
33
Euclidean space.
Realistic Image Synthesis SS2018
33
Euclidean space.
volume, respectively.
Length Area Volume
Realistic Image Synthesis SS2018
34
σ
Realistic Image Synthesis SS2018
34
σ
Realistic Image Synthesis SS2018
34
assigns each element to a real number
σ
Realistic Image Synthesis SS2018
35
X f X Y = f(X)
Realistic Image Synthesis SS2018
35
set of probabilities) or continuous (e.g., real numbers)
X f X Y = f(X)
Realistic Image Synthesis SS2018
35
set of probabilities) or continuous (e.g., real numbers)
variable
X f X Y = f(X)
Realistic Image Synthesis SS2018
36
Realistic Image Synthesis SS2018
37
{p1, p2, . . . , pn}
N
X
i=1
pi = 1
X : Ω → E Ω = {x1, x2, . . . , xn}
Realistic Image Synthesis SS2018
38
x1 = 1, x2 = 2, x3 = 3, x4 = 4, x5 = 5, x6 = 6
Realistic Image Synthesis SS2018
38
x1 = 1, x2 = 2, x3 = 3, x4 = 4, x5 = 5, x6 = 6 P(X = i) = 1 6
Realistic Image Synthesis SS2018
39
P(2 ≤ X ≤ 4) =
4
X
i=2
P(X = i)
Realistic Image Synthesis SS2018
39
P(2 ≤ X ≤ 4) =
4
X
i=2
P(X = i) =
4
X
i=2
1 6 = 1 2
Realistic Image Synthesis SS2018
RV is exactly equal to some value.
40
Realistic Image Synthesis SS2018
RV is exactly equal to some value.
which is for continuous RVs.
40
Realistic Image Synthesis SS2018
41
1 6 1 6 1 6 1 6 1 6 1 6
0.4 0.15 0.3 0.05 0.1
Constant PMF Non-uniform PMF
Realistic Image Synthesis SS2018
42
Realistic Image Synthesis SS2018
43
random variables
ξ
Realistic Image Synthesis SS2018
43
random variables
domains (e.g. real numbers or directions on the unit sphere)
ξ
Realistic Image Synthesis SS2018
43
random variables
domains (e.g. real numbers or directions on the unit sphere)
variable, which we write as ξ
Realistic Image Synthesis SS2018
44
1
ξ ∈ [0, 1)
Realistic Image Synthesis SS2018
44
1
ξ ∈ [0, 1)
Realistic Image Synthesis SS2018 45
and map to a discrete random variable, choosing if:
ξ ∈ [0, 1) Xi
1
Realistic Image Synthesis SS2018 46
and map to a discrete random variable, choosing if:
ξ ∈ [0, 1) Xi
i−1
X
j=1
pj < ξ ≤
i
X
j=1
pj
Xi = {1, 2, 3, 4, 5, 6}
1
Realistic Image Synthesis SS2018
Image rendered using PBRT
Realistic Image Synthesis SS2018
Image rendered using PBRT
Realistic Image Synthesis SS2018
Image rendered using PBRT
Realistic Image Synthesis SS2018
pi = Φi P
j Φj
Φi
illumination from each light source in the scene based on its power Here, the probability is relative to the total power
49
Realistic Image Synthesis SS2018
50
Realistic Image Synthesis SS2018
the probability of taking on any particular value is proportional to the value
2
[0, 2) x 2 − x
51
x
Realistic Image Synthesis SS2018
the probability of taking on any particular value is proportional to the value
2
[0, 2) x 2 − x
it is to take around 1, and so forth.
51
x
Realistic Image Synthesis SS2018
the relative probability of a RV taking on a particular value.
52
Realistic Image Synthesis SS2018
the relative probability of a RV taking on a particular value.
, the values of the PDFs are not the probabilities as such: a PDF must be integrated over an interval to yield a probability
52
Realistic Image Synthesis SS2018 53
p(x) = ( 1 x ∈ [0, 1)
For uniform random variables: For non-uniform random variables:
p(x) could be any function
Realistic Image Synthesis SS2018 54
constant pdf
Uniform distribution Non-uniform distribution
Realistic Image Synthesis SS2018 54
constant pdf
Uniform distribution Non-uniform distribution
Realistic Image Synthesis SS2018 55
constant pdf
Uniform distribution Non-uniform distribution
Realistic Image Synthesis SS2018 55
constant pdf
Uniform distribution Non-uniform distribution
Realistic Image Synthesis SS2018 56
p(x) > 0
Z ∞
−∞
p(x)dx = 1
Some properties of PDFs:
Realistic Image Synthesis SS2018 57
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
Realistic Image Synthesis SS2018 58
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
p(x) = C C
Realistic Image Synthesis SS2018 58
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
Z b
a
C dx = 1
p(x) = C C
Realistic Image Synthesis SS2018 58
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
Z b
a
C dx = 1
C Z b
a
dx = 1 p(x) = C C
Realistic Image Synthesis SS2018 58
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
Z b
a
C dx = 1
C Z b
a
dx = 1 C(b − a) = 1 p(x) = C C
Realistic Image Synthesis SS2018 58
Z b
a
p(x)dx = 1 x ∈ [a, b)
constant pdf
b a
Z b
a
C dx = 1
C Z b
a
dx = 1 C(b − a) = 1 p(x) = C C C = 1 b − a
Realistic Image Synthesis SS2018 59
x ∈ [a, b)
constant pdf
b a
Z b
a
p(x)dx = 1
Z b
a
C dx = 1
C Z b
a
dx = 1 C(b − a) = 1 p(x) = 1 b − a p(x) = C C
C = 1 b − a
Realistic Image Synthesis SS2018 60
p(x)
Realistic Image Synthesis SS2018 61
p(x) p(x) = dP(x) dx
: cumulative distribution function (CDF) , also called cumulative density function
P(x)
Realistic Image Synthesis SS2018 62
p(x) p(x) = dP(x) dx P(x) P(x) = Z x
−∞
p(x)dx
: cumulative distribution function (CDF) , also called cumulative density function
Realistic Image Synthesis SS2018 63
1
P(x) = Z x
−∞
p(x)dx p(x) = ( 1 x ∈ [0, 1)
constant pdf
Realistic Image Synthesis SS2018 63
1
P(x) = Z x
−∞
p(x)dx p(x) = ( 1 x ∈ [0, 1)
constant pdf
Realistic Image Synthesis SS2018 64
Non-constant pdf
1
p(x) P(x) = Z x
−∞
p(x)dx
Realistic Image Synthesis SS2018 64
Non-constant pdf
1
p(x) P(x) = Z x
−∞
p(x)dx
Realistic Image Synthesis SS2018
65
Image rendered using PBRT
Realistic Image Synthesis SS2018
65
Image rendered using PBRT
Realistic Image Synthesis SS2018 66
P(x ∈ [a, b]) = Z b
a
p(x)dx
the probability that a RV lies inside that interval:
[a, b] p(x)
a b
Realistic Image Synthesis SS2018 66
P(x ∈ [a, b]) = Z b
a
p(x)dx
the probability that a RV lies inside that interval:
[a, b] p(x)
a b
Realistic Image Synthesis SS2018
67
Realistic Image Synthesis SS2018
68
Random 2D
1 1
Jittered 2D
1 1
Realistic Image Synthesis SS2018
68
Random 2D
1 1
Jittered 2D
1 1
Realistic Image Synthesis SS2018
68
Random 2D
1 1
Jittered 2D
1 1
Realistic Image Synthesis SS2018 69
Sampling a unit domain with uniform random samples
1
ξ ∈ [0, 1)
Random 1D
Realistic Image Synthesis SS2018 69
Sampling a unit domain with uniform random samples
1
ξ ∈ [0, 1)
Random 1D
Realistic Image Synthesis SS2018 70
Sampling a unit domain with uniform random samples
Random 1D
1
ξ ∈ [0, 1)
Random 1D
Realistic Image Synthesis SS2018 71
Sampling a unit domain with uniform random samples
p(x) = ( C x ∈ [0, 1)
1
ξ ∈ [0, 1)
Random 1D
Realistic Image Synthesis SS2018 72
Sampling each stratum with uniform random samples
1
Jittered 1D
Realistic Image Synthesis SS2018 72
Sampling each stratum with uniform random samples
1
Jittered 1D
Realistic Image Synthesis SS2018 73
Sampling each stratum with uniform random samples
1
Jittered 1D
∆ = 1 N
∆
Realistic Image Synthesis SS2018 73
Sampling each stratum with uniform random samples
1
Jittered 1D
∆ = 1 N
∆
Realistic Image Synthesis SS2018 74
Sampling each stratum with uniform random samples
1
Jittered 1D
∆ = 1 N
∆
i
p(xi) = ???
Probability density of generating a sample in an -th stratum is given by:
i
Realistic Image Synthesis SS2018 75
1
Jittered 1D
∆ = 1 N
∆
Probability density of generating a sample in an -th stratum is given by:
i i
Sampling each stratum with uniform random samples
p(xi) = ( N x ∈ [ i
N , i+1 N )
Realistic Image Synthesis SS2018 76
1
Jittered 1D
∆ = 1 N
∆
i
First, we divide the domain into equal strata.
Realistic Image Synthesis SS2018 76
1
Jittered 1D
∆ = 1 N
∆
i
First, we divide the domain into equal strata. Second, we sample the domain.
Realistic Image Synthesis SS2018 76
1
Jittered 1D
∆ = 1 N
∆
i
First, we divide the domain into equal strata. Second, we sample the domain. This implies that two samples are correlated to each other.
Realistic Image Synthesis SS2018 77
1
Jittered 1D
∆ = 1 N
∆
i
p(xi, xj) = ???
what is the joint PDF for jittered sampling ?
i j
For two different strata and
,
First, we divide the domain into equal strata. Second, we sample the domain. This implies that two samples are correlated to each other.
Realistic Image Synthesis SS2018
78
Realistic Image Synthesis SS2018
For two random variables and , the joint PDF is given by:
79
X1 X2 p(x1, x2)
Realistic Image Synthesis SS2018
For two random variables and , the joint PDF is given by:
80
X1 X2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)
Realistic Image Synthesis SS2018
For two random variables and , the joint PDF is given by:
81
X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)
where,
p(x2|x1) p(x1)
: conditional density function : marginal density function
Realistic Image Synthesis SS2018
For two random variables and , the joint PDF is given by:
82
X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x2|x1)p(x1)
where,
p(x2|x1) p(x1)
: conditional density function : marginal density function
Realistic Image Synthesis SS2018
For two random variables and , the joint PDF is given by:
83
X1 X2 X1 = x1 X2 = x2 p(x1, x2) p(x1, x2) = p(x1|x2)p(x2)
where,
p(x1|x2) p(x2)
: conditional density function : marginal density function
Realistic Image Synthesis SS2018
84
p(x1) = Z
R
p(x1, x2)dx2 p(x2) = Z
R
p(x1, x2)dx1
We integrate out one of the variable.
Realistic Image Synthesis SS2018
85
p(x1|x2) = p(x1, x2) p(x2) p(x2|x1) = p(x1, x2) p(x1)
The conditional density function is the density function for given that some particular has been chosen.
xi xj
Realistic Image Synthesis SS2018
86
If both and are independent then:
p(x1|x2) = p(x1) p(x2|x1) = p(x2) x1 x2
Realistic Image Synthesis SS2018
87
If both and are independent then:
p(x1|x2) = p(x1) p(x2|x1) = p(x2) x1 x2 p(x1, x2) = p(x1)p(x2)
That gives:
Realistic Image Synthesis SS2018 88
1
p(xi, xj) = ???
what is the joint PDF for jittered sampling ?
i j
For two different strata and
,
i
j
Realistic Image Synthesis SS2018 89
1
p(x1, x2) = p(x1|x2)p(x2) i
j
Realistic Image Synthesis SS2018 90
1
p(x1, x2) = p(x1|x2)p(x2) p(x1, x2) = p(x1)p(x2) i
j
Realistic Image Synthesis SS2018 91
1
p(xi, xj) = ( p(xi)p(xj) i 6= j
i
j
Realistic Image Synthesis SS2018 92
1
p(xi, xj) = ( p(xi)p(xj) i 6= j
p(xi, xj) = ( N 2 i 6= j
p(xi) = N
Since,
i
j
Realistic Image Synthesis SS2018 93
Image rendered using PBRT
Realistic Image Synthesis SS2018 93
Image rendered using PBRT
Realistic Image Synthesis SS2018
94
Realistic Image Synthesis SS2018
95
E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5
E[X] =
N
X
i=1
xipi
Realistic Image Synthesis SS2018
96
E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5
E[X] =
N
X
i=1
xipi
Realistic Image Synthesis SS2018
97
E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]
Realistic Image Synthesis SS2018
98
E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]
Realistic Image Synthesis SS2018
99
E[X + Y ] = E[X] + E[Y ] E[X + c] = E[X] + c E[cX] = cE[X]
Realistic Image Synthesis SS2018
100
Realistic Image Synthesis SS2018
100
Realistic Image Synthesis SS2018
100
Realistic Image Synthesis SS2018
100
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
100
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
100
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
100
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
101
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
102
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
103
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
104
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
105
E[X] ≈ 1 N
N
X
i=1
xi
Realistic Image Synthesis SS2018
estimate and the expected value is statistically zero
106
Realistic Image Synthesis SS2018
107
Realistic Image Synthesis SS2018
108
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
109
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
110
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
111
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
112
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
113
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
Realistic Image Synthesis SS2018
113
σ2[X] = E[(X − E[X])2] = E[X2 + E[X]2 − 2XE[X]] = E[X2] + E[E[X]2] − 2E[X]E[E[X]]] = E[X2] + E[X]2 − 2E[X]2 = E[X2] − E[X]2
σ2[X] = E[X2] − E[X]2
Realistic Image Synthesis SS2018
114
σ2[X] = . . . = 2.917
E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5
Realistic Image Synthesis SS2018
114
σ2[X] = . . . = 2.917
σ2[X] = E[X2] − E[X]2 E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5
Realistic Image Synthesis SS2018
115
σ2[X] = . . . = 2.917
σ2[X] = E[X2] − E[X]2 E[X] = 1 · 1 6 + 2 · 1 6 + 3 · 1 6 + 4 · 1 6 + 5 · 1 6 + 6 · 1 6 = 3.5
Realistic Image Synthesis SS2018
116
σ2[X] = . . . = 2.917
σ2[X] = E[X2] − E[X]2
Realistic Image Synthesis SS2018
117
D
Slide after Wojciech Jarosz
Realistic Image Synthesis SS2018
117
D
Slide after Wojciech Jarosz
Realistic Image Synthesis SS2018
117
D
Slide after Wojciech Jarosz
Image rendered using PBRT