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

opening_rectangle1opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1 (Operator)

Name

opening_rectangle1opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1 — Open a region with a rectangular structuring element.

Signature

opening_rectangle1(Region : RegionOpening : Width, Height : )

Herror opening_rectangle1(const Hobject Region, Hobject* RegionOpening, const Hlong Width, const Hlong Height)

Herror T_opening_rectangle1(const Hobject Region, Hobject* RegionOpening, const Htuple Width, const Htuple Height)

Herror opening_rectangle1(Hobject Region, Hobject* RegionOpening, const HTuple& Width, const HTuple& Height)

HRegion HRegion::OpeningRectangle1(const HTuple& Width, const HTuple& Height) const

HRegionArray HRegionArray::OpeningRectangle1(const HTuple& Width, const HTuple& Height) const

void HOperatorSetX.OpeningRectangle1(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionOpening, [in] VARIANT Width, [in] VARIANT Height)

IHRegionX* HRegionX.OpeningRectangle1(
[in] VARIANT Width, [in] VARIANT Height)

static void HOperatorSet.OpeningRectangle1(HObject region, out HObject regionOpening, HTuple width, HTuple height)

HRegion HRegion.OpeningRectangle1(HTuple width, HTuple height)

HRegion HRegion.OpeningRectangle1(int width, int height)

Description

opening_rectangle1opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1 performs an erosion_rectangle1erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1 followed by a dilation_rectangle1dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1 on the input region RegionRegionRegionRegionregion. The size of the rectangular structuring element is determined by the parameters WidthWidthWidthWidthwidth and HeightHeightHeightHeightheight. As is the case for all openingopeningopeningOpeningOpening variants, larger structures are preserved, while small regions like lines or points are eliminated.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions to be opened.

RegionOpeningRegionOpeningRegionOpeningRegionOpeningregionOpening (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Opened regions.

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Width of the structuring rectangle.

Default value: 10

Suggested values: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

Typical range of values: 1 ≤ Width Width Width Width width ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Height of the structuring rectangle.

Default value: 10

Suggested values: 1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 25, 33, 45, 60, 110, 150, 200

Typical range of values: 1 ≤ Height Height Height Height height ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

Complexity

Let F1 be the area of an input region and H be the height of the rectangle. Then the runtime complexity for one region is:

       O(2 * sqrt(F1) * ld(H)) .

Result

opening_rectangle1opening_rectangle1opening_rectangle1OpeningRectangle1OpeningRectangle1 returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty or no input region can be set via:

Otherwise, an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, watershedswatershedswatershedsWatershedsWatersheds, class_ndim_normclass_ndim_normclass_ndim_normClassNdimNormClassNdimNorm

Possible Successors

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain, select_shapeselect_shapeselect_shapeSelectShapeSelectShape, area_centerarea_centerarea_centerAreaCenterAreaCenter, connectionconnectionconnectionConnectionConnection

Alternatives

openingopeningopeningOpeningOpening, gen_rectangle1gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1, dilation_rectangle1dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1, erosion_rectangle1erosion_rectangle1erosion_rectangle1ErosionRectangle1ErosionRectangle1

See also

opening_segopening_segopening_segOpeningSegOpeningSeg, opening_golayopening_golayopening_golayOpeningGolayOpeningGolay

Module

Foundation


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