Lect09 HoughTransform
Lect09 HoughTransform
Outline
• Hough transform
• RANSAC - Random Sample Consensus
• Homography
P.V.C. Hough, Machine Analysis of Bubble Chamber Pictures, Proc. Int. Conf.
High Energy Accelerators and Instrumentation, 1959
Parameter space representation
• A line in the image corresponds to a point in
Hough space
Image space Hough parameter space
c
Parameter space representation
• What does a point (x0, y0) in the image space
map to in the Hough space?
c
Parameter space representation
• Where is the line that contains both (x0, y0)
and (x1, y1)?
c
(x1, y1)
(x0, y0)
b = –x1m + y1
Parameter space representation
• Where is the line that contains both (x0, y0)
and (x1, y1)?
– It is the intersection of the lines c = –x0m + y0 and
c= –x1m + y1
c
(x1, y1)
c
(x0, y0)
cb = –x m + y
1 1
Parameter space representation
• Problems with the (m,c) space:
– Unbounded parameter domain
– Vertical lines require infinite m
• Alternative: polar representation
features votes
Other shapes
Square Circle
Several lines
Effect of noise
features votes
Effect of noise
features votes
features votes
θ r(θ)
p
Source: K. Grauman
Example
model shape
Example
test image
xT 0T xn xTn
n
• H has 8 degrees of freedom (9 parameters, but scale is
arbitrary)
• One match gives us two linearly independent equations
• Four matches needed for a minimal solution (null space of
8x9 matrix)
• More than four: homogeneous least squares
Application: Panorama stitching
Recognizing panoramas
• Given contents of a camera memory card, automatically figure
out which pictures go together and stitch them together into
panoramas