Skip to content

gray_closingGrayClosingGrayClosinggray_closinggray_closing🔗

Short description🔗

gray_closingGrayClosingGrayClosinggray_closinggray_closing — Perform a gray value closing on an image.

Signature🔗

gray_closing( image Image, image SE, out image ImageClosing )void GrayClosing( const HObject& Image, const HObject& SE, HObject* ImageClosing )static void HOperatorSet.GrayClosing( HObject image, HObject SE, out HObject imageClosing )def gray_closing( image: HObject, se: HObject ) -> HObject

Herror gray_closing( const Hobject Image, const Hobject SE, Hobject* ImageClosing )

Herror T_gray_closing( const Hobject Image, const Hobject SE, Hobject* ImageClosing )

HImage HImage::GrayClosing( const HImage& SE ) const

HImage HImage.GrayClosing( HImage SE )

Description🔗

gray_closingGrayClosing applies a gray value closing 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 closing of an image \(i\) with a structuring element \(s\) is defined as

\[\begin{eqnarray*} i \bullet s = (i \oplus s) \ominus \breve{s} \enspace , \end{eqnarray*}\]

i.e., a dilation of the image with \(s\) followed by an erosion with the transposed structuring element (see gray_dilationGrayDilation and gray_erosionGrayErosion). For the generation of structuring elements, see read_gray_seReadGraySe.

The gray value closing 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.

ImageClosingimageClosingimage_closing (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-closed image.

Result🔗

gray_closingGrayClosing 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

Alternatives

dual_rankDualRank, gray_closing_rectGrayClosingRect, gray_closing_shapeGrayClosingShape

See also

closingClosing, gray_dilationGrayDilation, gray_erosionGrayErosion

Module🔗

Foundation