Image Differentiation
COMPSCI 527 — Computer Vision
COMPSCI 527 — Computer Vision Image Differentiation 1 / 16HW2o
HW2o Image Differentiation COMPSCI 527 Computer Vision COMPSCI - - PowerPoint PPT Presentation
HW2o Image Differentiation COMPSCI 527 Computer Vision COMPSCI 527 Computer Vision Image Differentiation 1 / 16 Outline 1 The Meaning of Image Differentiation 2 A Conceptual Pipeline 3 Implementation 4 The Derivatives of a 2D Gaussian
Image Differentiation
COMPSCI 527 — Computer Vision
COMPSCI 527 — Computer Vision Image Differentiation 1 / 16HW2o
Outline
1 The Meaning of Image Differentiation 2 A Conceptual Pipeline 3 Implementation 4 The Derivatives of a 2D Gaussian 5 The Image Gradient
COMPSCI 527 — Computer Vision Image Differentiation 2 / 16What Does Differentiating an Image Mean?
Values Derivatives in x
100 200 300 400 500 600 700 100 200 300 400 500 600 700 100 200 300 400 500 600 700 100 200 300 400 500 600 700 COMPSCI 527 — Computer Vision Image Differentiation 3 / 16What Does Differentiating an Image Mean?
100 200 300 400 500 600 700Can we reconstruct the black curve?
COMPSCI 527 — Computer Vision Image Differentiation 4 / 16Cameras
principal ray lens image plane 1 2 3 camera aperture in-focus planeKass
eyeIR
1
Can I
recover CK
y
Ccny from I rt
rig
A Conceptual Pipeline
I(r, c) C(x, y) D(x, y) Ic(r, c) i
∂ ∂x
from the discrete image array I
I
r c
From Discrete Array to Sensor Irradiance
I(r, c) C(x, y) D(x, y) Ic(r, c) i
∂ ∂x
What would the transformation from I to C look like formally, if we could find one? Example: Linear interpolation
COMPSCI 527 — Computer Vision Image Differentiation 7 / 16faint.EE
EIen
PG
dCj
I
FCK
c
C x
Icj P
x j INTERPOLATION
11.44
TER
7 T
l
sina.ci 9
Linear Interpolation as a Hybrid Convolution
C(x, y) = P∞
i=−∞
P∞
j=−∞ I(i, j)P(x j, y i)
COMPSCI 527 — Computer Vision Image Differentiation 8 / 16in 2B
Gaussian Instead of Triangle
L
C agg I Ci j G
x j y
i
Differentiating
I(r, c) C(x, y) D(x, y) Ic(r, c) i
∂ ∂x
C(x, y) = P∞
i=−∞
P∞
j=−∞ I(i, j)G(x j, y i)
(still don’t know how to do this, just plow ahead) D(x, y) = ∂C
∂x (x, y) = ∂ ∂x
P∞
i=−∞
P∞
j=−∞ I(i, j)G(x j, y i)
D(x, y) = P∞
i=−∞
P∞
j=−∞ I(i, j)Gx(x j, y i)
and we know how to do that! (still don’t know how to implement a hybrid convolution)
COMPSCI 527 — Computer Vision Image Differentiation 10 / 16Sampling
I(r, c) C(x, y) D(x, y) Ic(r, c) i
∂ ∂x
D(x, y) = P∞
i=−∞
P∞
j=−∞ I(i, j)Gx(x j, y i)
grid: x ! c and y ! r Ic(r, c) = P∞
i=−∞
P∞
j=−∞ I(i, j)Gx(c j, r i)
Wait! This is a standard, discrete convolution We know how to do that! To differentiate an image array, convolve it (discretely) with the (sampled, truncated) derivative of a Gaussian
COMPSCI 527 — Computer Vision Image Differentiation 11 / 16The Derivatives of a 2D Gaussian
G(x, y) / e− 1
2 x2+y2 σ2= g(x) g(y) where g(x) = e− 1
2 x2 σ2Gx(x, y) = ∂G
∂x = ∂g ∂x g(y) = d(x)g(y)
d(x) = dg
dx = x σ2g(x)
00
genes
The Derivatives of a 2D Gaussian
Gx(x, y) = d(x)g(y) and Gy(x, y) = g(x)d(y)
COMPSCI 527 — Computer Vision Image Differentiation 13 / 16by
Normalization
u(r, c) = c is a ramp
The Image Gradient
∂x = g(r, c) =
Ix(r, c) Iy(r, c)
118111
a
It
Is
I
l
I
te
The Image Gradient