8-2d. Hough Transform-17-08-2024
8-2d. Hough Transform-17-08-2024
8-2d. Hough Transform-17-08-2024
❖It’s not feasible to check all combinations of features by fitting a model to each
possible subset.
❖Voting is a general technique where we let the features vote for all models that are
compatible with it.
➢ Cycle through features, cast votes for model parameters.
➢ Look for model parameters that receive a lot of votes.
❖Noise & clutter features will cast votes too, but typically their votes should be
inconsistent with the majority of “good” features.
Hough Transform: Line Detection
Hough Transform: Line Detection
https://fiveko.com/online-tools/hough-circle-detection-demo/
Multiple Lines Detection
Better Parameterization
Two Line Equations
Better Parameterization
Better Parameterization
Better Parameterization
Hugh Transform Mechanics
❖ How big should the accumulator cells be?
➢ Too big: Different lines may be merged.
➢ Too small: Noise causes lines to be missed. Miss lines because some points that are not exactly collinear cast votes for different buckets
❖ How many lines
➢ Count the peaks in the accumulator array
❖ Try to get rid of irrelevant features
➢ Take only edge points with significant gradient magnitude
❖ Handling inaccurate edge locations:
➢ Increment patch in accumulator rather than single point
❖ Strong Edges
➢ Give more votes for stronger edges.
➢ Examine the surrounding pixels in the chosen cell
➢ Edge thinning can be beneficial
❖ Change the sampling of (ρ, ) to give more/less resolution
❖ Increment neighboring bins (smoothing in accumulator array)
Hugh Transform Advantages and Disadvantages
❖Advantages
• Can deal with non-locality and occlusion
• Can detect multiple instances of a model (e.g., line, circle, …) in a single pass
• Some robustness to noise: noise points unlikely to contribute consistently to any single bin
❖ Disadvantages
➢ Complexity of search time increases exponentially with the number of model parameters
➢ Non-target shapes can produce spurious peaks in parameter space
➢ It’s hard to pick a good Accumulator (grid) size
Line Detection Results
Line Detection Results
Line Detection Results
https://github.com/adityaintwala/Hough-Line-Detection
Hugh Transform: Circle Detection
Hugh Transform: Circle Detection
Hugh Transform: Circle Detection
Circle Detection Results
Using Gradient Information
Using Gradient Information
Using Gradient Information
Using Gradient Information
Hough Transform: Circle Detection
Note: Complexity of search time increases exponentially with the number of model parameters
Generalized Hough Transform
Generalized Hough Transform
Hough Model
Generalized Hough Transform
Results
Handling Scale and Rotation
Hough Transform: Comments
Hough Transform: Line Detection (Parameter Space)
Hough Transform Concept
Hough Transform Concept