Each contour is converted to a hole or profile curve using the
curvature along the contour. Areas in which the curvature is zero
(or below a small threshold) for a specified distance along the
contour are considered to be line segments. Areas in which the
curvature is constant for a specified distance are considered to be
arcs. Curvature, , at a point on a curve is defined to be the
instantaneous rate of change of the curve's slope,
, with respect
to curve length,
[12]:
Slope is taken to be the orientation of the gradient of the difference of
gaussians (DOG) function. As previously mentioned, the DOG function is an
approximation to the Laplacian.
The derivatives of slope
are computed using a forward difference technique, and the
results are smoothed.
A graph of curvature vs. distance along a curve can be seen in Figure
1.
For each arc segment,
a circle is fit using a least squares
fit, and the endpoints of the segment are grown until the
distance from the contour to the fitted circle exceeds a tolerance.
Our implementation of the fitting procedure [10] could be
extended to include general conic sections by changing the generators
used from
,
,
,
to
,
,
,
,
,
.
The fitting/growing process is repeated until growing has no effect or another
segment is reached. A similar method is used for the line segments.