HW2o Image Differentiation COMPSCI 527 Computer Vision COMPSCI - - PowerPoint PPT Presentation

hw2o
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Image Differentiation

COMPSCI 527 — Computer Vision

COMPSCI 527 — Computer Vision Image Differentiation 1 / 16

HW2o

slide-2
SLIDE 2

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 / 16
slide-3
SLIDE 3 The Meaning of Image Differentiation

What 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 / 16
slide-4
SLIDE 4 The Meaning of Image Differentiation

What Does Differentiating an Image Mean?

100 200 300 400 500 600 700

Can we reconstruct the black curve?

COMPSCI 527 — Computer Vision Image Differentiation 4 / 16

c

is

slide-5
SLIDE 5 The Meaning of Image Differentiation

Cameras

principal ray lens image plane 1 2 3 camera aperture in-focus plane
  • ptical axis
focal distance COMPSCI 527 — Computer Vision Image Differentiation 5 / 16

f

Kass

eyeIR

1

Can I

recover CK

y

Ccny from I rt

if

I

rig

slide-6
SLIDE 6 A Conceptual Pipeline

A Conceptual Pipeline

I(r, c) C(x, y) D(x, y) Ic(r, c) i

∂ ∂x

  • Somehow reconstruct the continuous sensor irradiance C

from the discrete image array I

  • Differentiate C to obtain D
  • Sample the derivatives D back to the pixel grid
  • Each would be hard to implement
  • Surprisingly, the cascade turns out to be easy!
COMPSCI 527 — Computer Vision Image Differentiation 6 / 16

I

r c

000

O

slide-7
SLIDE 7 A Conceptual Pipeline

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 / 16

faint.EE

EIen

PG

dCj

I

FCK

c

C x

Icj P

x j INTERPOLATION

11.44

TER

t.IE

QIE7xmei f

tn

7 T

l

sina.ci 9

slide-8
SLIDE 8 A Conceptual Pipeline

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 / 16

in 2B

slide-9
SLIDE 9 A Conceptual Pipeline

Gaussian Instead of Triangle

  • Noise ): fit rather than interpolating
  • Noise ): filter with a truncated Gaussian
  • P(x, y) = G(x, y) / e− 1
2 x2+y2 σ2 COMPSCI 527 — Computer Vision Image Differentiation 9 / 16

L

A

C agg I Ci j G

x j y

i

slide-10
SLIDE 10 Implementation

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)

  • We transferred the differentiation to G,

and we know how to do that! (still don’t know how to implement a hybrid convolution)

COMPSCI 527 — Computer Vision Image Differentiation 10 / 16
slide-11
SLIDE 11 Implementation

Sampling

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)

  • We are interested in the values of D(x, y) on the integer

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 / 16

NOT

slide-12
SLIDE 12 The Derivatives of a 2D Gaussian

The Derivatives of a 2D Gaussian

  • The Gaussian function is separable:

G(x, y) / e− 1

2 x2+y2 σ2

= g(x) g(y) where g(x) = e− 1

2 x2 σ2

Gx(x, y) = ∂G

∂x = ∂g ∂x g(y) = d(x)g(y)

d(x) = dg

dx = x σ2g(x)

  • Similarly, Gy(x, y) = g(x)d(y)
  • Differentiate (smoothly) in one direction, smooth in the other
  • Gx(x, y) and Gy(x, y) are separable as well
COMPSCI 527 — Computer Vision Image Differentiation 12 / 16

00

genes

slide-13
SLIDE 13 The Derivatives of a 2D Gaussian

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 / 16

by

slide-14
SLIDE 14 The Derivatives of a 2D Gaussian

Normalization

  • Can normalize d(c) and g(r) separately
  • For smoothing, constants should not change:
  • We want k ⇤ g = k (we saw this before)
  • For differentiation, a unit ramp should not change:

u(r, c) = c is a ramp

  • We want u ⇤ d = u (see notes for math)
COMPSCI 527 — Computer Vision Image Differentiation 14 / 16
slide-15
SLIDE 15 The Image Gradient

The Image Gradient

  • Image gradient: rI(r, c) = ∂I

∂x = g(r, c) =

 Ix(r, c) Iy(r, c)

  • View 1: Two scalar images Ix(r, c), Iy(r, c)
COMPSCI 527 — Computer Vision Image Differentiation 15 / 16

118111

a

It

Is

I

l

I

te

slide-16
SLIDE 16 The Image Gradient

The Image Gradient

  • View 2: One vector image g(r, c)
  • We can now measure changes of image brightness
  • Edges are of particular interest
COMPSCI 527 — Computer Vision Image Differentiation 16 / 16