) The input image is first segmented to obtain a contour from the
image. The contour is smoothed slightly to remove noise and
normalized so that it touches a square of size one on at least
three sides. Curvature is then computed at each point along the
contour. If curvature is nearly constant, the system concludes
that the contour is circular and stops. Otherwise, if curvature is
positive everywhere or very close to zero but possibly negative
(this situation can be caused by noise on a convex contour), the
system concludes that the input contour is convex and follows
steps 7 through 10. Otherwise, the input contour is considered
to be concave and steps 2 through 6 are followed.