HALCON Reference Manual 10.0.2
Table of Contents / Filters / Misc ClassesClassesClasses | | | Operators

gray_skeletongray_skeletongray_skeletonGraySkeletonGraySkeleton (Operator)

Name

gray_skeletongray_skeletongray_skeletonGraySkeletonGraySkeleton — Thinning of gray value images.

Signature

gray_skeleton(Image : GraySkeleton : : )

Herror gray_skeleton(const Hobject Image, Hobject* GraySkeleton)

Herror T_gray_skeleton(const Hobject Image, Hobject* GraySkeleton)

Herror gray_skeleton(Hobject Image, Hobject* GraySkeleton)

HImage HImage::GraySkeleton() const

HImageArray HImageArray::GraySkeleton() const

void HOperatorSetX.GraySkeleton(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*GraySkeleton)

IHImageX* HImageX.GraySkeleton()

static void HOperatorSet.GraySkeleton(HObject image, out HObject graySkeleton)

HImage HImage.GraySkeleton()

Description

gray_skeletongray_skeletongray_skeletonGraySkeletonGraySkeleton applies a gray value thinning operation to the input image ImageImageImageImageimage. 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_ampnonmax_suppression_ampnonmax_suppression_ampNonmaxSuppressionAmpNonmaxSuppressionAmp. In contrast to nonmax_suppression_ampnonmax_suppression_ampnonmax_suppression_ampNonmaxSuppressionAmpNonmaxSuppressionAmp, gray_skeletongray_skeletongray_skeletonGraySkeletonGraySkeleton preserves contours, but is much slower. In contrast to skeletonskeletonskeletonSkeletonSkeleton, this operator changes the gray values of an image while leaving its region unchanged.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte / uint2)

Image to be thinned.

GraySkeletonGraySkeletonGraySkeletonGraySkeletongraySkeleton (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte / uint2)

Thinned image.

Example (HDevelop)

* Seeking leafs of a beech tree in an aerial picture:
read_image(Image,'forest')
gray_skeleton(Image,Skelett)
mean_image(Skelett,MeanSkelett,7,7)
dyn_threshold(Skelett,MeanSkelett,Leafs,3,'light')

Example (C)

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

Example (HDevelop)

* Seeking leafs of a beech tree in an aerial picture:
read_image(Image,'forest')
gray_skeleton(Image,Skelett)
mean_image(Skelett,MeanSkelett,7,7)
dyn_threshold(Skelett,MeanSkelett,Leafs,3,'light')

Example (HDevelop)

* Seeking leafs of a beech tree in an aerial picture:
read_image(Image,'forest')
gray_skeleton(Image,Skelett)
mean_image(Skelett,MeanSkelett,7,7)
dyn_threshold(Skelett,MeanSkelett,Leafs,3,'light')

Example (HDevelop)

* Seeking leafs of a beech tree in an aerial picture:
read_image(Image,'forest')
gray_skeleton(Image,Skelett)
mean_image(Skelett,MeanSkelett,7,7)
dyn_threshold(Skelett,MeanSkelett,Leafs,3,'light')

Result

gray_skeletongray_skeletongray_skeletonGraySkeletonGraySkeleton returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Successors

mean_imagemean_imagemean_imageMeanImageMeanImage

Alternatives

nonmax_suppression_ampnonmax_suppression_ampnonmax_suppression_ampNonmaxSuppressionAmpNonmaxSuppressionAmp, nonmax_suppression_dirnonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDir, local_maxlocal_maxlocal_maxLocalMaxLocalMax

See also

skeletonskeletonskeletonSkeletonSkeleton, gray_dilation_rectgray_dilation_rectgray_dilation_rectGrayDilationRectGrayDilationRect

Module

Foundation


Table of Contents / Filters / Misc ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH