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