Professional Documents
Culture Documents
Hough Transform: Vineeth N Balasubramanian
Hough Transform: Vineeth N Balasubramanian
Hough Transform
Vineeth N Balasubramanian
Hough, Method and means for recognizing complex patterns, U.S. Patent No. 3,069,654,
Dec 1962
This can be thought of as the equation of line in parameter space; i.e in the (m, c)
coordinate system with slope −xi and c-intercept y
In the space of all possible models, vote for ones that satisfy a given sample
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 7 / 18
Hough Transform: Polar Parametrization
A point (xi , yi ) ’votes’ for many points in parameter space → Hough Voting
Each line through a point (x1 , y1 ) is a vote for a point in parameter space which satisfies
ρ = x1 cos θ + y1 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 7 / 18
Hough Transform: Polar Parametrization
A point (xi , yi ) ’votes’ for many points in parameter space → Hough Voting
Each line through a point (x1 , y1 ) is a vote for a point in parameter space which satisfies
ρ = x1 cos θ + y1 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 7 / 18
Hough Transform: Polar Parametrization
A point (xi , yi ) ’votes’ for many points in parameter space → Hough Voting
Each line through a point (x1 , y1 ) is a vote for a point in parameter space which satisfies
ρ = x1 cos θ + y1 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 7 / 18
Hough Transform: Polar Parametrization
A point (xi , yi ) ’votes’ for many points in parameter space → Hough Voting
Each line through a point (x1 , y1 ) is a vote for a point in parameter space which satisfies
ρ = x1 cos θ + y1 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 7 / 18
Hough Transform: Polar Parametrization
Each line through a point (x2 , y2 ) is a vote for a point in parameter space which satisfies
ρ = x2 cos θ + y2 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 8 / 18
Hough Transform: Polar Parametrization
Each line through a point (x2 , y2 ) is a vote for a point in parameter space which satisfies
ρ = x2 cos θ + y2 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 8 / 18
Hough Transform: Polar Parametrization
Each line through a point (x2 , y2 ) is a vote for a point in parameter space which satisfies
ρ = x2 cos θ + y2 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 8 / 18
Hough Transform: Polar Parametrization
Each line through a point (x2 , y2 ) is a vote for a point in parameter space which satisfies
ρ = x2 cos θ + y2 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 8 / 18
Hough Transform: Polar Parametrization
Each line through a point (x2 , y2 ) is a vote for a point in parameter space which satisfies
ρ = x2 cos θ + y2 sin θ
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 8 / 18
Hough Voting
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Vineeth N B (IIT-H) §3.2 Hough Transform 9 / 18
Line Detection
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Source: Yannis Avrithis, Deep Learning for Vision, Spring 2019 SIF
Model image
Test image
Vineeth N B (IIT-H) §3.2 Hough Transform 14 / 18
Generalized Hough Transform: Example
Build model: Record coordinates relative to reference point
Test phase: Each point votes for all possible coordinates of reference point
Model image
Test image
Vineeth N B (IIT-H) §3.2 Hough Transform 14 / 18
Generalized Hough Transform: Example
Model image
Test image
Vineeth N B (IIT-H) §3.2 Hough Transform 15 / 18
Generalized Hough Transform: Example
Accumulator
Model image points
Accumulator
Model image points
Advantages
Deals with occlusion well
Robust to noise
Disadvantages
Can be computationally expensive
Setting parameters is not easy
Homework
Readings
Chapter 4.3, Szeliski, Computer Vision: Algorithms and Applications
Questions
How would you use Hough transform to detect ellipses, squares and rectangles?
Your friend working in a diagnostics startup asks you how to use Hough transform to
automatically count Red Blood Cells in a blood sample. What would you advise your
friend?
References
Richard O. Duda and Peter E. Hart. “Use of the Hough Transformation to Detect Lines and Curves in
Pictures”. In: Commun. ACM 15.1 (Jan. 1972), 11–15.
John Illingworth and Josef Kittler. “A survey of the Hough transform”. In: Computer vision, graphics, and
image processing 44.1 (1988), pp. 87–116.
Richard Szeliski. Computer Vision: Algorithms and Applications. Texts in Computer Science. London:
Springer-Verlag, 2011.