PANDORE Version 6 | GREYC-IMAGE |
pskeletonization computes the skeleton of the binary objects in the 2D image im_in. Binary objects are regions with connected non null pixels.
The algorithm rests on a succession of thinning until obtaining a
stable structure not being able to be thinned, ie. whose elements are
lines thickness 1 pixel.
Thinning is obtained by 8 masks of erosion
in 8 possible directions N, NW, W, SW, S, SE, E, NE.
A mask indicates the possible shape of a line according to the selected direction.
For example the mask EAST is as follows:
if there is such a configuration around the central pixel ( x can be 0 or 1): 0 x 1 0 1 1 0 x 1 then the central pixel is set to 1
else it is set to 0.
Returns SUCCESS or FAILURE.
pbinarization 95 1e30 examples/tangram.pan i1.pan pskeletonization 4 i1.pan out.pan
Author: Régis Clouard