0% found this document useful (0 votes)
54 views

Hough Transform: Computer Vision and Image Processing - Fundamentals and Applications

The document discusses the Hough transform, which is a method for detecting objects in images. It describes how the Hough transform can be used to detect lines and circles by transforming image space into a parameter space. For lines, each edge point in the image votes for possible values of slope (m) and intercept (c) in parameter space. Local maxima in parameter space correspond to detected lines in the image. The transform can also find circles by transforming to a 3D parameter space of center coordinates (a, b) and radius (r). It further explains how the generalized Hough transform can detect arbitrary shapes using a lookup table of shape parameters.

Uploaded by

Jani Saida Shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Hough Transform: Computer Vision and Image Processing - Fundamentals and Applications

The document discusses the Hough transform, which is a method for detecting objects in images. It describes how the Hough transform can be used to detect lines and circles by transforming image space into a parameter space. For lines, each edge point in the image votes for possible values of slope (m) and intercept (c) in parameter space. Local maxima in parameter space correspond to detected lines in the image. The transform can also find circles by transforming to a 3D parameter space of center coordinates (a, b) and radius (r). It further explains how the generalized Hough transform can detect arbitrary shapes using a lookup table of shape parameters.

Uploaded by

Jani Saida Shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Computer Vision and Image Processing

– Fundamentals and Applications

Hough Transform

n
ay
hu
.B
.K
M

Course Instructor: Dr. M.K. Bhuyan


Professor

Department of Electronics and Electrical Engineering,


Indian Institute of Technology Guwahati, India.
M
.K
.B
hu
ay
n
Line Grouping Problem

n
ay
hu
.B
.K
M
M
.K
.B
hu
ay
n
Hough Transform

• Elegant method for direct object recognition

• Edges need not be connected

• Complete object need not be visible

n
ay
• Key Idea: Edges VOTE for the possible model

hu
.B
.K
M
Image and Parameter Spaces

y = mx + c y
Equation of Line: y = mx + c
Find: (m, c)

Consider point: ( xi , yi ) ( xi , yi )

n
ay
hu
x

.B
.K
yi = mxi + c or c = − xi m + yi Image Space

M m
Parameter space also called Hough Space

(m, c)
c
Parameter Space
• Hough transform uses parametric representation of a
straight line for line detection.

y c

n
ay
y = mx + c

hu
.B
.K
M
(m, c)

x m
M
.K
.B
hu
ay
n
Line Detection by Hough Transform
y
Algorithm:

• Quantize Parameter Space (m, c)


(m, c)
• Create Accumulator Array A(m, c)
x

n
A(m, c) = 0 m, c

ay
• Set Parameter Space

hu
.B
.K
A(m, c)
M
• For each image edge ( xi , yi ) increment: 1 1
1 1
A(m, c) = A(m, c) + 1 1 1
2
• If ( m, c ) lies on the line: 1 1
1 1
c = − xi m + yi 1 1

• Find local maxima in A(m, c)


Group the edges that belong to each line by traversing each line.
Better Parameterization
Note: m and c are, in principle, unbounded: cannot handle all situations.

−  m  
Large Accumulator
Improvement: (Finite Accumulator Array Size)

• Instead of (m, c), we can consider (  ,  ) as the parameters


with  varying between -90o and 90o and p varying from

n
ay
hu
.B
for an M  N image.
.K
0 to M 2 + N2
M



y

( xi , yi )

n
ay
hu
x

.B
.K
Hough Space is Sinusoid Image Space

M 

Hough Space

ρ

n
ay
hu
.B
.K
M

Image space Votes θ

Note that most points in the vote array are very dark, because they
get only one vote.
n
ay
hu
.B
.K
M

Image Votes
space
M
.K
.B
hu
ay
n
n
ay
hu
.B
.K
M

Lots of noise can lead to large peaks in the array


Real World Example

n
ay
hu
.B
.K
M
Original Edge Found Lines
Detection

Parameter Space
Finding Circles by Hough Transform

Equation of Circle:

( xi − a) 2 + ( yi − b) 2 = r 2

If radius is known: (2D Hough Space)

n
ay
hu
.B
Accumulator Array A(a, b)
.K
M
Finding Circles by Hough Transform

Equation of Circle:

( xi − a) 2 + ( yi − b) 2 = r 2

n
ay
hu
.B
.K
M
If radius is not known: 3D Hough Space!
Use Accumulator array A(a, b, r )
Finding Coins

n
ay
hu
.B
.K
M
Generalized Hough Transform
• Model Shape NOT described by equation

n
ay
hu
.B
.K
M
Generalized Hough Transform
• Model Shape NOT described by equation

n
ay
hu
.B
.K
M
Generalized Hough Transform
Find Object Center ( xc , yc ) given edges ( xi , yi , i )
Create Accumulator Array A( xc , yc )
Initialize: A( xc , yc ) = 0 ( xc , yc )
( xi , yi , i )

n
For each edge point

ay
hu
.B
.K
rki
M
For each entry in table, compute:

xc = xi + rki cos ki
yc = yi + rki sin  ki
Increment Accumulator: A( xc , yc ) = A( xc , yc ) + 1
Find Local Maxima in A( xc , yc )
Scale and Rotation
Use accumulator array

n
ay
hu
.B
.K
M
Hough Transform: Comments

n
ay
hu
.B
.K
M

You might also like