|
thin
|
|
|
|
| Input
|
|
|
| An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.
|
|
|
| Output
|
|
|
| An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.
|
|
|
| Peel
|
|
|
| A positive integer specifying the number of thinning steps. If this parameter is set to zero, the function will continue to iterate until the objects are completely thinned.
|
| Default value: 0
|
|
|
| Prune
|
|
|
| An integer specifying the number of pruning steps. Pruning will reduce the size of branches protruding from skeletons. If this parameter is set to -1, the function will continue to iterate until the objects are completely pruned.
|
| Default value: -1
|
|
|
| Binarize
|
|
|
| A boolean integer specifying whether grayscale and color skeletons must be converted into binary ones. This parameter is disregarded if the input image is a multiphase one. Must be one of the following values:
|
|
|
| FALSE=0 skeletons on grayscale and color images are not converted to the binary type.
|
| TRUE=1 skeletons on grayscale and color images are converted to the binary type after the thinning algorithm is applied.
|
| Default value: FALSE
|
|
|
| Mode
|
|
|
| An enumerated integer that describes the thinning algorithm. Must be one of the following values:
|
|
|
| M_DISTANCE=0 fast non-iterative method based on the distance transform.
|
| M_ZHANG=1 parallel iterative method based on the modified Zhang-Suen transform.
|
| M_DAVIES=2 sequential iterative method based on the Davies-Plummer algorithm.
|
| Default value: M_DISTANCE
|
|
|
| ERR_OK
|
|
|
| The flag set if successful.
|
|
|
| ERR_FAILED
|
|
|
| The flag set if failed.
|
| This set of statements binarizes a sample image and extracts its skeleton:
|
|
|
| setCurDir ("samples")
|
| loadIm (1,"sample25.iwd")
|
| threshold(1,1,M_PRESET,177.,255.,TRUE,FALSE)
|
| fill(1,1)
|
| thin (1,2,0,20)
|