Skip to content

gray_openingGrayOpeningGrayOpeninggray_openinggray_opening🔗

Short description🔗

gray_openingGrayOpeningGrayOpeninggray_openinggray_opening — Perform a gray value opening on an image.

Signature🔗

gray_opening( image Image, image SE, out image ImageOpening )void GrayOpening( const HObject& Image, const HObject& SE, HObject* ImageOpening )static void HOperatorSet.GrayOpening( HObject image, HObject SE, out HObject imageOpening )def gray_opening( image: HObject, se: HObject ) -> HObject

Herror gray_opening( const Hobject Image, const Hobject SE, Hobject* ImageOpening )

Herror T_gray_opening( const Hobject Image, const Hobject SE, Hobject* ImageOpening )

HImage HImage::GrayOpening( const HImage& SE ) const

HImage HImage.GrayOpening( HImage SE )

Description🔗

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

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

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

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

ImageOpeningimageOpeningimage_opening (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-opened image.

Result🔗

gray_openingGrayOpening 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_opening_rectGrayOpeningRect, gray_opening_shapeGrayOpeningShape

See also

openingOpening, gray_dilationGrayDilation, gray_erosionGrayErosion

Module🔗

Foundation