Image Processing Reference
In-Depth Information
1
2
1
2
x
=
(
x
+
x
)
y
=
(
y
+
y
)
(5.56)
m
1
2
m
1
2
Thus, by substitution of Equation 5.53 in 5.52 and by replacing the point ( x
), y
)) by
( x m , y m ), we have that the HT mapping can be expressed as
+ (
x
-
x x x
yy
)(
-
)
m
0
2
1
yy
=
(5.57)
0
m
( -
)
2
1
This equation does not use gradient direction information, but is based on pairs of points.
This is analogous to the parameter space decomposition of the line presented in Equation
5.40. In that case, the slope can be computed by using gradient direction or, alternatively,
by taking a pair of points. In the case of the circle, the tangent (and therefore the angle of
the second directional derivative) can be computed by the gradient direction (i.e. Equation
5.51) or by a pair of points (i.e. Equation 5.55). However, it is important to notice that there
are some other combinations of parameter space decomposition (Aguado, 1996a).
Code 5.8 shows the implementation of the parameter space decomposition for the HT
for circles. The implementation only detects the position of the circle and it gathers evidence
by using the mapping in Equation 5.57. Pairs of points are restricted to a neighbourhood
between 10 × 10 pixels and 12 × 12 pixels. We avoid using pixels that are close to each
other since they do not produce accurate votes. We also avoid using pixels that are far away
from each other, since by distance it is probable that they do not belong to the same circle
and would only increase the noise in the accumulator. In order to trace the line, we use two
equations that are selected according to the slope.
Figure 5.18 shows the accumulators obtained by the implementation of Code 5.8 for the
images in Figure 5.11 (a) and Figure 5.11 (b). Both accumulators show a clear peak that
represents the location of the circle. Small peaks in the background of the accumulator in
Figure 5.11 (b) corresponds to circles with only a few points. In general, there is a compromise
between the spread of the peak and the noise in the accumulator. The peak can be made
narrower by considering pairs of points that are more widely spaced. However, this can
also increases the level of background noise. Background noise can be reduced by taking
points that are closer together, but this makes the peak wider.
5.4.5.3 Parameter space reduction for ellipses
Part of the simplicity in the parameter decomposition for circles comes from the fact that
circles are (naturally) isotropic. Ellipses have more free parameters and are geometrically
more complex. Thus, geometrical properties involve more complex relationships between
points, tangents and angles. However, they maintain the geometric relationship defined by
the angle of the second derivative. According to Equation 5.41 and Equation 5.43, the
vector position and directional derivatives of an ellipse in Equation (5.35) have the components
x ′ (θ
)= - a x sin(θ
) + b x cos(θ
)
y ′ (θ
)= - a y sin(θ
) + b y cos(θ
)
(5.58)
x ′′ (θ )= - a x cos(θ ) - b x sin(θ ) y ′′ (θ )= - a y cos(θ ) - b y sin(θ )
The tangent of angle of the first and second directional derivatives is given by
() = -
a
cos(
) +
b
sin(
)
y
x
()
y
y
() =
-
a
cos(
) +
b
sin(
)
x
x
(5.59)
() = -
a
cos (
) -
b
sin (
)
y
x
()
y
y
() =
-
a
cos(
) -
b
sin(
)
x
x
Search WWH ::




Custom Search