HALCON Reference Manual 10.0.2
Table of Contents / Morphology / Gray Values ClassesClassesClasses | | | Operators

gray_closing_rectgray_closing_rectgray_closing_rectGrayClosingRectGrayClosingRect (Operator)

Name

gray_closing_rectgray_closing_rectgray_closing_rectGrayClosingRectGrayClosingRect — Perform a gray value closing with a rectangular mask.

Signature

gray_closing_rect(Image : ImageClosing : MaskHeight, MaskWidth : )

Herror gray_closing_rect(const Hobject Image, Hobject* ImageClosing, const Hlong MaskHeight, const Hlong MaskWidth)

Herror T_gray_closing_rect(const Hobject Image, Hobject* ImageClosing, const Htuple MaskHeight, const Htuple MaskWidth)

Herror gray_closing_rect(Hobject Image, Hobject* ImageClosing, const HTuple& MaskHeight, const HTuple& MaskWidth)

HImage HImage::GrayClosingRect(const HTuple& MaskHeight, const HTuple& MaskWidth) const

HImageArray HImageArray::GrayClosingRect(const HTuple& MaskHeight, const HTuple& MaskWidth) const

void HOperatorSetX.GrayClosingRect(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageClosing, [in] VARIANT MaskHeight, [in] VARIANT MaskWidth)

IHImageX* HImageX.GrayClosingRect(
[in] Hlong MaskHeight, [in] Hlong MaskWidth)

static void HOperatorSet.GrayClosingRect(HObject image, out HObject imageClosing, HTuple maskHeight, HTuple maskWidth)

HImage HImage.GrayClosingRect(int maskHeight, int maskWidth)

Description

gray_closing_rectgray_closing_rectgray_closing_rectGrayClosingRectGrayClosingRect applies a gray value closing to the input image ImageImageImageImageimage with a rectangular mask of size (MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight, MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth). The resulting image is returned in ImageClosingImageClosingImageClosingImageClosingimageClosing. If the parameters MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight or MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth are even, they are changed to the next larger odd value. At the border of the image the gray values are mirrored.

The gray value closing of an image i with a rectangular structuring element s is defined as

  i +- s = (i + s) - s ,

i.e., a dilation of the image with s followed by an erosion with s (see gray_dilation_rectgray_dilation_rectgray_dilation_rectGrayDilationRectGrayDilationRect and gray_erosion_rectgray_erosion_rectgray_erosion_rectGrayErosionRectGrayErosionRect).

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte / direction / cyclic / uint2 / int2 / int4 / real)

Input image.

ImageClosingImageClosingImageClosingImageClosingimageClosing (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte / direction / cyclic / uint2 / int2 / int4 / real)

Gray-closed image.

MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight (input_control)  extent.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Height of the filter mask.

Default value: 11

Suggested values: 3, 5, 7, 9, 11, 13, 15

Typical range of values: 3 ≤ MaskHeight MaskHeight MaskHeight MaskHeight maskHeight ≤ 511

Minimum increment: 2

Recommended increment: 2

Restriction: odd(MaskHeight)

MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth (input_control)  extent.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Width of the filter mask.

Default value: 11

Suggested values: 3, 5, 7, 9, 11, 13, 15

Typical range of values: 3 ≤ MaskWidth MaskWidth MaskWidth MaskWidth maskWidth ≤ 511

Minimum increment: 2

Recommended increment: 2

Restriction: odd(MaskWidth)

Result

gray_closing_rectgray_closing_rectgray_closing_rectGrayClosingRectGrayClosingRect 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.

Alternatives

gray_closinggray_closinggray_closingGrayClosingGrayClosing, gray_closing_shapegray_closing_shapegray_closing_shapeGrayClosingShapeGrayClosingShape

See also

closing_rectangle1closing_rectangle1closing_rectangle1ClosingRectangle1ClosingRectangle1, gray_dilation_rectgray_dilation_rectgray_dilation_rectGrayDilationRectGrayDilationRect, gray_erosion_rectgray_erosion_rectgray_erosion_rectGrayErosionRectGrayErosionRect

Module

Foundation


Table of Contents / Morphology / Gray Values ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH