Professional Documents
Culture Documents
Hough Transform
Lecture #9
Reading: Computer Vision (Ballard and Brown): Chapter 4
“Use of the Hough Transform to detect lines and curves in pictures”, Comm. ACM
15, 1, January 1972 (pgs 112-115)
Boundaries of Objects
http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/bench/html/images.html
Boundaries of Objects from Edges
Image
Edge detection
and Thresholding
Image Noisy edge image
Incomplete boundaries
Thinning
Edge Tracking Methods
• Repeat
Fitting Lines to Edges (Least Squares)
y= i
i
x= i
i
( x − x) i
2
N N i
Problem with Parameterization
y
1
E=
N
i
( − xi cos + yi sin ) 2
y = f ( x) = ax3 + bx 2 + cx + d
that best fits the given points ( xi , yi )
Minimize:
x
1
i − + + +
3 2 2
[ y ( axi bx i cxi d )]
N i
E E E E
Using:
=0 , =0 , =0 , =0
a b c d
• Cost:
– It is not feasible to check all combinations of features
by fitting a model to each possible subset
Hough Transform
y = mx + c y
Equation of Line: y = mx + c
Find: (m, c)
Consider point: ( xi , yi ) ( xi , yi )
x
yi = mxi + c or c = − xi m + yi Image Space
m
Parameter space also called Hough Space
(m, c)
c
Parameter Space
Line Detection by Hough Transform
y
Algorithm:
NOTE: − m y
Large Accumulator ( xi , yi )
More memory and computations
Here 0 2
0 max
Given points ( xi , yi ) find ( , ) ?
Horizontal axis is θ,
vertical is rho.
Image votes
space
Mechanics of the Hough transform
Parameter Space
Finding Circles by Hough Transform
Equation of Circle:
( xi − a) 2 + ( yi − b) 2 = r 2
Equation of Circle:
( xi − a) 2 + ( yi − b) 2 = r 2
Edge Location ( xi , yi )
Edge Direction i
a = x − r cos
b = y − r sin
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 )
Hough Transform: Comments