Herror ::gray_skeleton (
    Hobject Image,
    Hobject *GraySkeleton
)
HImage HImage::GraySkeleton (
    void
) const
HImageArray HImageArray::GraySkeleton (
    void
) const

Thinning of gray value images.

::gray_skeleton applies a gray value thinning operation to the input image Image. Figuratively, the gray value ``mountain range'' is reduced to its ridge lines by setting the gray value of ``hillsides'' to the gray value at the corresponding valley bottom. The resulting ridge lines are at most two pixels wide. This operator is especially useful for thinning edge images, and is thus an alternative to ::nonmax_suppression_amp. In contrast to ::nonmax_suppression_amp, ::gray_skeleton preserves contours, but is much slower. In contrast to ::skeleton, this operator changes the gray values of an image while leaving its region unchanged.


Parameters

Image (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte )
Image to be thinned.

GraySkeleton (output_object)
(multichannel-)image(-array) -> Hobject * : HImage(Array) ( byte )
Thinned image.


Example
/* Seeking leafs of a tree in an aerial picture: */
read_image(&Image,"wald1");
gray_skeleton(Image&,Skelett);
mean_image(Skelett,&MeanSkelett,7,7);
dyn_threshold(Skelett,MeanSkelett,&Leafs,3.0,"light");

Result

::gray_skeleton returns H_MSG_TRUE if all parameters are correct. If the input is empty the behaviour can be set via ::set_system('no_object_result',<Result>). If necessary, an exception is raised.


Possible Successors

::mean_image


Alternatives

::nonmax_suppression_amp, ::nonmax_suppression_dir, ::local_max


See also

::skeleton, ::gray_dilation_rect


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH