SKEL_LENG - skeletonize an image as proposed by Leng
NAME
skel_leng
skel_leng
[
options
]
input-file
[
output-file
]
skel_leng
skeletonizes an image as described by Leng in 1994.
The program will skeletonize the bright coloured parts in the image.
The
input-file
should be a
.pgm
image file. If an
output-file
is specified this file will be used to store the resulting image.
Otherwise the result is written to the
input-file.
The algorithm performs the following steps.
First the image is smoothed. Second, the gradient of the grey-values
is calculated and the image is eroded using the gradient.
Finally a cubic-curve correction on the grey-values of the image
is performed. The erosion is repeated until no significant changes
occur anymore or until a maximum number of steps.
- -r
- Reverse the image during the process, resulting in the skeletonization
of the dark parts of the image instead of the bright parts.
- -n<nr>
- This option forces the program to stop after <nr> passes.
The default value is after 100 passes.
- -q<fraction>
- This option forces the program to stop if less than <fraction>
pixels have been changed during the last pass.
The default value is 0.05.
The -n and the -q option can be used together.
- -k<factor>
- With this option the k-parameter used in the algorithm can be
set. The value of k will be set equal to 1/<factor>.
The default is -k2 (k = 0.5).
A high value of k means in faster erosion.
- -c<factor>
- This options sets the value of the c-parameter.
The value should be between 0 and 1. The default is 0.5.
The c-parameter determines the strength of the cubic-curve
correction
performed after each pass of the algorithm.
- -t<value>
- Sets the grey-value which will stay unchanged by the cubic-curve correction.
Higher grey-values will be increased, lower grey-values will be decreased.
t should be between 0 and 255. The default value for t is 128.
- -s<size>
- Sets the size of the mask used to calculate the grey-scale gradient of the
image. A size of 3 means a 3x3 Sobel-mask is used. Greater mask-sizes
will use a combination of optimal smoothing and edge detecting masks.
The default mask size is 5.
- -p
- Normally the image is smoothed prior to the skeletonization.
If the -p switch is specified the image will not be smoothed.
skel_dyer(1)
06-May-97. Automatically converted by man2html,
written by G.Matas (g.matas@ee.surrey.ac.uk)