Skip to content

closing_golayClosingGolayClosingGolayclosing_golayclosing_golayπŸ”—

Short descriptionπŸ”—

closing_golayClosingGolayClosingGolayclosing_golayclosing_golay β€” Close a region with an element from the Golay alphabet.

WarningπŸ”—

closing_golayClosingGolay is obsolete and is only provided for reasons of backward compatibility.

SignatureπŸ”—

closing_golay( region Region, out region RegionClosing, string GolayElement, integer Rotation )void ClosingGolay( const HObject& Region, HObject* RegionClosing, const HTuple& GolayElement, const HTuple& Rotation )static void HOperatorSet.ClosingGolay( HObject region, out HObject regionClosing, HTuple golayElement, HTuple rotation )def closing_golay( region: HObject, golay_element: str, rotation: int ) -> HObject

Herror closing_golay( const Hobject Region, Hobject* RegionClosing, const char* GolayElement, const Hlong Rotation )

Herror T_closing_golay( const Hobject Region, Hobject* RegionClosing, const Htuple GolayElement, const Htuple Rotation )

HRegion HRegion::ClosingGolay( const HString& GolayElement, Hlong Rotation ) const

HRegion HRegion::ClosingGolay( const char* GolayElement, Hlong Rotation ) const

HRegion HRegion::ClosingGolay( const wchar_t* GolayElement, Hlong Rotation ) const (Windows only)

HRegion HRegion.ClosingGolay( string golayElement, int rotation )

DescriptionπŸ”—

closing_golayClosingGolay is defined as a Minkowski addition followed by a Minkowski subtraction. First the Minkowski addition of the input region (Regionregionregion) with the structuring element from the Golay alphabet defined by GolayElementgolayElementgolay_element and Rotationrotationrotation is computed. Then the Minkowski subtraction of the result and the structuring element rotated by 180degrees is performed.

The following structuring elements are available:

β€˜l’, β€˜m’, β€˜d’, β€˜c’, β€˜e’, β€˜i’, β€˜f’, β€˜f2’, β€˜h’, β€˜k’.

The rotation number Rotationrotationrotation determines which rotation of the element should be used, and whether the foreground (even) or background version (odd) of the selected element should be used. The Golay elements, together with all possible rotations, are described with the operator golay_elementsGolayElements.

closing_golayClosingGolay serves to close holes smaller than the structuring element, and to smooth regions’ boundaries.

AttentionπŸ”—

Not all values of Rotationrotationrotation are valid for any Golay element. For some of the values of Rotationrotationrotation, the resulting regions are identical to the input regions.

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 tuple level.

ParametersπŸ”—

Regionregionregion (input_object) region(-array) β†’ objectHObjectHRegionHObjectHobject

Regions to be closed.

RegionClosingregionClosingregion_closing (output_object) region(-array) β†’ objectHObjectHRegionHObjectHobject *

Closed regions.

GolayElementgolayElementgolay_element (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Structuring element from the Golay alphabet.

Default: 'h'"h"
List of values: 'c', 'd', 'e', 'f', 'f2', 'h', 'i', 'k', 'l', 'm'"c", "d", "e", "f", "f2", "h", "i", "k", "l", "m"

Rotationrotationrotation (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Rotation of the Golay element. Depending on the element, not all rotations are valid.

Default: 00
List of values: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 150, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15

ComplexityπŸ”—

Let \(F\) be the area of an input region. Then the runtime complexity for one region is:

\[\begin{eqnarray*} O(6 \cdot \sqrt{F}) \enspace . \end{eqnarray*}\]

ResultπŸ”—

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

  • no region: set_system('no_object_result',<RegionResult>)

  • empty region: set_system('empty_region_result',<RegionResult>)

Otherwise, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

thresholdThreshold, regiongrowingRegiongrowing, connectionConnection, union1Union1, watershedsWatersheds, class_ndim_normClassNdimNorm

Possible successors

reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter, connectionConnection

Alternatives

closingClosing

See also

erosion_golayErosionGolay, dilation_golayDilationGolay, opening_golayOpeningGolay, hit_or_miss_golayHitOrMissGolay, thinning_golayThinningGolay, thickening_golayThickeningGolay, golay_elementsGolayElements

ModuleπŸ”—

Foundation