18CSE357T – BIOMETRICS
Unit –1 : Session –9: SLO -2
1
SRM Institute of Science and Technology
Mechanics of the Hough transform
• Difficulties • How many lines?
– how big should the cells – Count the peaks in the
be? (too big, and we Hough array
merge quite different lines;
– Treat adjacent peaks as
too small, and noise
a single peak
causes lines to be missed)
• Which points belong to each
line?
– Search for points close to
the line
– Solve again for line and
iterate
Fewer votes land in a single bin when noise increases.
Adding more clutter increases number of bins with false peaks.
Real World Example
Original Edge Found Lines
Detection
Parameter Space
Finding Circles by Hough Transform
Equation of Circle:
( xi − a)2 + ( yi − b)2 = r 2
If radius is known: (2D Hough Space)
Accumulator Array A( a, b)
Finding Circles by Hough Transform
Equation of Circle:
( xi − a)2 + ( yi − b)2 = r 2
If radius is not known: 3D Hough Space!
Use Accumulator array A( a, b, r )
What is the surface in the hough space?
Using Gradient Information
• Gradient information can save lot of computation:
Edge Location ( xi , yi )
Edge Direction i
Assume radius is known:
a = x − r cos
b = y − r sin
Need to increment only one point in Accumulator!!
Real World Circle Examples
Crosshair indicates results of Hough transform,
bounding box found via motion differencing.
Finding Coins
Original Edges (note noise)
Finding Coins (Continued)
Penn Quarters
y
Finding Coins (Continued)
Note that because
the quarters and
penny are different
sizes, a different
Hough transform
(with separate
accumulators) was
used for each circle
size.
Coin finding sample images
from: Vivek Kwatra
Generalized Hough Transform
• Model Shape NOT described by equation
Generalized Hough Transform
• Model Shape NOT described by equation
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 )
For each edge point ( xi , yi , i )
For each entry rki 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 )
Hough Transform: Comments
• Works on Disconnected Edges
• Relatively insensitive to occlusion
• Effective for simple shapes (lines, circles, etc)
• Trade-off between work in Image Space and Parameter Space
• Handling inaccurate edge locations:
• Increment Patch in Accumulator rather than a single point