Image Processing Reference
In-Depth Information
(a) Accumulator for 5.7(a)
(b) Accumulator for 5.7(b)
(c) Accumulator for 5.7(c)
Figure 5.9
Applying the polar Hough transform for lines
( x - x 0 ) 2 + ( y - y 0 ) 2 = r 2
(5.30)
This equation defines a locus of points ( x , y ) centred on an origin ( x 0 , y 0 ) and with radius
r . This equation can again be visualised in two dual ways: as a locus of points ( x , y ) in an
image, or as a locus of points ( x 0 , y 0 ) centred on ( x , y ) with radius r .
Figure 5.10 illustrates this dual definition. Each edge point defines a set of circles in the
accumulator space. These circles are defined by all possible values of the radius and they
are centred on the co-ordinates of the edge point. Figure 5.10( b) shows three circles
defined by three edge points. These circles are defined for a given radius value. Actually,
each edge point defines circles for the other values of the radius. This implies that the
accumulator space is three dimensional (for the three parameters of interest) and that edge
points map to a cone of votes in the accumulator space. Figure 5.10 (c) illustrates this
accumulator. After gathering evidence of all the edge points, the maximum in the accumulator
space again corresponds to the parameters of the circle in the original image. The procedure
of evidence gathering is the same as that for the HT for lines, but votes are generated in
cones, according to Equation 5.30.
Equation 5.30 can be defined in parametric form as
x = x 0 + r cos(θ ) y = y 0 + r sin(θ ) (5.31)
The advantage of this representation is that it allows us to solve for the parameters. Thus,
the HT mapping is defined by
x 0 = x - r cos(θ ) y 0 = - r sin(θ ) (5.32)
These equations define the points in the accumulator space (Figure 5.10 (b)) dependent on
the radius r . Note that θ is not a free parameter, but defines the trace of the curve. The trace
of the curve (or surface) is commonly referred to as the point spread function .
The implementation of the HT for circles, HTCircle , is shown in Code 5.5 . This is
similar to the HT for lines, except that the voting function corresponds to that in Equation
5.32 and the accumulator space is for circle data. The accumulator in the implementation
is actually 2D, in terms of the centre parameters for a fixed value of the radius given as an
argument to the function. This function should be called for all potential radii. A circle of
votes is generated by varying ang (i.e. θ , but Matlab does not allow Greek symbols!) from
0° to 360° . The discretisation of ang controls the granularity of voting, too small an
increment gives very fine coverage of the parameter space, too large a value results in very
Search WWH ::




Custom Search