Generalized Hough Transform 16-385 Computer Vision Hough Circles - - PowerPoint PPT Presentation

generalized hough transform
SMART_READER_LITE
LIVE PREVIEW

Generalized Hough Transform 16-385 Computer Vision Hough Circles - - PowerPoint PPT Presentation

Generalized Hough Transform 16-385 Computer Vision Hough Circles Finding Circles by Hough Transform Equation of Circle: 2 2 2 ( x a ) ( y b ) r + = i i If radius is known: (2D Hough Space) A ( a , b )


slide-1
SLIDE 1

Generalized Hough Transform

16-385 Computer Vision

slide-2
SLIDE 2

Hough Circles

slide-3
SLIDE 3

Finding Circles by Hough Transform

Equation of Circle:

2 2 2

) ( ) ( r b y a x

i i

= − + −

If radius is known:

) , ( b a A

Accumulator Array (2D Hough Space)

slide-4
SLIDE 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x, y)

Image space Parameter space

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-5
SLIDE 5
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x, y)

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-6
SLIDE 6
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-7
SLIDE 7
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

a

b

parameters variables parameters variables

slide-8
SLIDE 8
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-9
SLIDE 9

Finding Circles by Hough Transform

Equation of Circle:

2 2 2

) ( ) ( r b y a x

i i

= − + −

If radius is not known: 3D Hough Space! Use Accumulator array

) , , ( r b a A

What is the surface in the hough space?

slide-10
SLIDE 10

Finding Circles by Hough Transform

Equation of Circle:

2 2 2

) ( ) ( r b y a x

i i

= − + −

If radius is not known: 3D Hough Space! Use Accumulator array

) , , ( r b a A

What is the surface in the hough space?

slide-11
SLIDE 11

Using Gradient Information

Gradient information can save lot of computation: Edge Location Edge Direction Need to increment only one point in accumulator!!

i

φ ) , (

i i y

x

Assume radius is known:

φ φ sin cos r y b r x a − = − =

slide-12
SLIDE 12
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x, y, φ)

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-13
SLIDE 13
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 5
  • 4
  • 3
  • 2
  • 1
1 2 3 4
  • 4
  • 3
  • 2
  • 1
1 2 3 4

a

b

(x, y, φ)

(x − a)2 + (y − b)2 = r2 (x − a)2 + (y − b)2 = r2

parameters variables parameters variables

slide-14
SLIDE 14
slide-15
SLIDE 15

Pennie Hough detector Quarter Hough detector

slide-16
SLIDE 16

Pennie Hough detector Quarter Hough detector

slide-17
SLIDE 17

Can you use Hough Transforms for other objects, beyond lines and circles?

slide-18
SLIDE 18

Generalized Hough Transform

slide-19
SLIDE 19
slide-20
SLIDE 20

Generalized Hough Transform

Find Object Center given edges Create Accumulator Array Initialize: For each edge point For each entry in table, compute: Increment Accumulator: Find Local Maxima in

) , (

c c y

x A ) , ( ) , (

c c c c

y x y x A ∀ = ) , , (

i i i y

x φ 1 ) , ( ) , ( + =

c c c c

y x A y x A ) , (

c c y

x A

i k i k i c i k i k i c

r y y r x x α α sin cos + = + = ) , (

c c y

x ) , , (

i i i y

x φ

¯ ri

k

slide-21
SLIDE 21
slide-22
SLIDE 22

Do you have to use edge detectors to vote in Hough Space?

slide-23
SLIDE 23

c Template

  • A. Train phase:

1.Get features 2.Store all displacements of feature from center

  • B. Test phase:
  • 1. Get features & lookup displacements
  • 2. Vote for center location
slide-24
SLIDE 24

Template

  • A. Train phase:

1.Get features 2.Store all displacements of feature from center

  • B. Test phase:
  • 1. Get features & lookup displacements
  • 2. Vote for center location
slide-25
SLIDE 25

Test image

  • A. Train phase:

1.Get features 2.Store all displacements of feature from center

  • B. Test phase:
  • 1. Get features & lookup displacements
  • 2. Vote for center location
slide-26
SLIDE 26

Application of Hough Transforms

slide-27
SLIDE 27

Detecting shape features

  • F. Jurie and C. Schmid, Scale-invariant shape features for

recognition of object categories, CVPR 2004

slide-28
SLIDE 28

Original images Laplacian circles Hough-like circles Which feature detector is more consistent?

slide-29
SLIDE 29

Robustness to scale and clutter

slide-30
SLIDE 30

Object detection

training image visual codeword with
 displacement vectors

  • B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and

Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical Learning in Computer Vision 2004

Index displacements by “visual codeword”

slide-31
SLIDE 31
slide-32
SLIDE 32
  • 1. get features

Train phase

slide-33
SLIDE 33
  • 2. store displacements

Train phase

slide-34
SLIDE 34

Test phase

slide-35
SLIDE 35
slide-36
SLIDE 36

The Hough transform …

Deals with occlusion well? Detects multiple instances? Robust to noise? Good computational complexity? Easy to set parameters?