Edges & the Hough Transform Instructor - Simon Lucey 16-423 - - - PowerPoint PPT Presentation

edges the hough transform
SMART_READER_LITE
LIVE PREVIEW

Edges & the Hough Transform Instructor - Simon Lucey 16-423 - - - PowerPoint PPT Presentation

Edges & the Hough Transform Instructor - Simon Lucey 16-423 - Designing Computer Vision Apps Today Motivation. What is an Edge? Oriented Filters. Hough Transform. Advance Methods. Today Motivation. What is


slide-1
SLIDE 1

Edges & the Hough Transform

Instructor - Simon Lucey

16-423 - Designing Computer Vision Apps

slide-2
SLIDE 2

Today

  • Motivation.
  • What is an Edge?
  • Oriented Filters.
  • Hough Transform.
  • Advance Methods.
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7

Today

  • Motivation.
  • What is an Edge?
  • Oriented Filters.
  • Advance Methods.
  • Hough Transform.
slide-8
SLIDE 8

1968

  • riginal image

Canny edge detector human annotator

Taken from Isola et al. “Crisp Boundary Detection Using Pointwise Mutual Information”

slide-9
SLIDE 9

Edges are Semantic

  • No mathematical definition of an edge, contour of boundary.
  • Classic problem in computer vision.
  • By definition they are semantic.
  • Early work focussed on oriented filters.
  • e.g. Canny edge detectors.
  • Developed by John F. Canny in 1986.

“John Canny”

slide-10
SLIDE 10

Today

  • Motivation.
  • What is an Edge?
  • Oriented Filters.
  • Hough Transform.
  • Advance Methods.
slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-15
SLIDE 15

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-16
SLIDE 16

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-17
SLIDE 17

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-18
SLIDE 18

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-19
SLIDE 19

D.H. Hubel & T.N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of Physiology, 160(1):106, 1962.

slide-20
SLIDE 20

Olshausen & Field 1996

slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23
slide-24
SLIDE 24

x1

slide-25
SLIDE 25

x1 x2

slide-26
SLIDE 26

x1

. . .

x2 xN−1

slide-27
SLIDE 27

x1

. . .

x2 xN−1 xN

slide-28
SLIDE 28

x1

. . .

x2 xN−1 xN

  . . . . . .   . . . . . .

X =

M × N

slide-29
SLIDE 29

0.05 0.1 0.15 0.2 0.25

  • 6
  • 4
  • 2

2 4 6

x

p(x)

3.19 bits

Olshausen & Field 1996

H(x) = −

n

X

n=1

p(xn) · log[p(xn)] =

slide-30
SLIDE 30

x

p(x)

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

  • 6
  • 4
  • 2

2 4 6

1.41 bits

Olshausen & Field 1996

H(x) = −

n

X

n=1

p(xn) · log[p(xn)] =

slide-31
SLIDE 31

=

X

D

Z

×

+

  • H. Lee, A. Ng, et al. 2007

Not Always Zero Always Zero

Olshausen & Field 1996

  • c)
slide-32
SLIDE 32

=

X

D

Z

×

+

  • H. Lee, A. Ng, et al. 2007

Not Always Zero Always Zero

Olshausen & Field 1996

  • c)
slide-33
SLIDE 33

1D Filter

slide-34
SLIDE 34

1D Filter

slide-35
SLIDE 35

1D Filter

slide-36
SLIDE 36

2D Filter

  1, 0, −1 1, 0, −1 1, 0, −1  

(Prewitt)

slide-37
SLIDE 37

2D Filter

  1, 0, −1 2, 0, −2 1, 0, −1  

(Sobel)

slide-38
SLIDE 38

2D Filter

slide-39
SLIDE 39

2D Filter

+

=

slide-40
SLIDE 40

2D Filter

  • c)
slide-41
SLIDE 41

99.6% sparse per patch

slide-42
SLIDE 42

99.6% sparse per patch

slide-43
SLIDE 43

Not Always Zero Always Zero

=

+

  • M. Zeiler, et al. 2010

x

