| pythonware.com | products ::: library ::: search ::: daily Python-URL! |
The ImageCrackCode Module (PIL Plus)
(PIL Plus) The ImageCrackCode module allows you to detect and measure features in an image. This module is no longer available. FunctionsCrackCodeCrackCode(image, position) => CrackCode instance Identifies a feature in the given image. If the position is omitted, the constructor searches from the top left corner. Methods and attributesareacc.area (attribute). The feature area, in pixels. bboxcc.bbox (attribute). The bounding box, given as a 4-tuple (left, upper, right, lower). calipercc.caliper (attribute). The caliper size, given as a 2-tuple (height, width). centroidcc.centroid (attribute). The center of gravity. edgecc.edge (attribute). True if the feature touches the edges of the image, zero otherwise. linkscc.links (attribute). The number of links in the crack code chain. offsetcc.offset (attribute). The offset from the upper left corner of the image, to the feature's bounding box, startcc.start (attribute). The first coordinate in the crack code chain. topcc.top (attribute). The topmost coordinate in the crack code chain. hitcc.hit(xy) => flag Check if the given point is inside this feature. topathcc.topath(xy) => path Return crack code outline as an ImagePath object. getmaskcc.getmask() => image Get filled feature mask, as an image object. getoutlinecc.getoutline() => image Get feature outline, as an image object. |