Skip to content

gray_erosionGrayErosionGrayErosiongray_erosiongray_erosion🔗

Short description🔗

gray_erosionGrayErosionGrayErosiongray_erosiongray_erosion — Perform a gray value erosion on an image.

Signature🔗

gray_erosion( image Image, image SE, out image ImageErosion )void GrayErosion( const HObject& Image, const HObject& SE, HObject* ImageErosion )static void HOperatorSet.GrayErosion( HObject image, HObject SE, out HObject imageErosion )def gray_erosion( image: HObject, se: HObject ) -> HObject

Herror gray_erosion( const Hobject Image, const Hobject SE, Hobject* ImageErosion )

Herror T_gray_erosion( const Hobject Image, const Hobject SE, Hobject* ImageErosion )

HImage HImage::GrayErosion( const HImage& SE ) const

HImage HImage.GrayErosion( HImage SE )

Description🔗

gray_erosionGrayErosion applies a gray value erosion to the input image Imageimageimage with the structuring element SESEse. The image type of the structuring element SESEse must match the image type of the input image Imageimageimage. The gray value erosion of an image \(i\) with a structuring element \(s\) at the pixel position \(x\) is defined as:

\[\begin{eqnarray*} (i \ominus s)(x) = \min\{f(x+z) - s(z) | z \in S\} \end{eqnarray*}\]

Here, \(S\) is the domain of the structuring element \(s\) (see read_gray_seReadGraySe).

The gray value erosion is particularly fast for flat structuring elements, i.e., structuring elements with a constant gray level within their domain.

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 internal data level.

Parameters🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject (byte / uint2 / real)

Input image.

SESEse (input_object) singlechannelimage → object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject (byte / uint2 / real)

Structuring element.

ImageErosionimageErosionimage_erosion (output_object) (multichannel-)image(-array) → object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject * (byte / uint2 / real)

Gray-eroded image.

Result🔗

gray_erosionGrayErosion returns 2 (H_MSG_TRUE) if the structuring element is not the empty region. Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_gray_seReadGraySe, gen_disc_seGenDiscSe, read_imageReadImage

Possible successors

gray_dilationGrayDilation, sub_imageSubImage

Alternatives

gray_erosion_rectGrayErosionRect, gray_erosion_shapeGrayErosionShape

See also

gray_openingGrayOpening, gray_closingGrayClosing, erosion1Erosion1, gray_skeletonGraySkeleton

Module🔗

Foundation