z1

+ . . . + ∗

zK

dK

d1

slide-44
SLIDE 44

Not Always Zero Always Zero

=

+

  • M. Zeiler, et al. 2010

x

z1

+ . . . + ∗

zK

dK

d1

  • c)
slide-45
SLIDE 45

Edges

Adapted from: Elder “Are Edges Incomplete?” IJCV 1999.

slide-46
SLIDE 46

Naive Approach?

  • c)

How do we recover edges?

slide-47
SLIDE 47

Canny Edge Detector

Adapted from: Computer vision: models, learning and inference. Simon J.D. Prince

slide-48
SLIDE 48

Canny Edge Detector

Compute horizontal and vertical gradient images h and v

Adapted from: Computer vision: models, learning and inference. Simon J.D. Prince

slide-49
SLIDE 49

Oriented Filters

  • Seems inefficient to have to search all possible orientations,

+

=

  • Instead one can express all orientations as a linear

combination of x- and y- gradient filters.

slide-50
SLIDE 50

Canny Edge Detector

Quantize to 4 directions

Adapted from: Computer vision: models, learning and inference. Simon J.D. Prince

slide-51
SLIDE 51

Canny Edge Detector

Non-maximal suppression

Adapted from: Computer vision: models, learning and inference. Simon J.D. Prince

slide-52
SLIDE 52

Non-Max Suppression

  • Interesting, view of non-max suppression in terms of sparse

coding.

=

X

D

Z

×

  • Non-max suppression attempts to enforce that Z is sparse.
slide-53
SLIDE 53

Canny Edge Detector

Hysteresis Thresholding

slide-54
SLIDE 54

Classic Edge Detector - Problems

Simple Step Edge Filtering Response Texture Edge Filtering Response

Original Color Image

(a)

Appearance Edges Found by Linear Filtering

(b)

Taken from: “Occlusion Boundaries: Low-Level Detection to High-Level Reasoning” - A. Stein (Ph.D. Thesis)

slide-55
SLIDE 55

Today

  • Motivation.
  • What is an Edge?
  • Oriented Filters.
  • Hough Transform.
  • Advance Methods.
slide-56
SLIDE 56
  • A line is classically represented as - .
  • Not good, in case of vertical lines (i.e. ).
  • Instead common to represent lines using ,

Hough Transform

y = m · x + c

m = ∞ (θ, ρ)

y = −x tan θ + ρ cos θ

θ → angle from horizontal axis to perpendicular ρ → perpendicular distance between the origin and the line

slide-57
SLIDE 57

Hough Transform

Adapted from: Robotics, Vision and Control. Peter Corke.

x y

slide-58
SLIDE 58

Exhaustive Search

“Hough Transform Parameters”

ρ θ

slide-59
SLIDE 59

Hough Transform

Adapted from: Robotics, Vision and Control. Peter Corke.

x (pixels) y (pixels) y (pixels) x (pixels) ρ (pixels) ρ (pixels)

θ (radians) θ (radians)

slide-60
SLIDE 60

Hough Transform

  • Elegant in principle - in practice it can work well or

infuriatingly badly.

  • Performs poorly when the scene contains a lot of texture or

edges are indistinct.

  • Lots of experimentation required to find strong edges AND

thresholds within the Hough peak detector.

Original Color Image

(a)

Appearance Edges Found by Linear Filtering

(b)

slide-61
SLIDE 61

State of the Art

Sobel & Feldman 1968 Arbeláez et al. 2011 (gPb) ez et al. Dollár & Zitnick 2013 (SE) Our method Human labelers

Taken from Isola et al. “Crisp Boundary Detection Using Pointwise Mutual Information”

Isola et al. 2014

slide-62
SLIDE 62

Things to try in iOS - GPUImage

slide-63
SLIDE 63

More to read…

  • Prince et al.
  • Chapter 13, Sections 1-2.
  • Corke et al.
  • Chapter 13, Section 2.
  • P. Isola et al. “Crisp Boundary Detection Using

Pointwise Mutual Information”, ECCV 2014.