Convolu'on NEU 466M Instructor: Professor Ila R. Fiete Spring 2016 - - PowerPoint PPT Presentation

convolu on
SMART_READER_LITE
LIVE PREVIEW

Convolu'on NEU 466M Instructor: Professor Ila R. Fiete Spring 2016 - - PowerPoint PPT Presentation

Convolu'on NEU 466M Instructor: Professor Ila R. Fiete Spring 2016 Convolu'on g: a 'me-varying signal { g t 1 , g t , g t +1 } sampled at discrete intervals h: another 'me-varying signal, { h t 1 , h t , h t


slide-1
SLIDE 1

Convolu'on

NEU 466M Instructor: Professor Ila R. Fiete Spring 2016

slide-2
SLIDE 2

Convolu'on

g: a 'me-varying signal sampled at discrete intervals h: another 'me-varying signal, not necessarily of same length

{· · · gt−1, gt, gt+1 · · · }

{· · · ht−1, ht, ht+1 · · · }

(g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

Finite-length g, h: g*h has length N+M-1, where N=length(g), M=length(h).

slide-3
SLIDE 3

Proper'es of convolu'on

  • Commuta've/symmetric (unlike cross-

correla'on):

  • Associa've:
  • Distribu've:

(g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

g ∗ h = h ∗ g f ∗ (g ∗ h) = (f ∗ g) ∗ h f ∗ (g + h) = f ∗ g + f ∗ h

slide-4
SLIDE 4

Convolu'on

(g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

  • Typically, one short series, one long.
  • Long series called “signal”; the other called the “kernel”.
  • The convolu'on is viewed as a weighted version/moving average of the by

the kernel.

slide-5
SLIDE 5

[· · · gn−3 gn−2 gn−1 gn gn+1 gn+2 gn+3 · · · ] [· · · h2 h1 h0 h−1 h−2 · · · ]

Convolu'on (g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

(g ∗ h)n

Say h: kernel (short/”finite support”), g: signal (long).

slide-6
SLIDE 6

Convolu'on (g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

[· · · gn−2 gn−1 gn gn+1 gn+2 gn+3 gn+4 · · · ] [· · · h2 h1 h0 h−1 h−2 · · · ]

(g ∗ h)n+1

Flip h (kernel) and keep it in one place, move g-tape (signal) leZ.

slide-7
SLIDE 7

Convolu'on g h g ∗ h

“signal” “kernel”

(g ∗ h)(n) =

X

m=−∞

g(n − m)h(m)

Flip h (kernel), keep g-tape (signal) fixed, sweep h (kernel) rightward.

· · · · · · · · · · · ·

slide-8
SLIDE 8 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-9
SLIDE 9 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-10
SLIDE 10 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-11
SLIDE 11 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-12
SLIDE 12 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-13
SLIDE 13 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-14
SLIDE 14 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-15
SLIDE 15 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-16
SLIDE 16 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-17
SLIDE 17 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-18
SLIDE 18 − − −

Convolu'on g h g ∗ h · · · · · ·

slide-19
SLIDE 19

Common convolu'on kernels

  • Boxcar

(e.g. rates from spikes)

  • Exponen'al

(e.g. EPSPs from spikes). Called a linear low-pass filter.

  • Gaussian

(e.g. smoothing) h = 1/N for N samples, 0 elsewhere h = 1 τ e−t/τ for t > 0, 0 otherwise h = 1 √ 2πσ e−t2/2σ2

slide-20
SLIDE 20

MATLAB DEMOS

Spikes to rate, smoothing, EPSPs

slide-21
SLIDE 21

RETINA AS A CONVOLUTIONAL FILTER

Edge detec'on, HDR imaging

slide-22
SLIDE 22

Mach bands (Ernst Mach 1860’s)

Eight bars of stepped grayscale intensity. Each bar: constant intensity.

slide-23
SLIDE 23

lighter

Interes'ng perceptual effect in Mach bands

Illumina'on at a point on the re'na is not perceived objec'vely, but only in reference to its neighbours. Why/how does this happen?

darker

slide-24
SLIDE 24

Difference-of-Gaussians or center-surround recep've field.

Electrophysiology of a re'nal ganglion cell (RGC)

slide-25
SLIDE 25

Anatomy of RGC circuit

Off-center (surround) s'mulus has reverse effect of on-center s'mulus because of inhibitory horizontal cells.

slide-26
SLIDE 26

RETINAL KERNEL SENSES CHANGES IN ILLUMINATION (MATLAB)

Reproducing the Mach band illusion

slide-27
SLIDE 27

Ganglion cells code contrast: difference in brightness between center and surround

slide-28
SLIDE 28

Re'nal filter performs edge detec'on

slide-29
SLIDE 29

RETINAL KERNEL AS EDGE DETECTOR (MATLAB)

Demo

slide-30
SLIDE 30

How edge detec'on works: theory

difference-of-Gaussians Smoothing filter:

Hretinal(x) = 1 p 2πσ2

1

e−x2/2σ2

1 − α

1 p 2πσ2

2

e−x2/2σ2

2

= Hσ1(x) − Hσ2(x)

Hσ(x) = 1 √ 2πσ2 e−x2/2σ2

Re'nal filter model: Gaussian

How to interpret Re'nal/difference-of-Gaussians filter?

σ1 < σ2

slide-31
SLIDE 31

How edge detec'on works: theory

  • D. Marr, E. Hildreth (1980) "Theory of edge detec'on."
  • Proc. R. Soc. Lond. B, 207:187-217.

difference-of-Gaussians with some

− d2 dx2 Hσ(x) = − d2 dx2 1 √ 2πσ2 e−x2/2σ2 = 1 σ2 ✓ Hσ(x) − x2 σ2 Hσ(x) ◆ ≈ Hσ1(x) − Hσ2(x)

σ2 < σ1

slide-32
SLIDE 32

How edge detec'on works: theory

− d2 dx2 Hσ(x) = − d2 dx2 1 √ 2πσ2 e−x2/2σ2 = 1 σ2 ✓ Hσ(x) − x2 σ2 Hσ(x) ◆ ≈ Hσ1(x) − Hσ2(x)

− − − −

σ2 = 3 2σ1

slide-33
SLIDE 33

How edge detec'on works: theory

Re'nal filter (difference-of-Gaussians) is like smoothing filter followed by a 2nd deriva've filter:

Hretinal ≈ (Hσ1(x) − Hσ2(x)) ≈ − d2 dx2 Hσ(x)

Hretinal ≈ H2nd diff ∗ Hsmooth

2nd deriva've smoothing

slide-34
SLIDE 34

Re'nex-based adap've filter: global compression, local processing

High dynamic-range imaging

slide-35
SLIDE 35

Comparison: convolu'on, cross- correla'on, autocorrela'on

Image: wikimedia commons hjps://en.wikipedia.org/wiki/Convolu'on

slide-36
SLIDE 36

Summary

  • Convolu'on: a kernel (short) acts on a signal (long), to

produce a locally reweighted version of the signal.

  • Useful in engineering sense: smooth signals, extract rates

from spikes, template matching, other processing.

  • Opera'ons of re'na on visual s'mulus may be interpreted as

convolu'on.

  • Re'nal difference-of-Gaussians convolu'on: edge

enhancement, edge detec'on, contrast normaliza'on.