Skip to content

gray_skeletonGraySkeletonGraySkeletongray_skeletongray_skeletonπŸ”—

Short descriptionπŸ”—

gray_skeletonGraySkeletonGraySkeletongray_skeletongray_skeleton β€” Thinning of gray value images.

SignatureπŸ”—

gray_skeleton( image Image, out image GraySkeleton )void GraySkeleton( const HObject& Image, HObject* GraySkeleton )static void HOperatorSet.GraySkeleton( HObject image, out HObject graySkeleton )def gray_skeleton( image: HObject ) -> HObject

Herror gray_skeleton( const Hobject Image, Hobject* GraySkeleton )

Herror T_gray_skeleton( const Hobject Image, Hobject* GraySkeleton )

HImage HImage::GraySkeleton( ) const

HImage HImage.GraySkeleton( )

DescriptionπŸ”—

gray_skeletonGraySkeleton applies a gray value thinning operation to the input image Imageimageimage. 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_ampNonmaxSuppressionAmp. In contrast to nonmax_suppression_ampNonmaxSuppressionAmp, gray_skeletonGraySkeleton preserves contours, but is much slower. In contrast to skeletonSkeleton, this operator changes the gray values of an image while leaving its region unchanged.

AttentionπŸ”—

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Image to be thinned.

GraySkeletongraySkeletongray_skeleton (output_object) (multichannel-)image(-array) β†’ object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject * (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')
(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")\;

ResultπŸ”—

gray_skeletonGraySkeleton 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>). If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

mean_imageMeanImage

Alternatives

nonmax_suppression_ampNonmaxSuppressionAmp, nonmax_suppression_dirNonmaxSuppressionDir, local_maxLocalMax

See also

skeletonSkeleton, gray_dilation_rectGrayDilationRect

ModuleπŸ”—

Foundation