The ImageCrackCode module allows you to detect and measure features in an image. This module is only available in the PIL Plus package.
CrackCode(image, position) identifies a feature in the given image. If the position is omitted, the constructor searches from the top left corner.
area (attribute). The feature area, in pixels.
bbox (attribute). The bounding box, given as a 4-tuple (left, upper, right, lower).
caliper (attribute). The caliper size, given as a 2-tuple (height, width).
centroid (attribute). The center of gravity.
edge (attribute). True if the feature touches the edges of the image, zero otherwise.
links (attribute). The number of links in the crack code chain.
offset (attribute). The offset from the upper left corner of the image, to the feature's bounding box,
start (attribute). The first coordinate in the crack code chain.
top (attribute). The topmost coordinate in the crack code chain.
hit(xy). Check if the given point is inside this feature.
topath(xy). Return crack code outline as an ImagePath object.
getmask(). Get filled feature mask, as an image object.
getoutline(). Get feature outline, as an image object.