Professional Documents
Culture Documents
Hough Transform: Computer Vision and Image Processing - Fundamentals and Applications
Hough Transform: Computer Vision and Image Processing - Fundamentals and Applications
Hough Transform
n
ay
hu
.B
.K
M
n
ay
hu
.B
.K
M
M
.K
.B
hu
ay
n
Hough Transform
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:
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
− m
Large Accumulator
Improvement: (Finite Accumulator Array Size)
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
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
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
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