Skip to content

opening_golayOpeningGolayOpeningGolayopening_golayopening_golayπŸ”—

Short descriptionπŸ”—

opening_golayOpeningGolayOpeningGolayopening_golayopening_golay β€” Open a region with an element from the Golay alphabet.

WarningπŸ”—

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

SignatureπŸ”—

opening_golay( region Region, out region RegionOpening, string GolayElement, integer Rotation )void OpeningGolay( const HObject& Region, HObject* RegionOpening, const HTuple& GolayElement, const HTuple& Rotation )static void HOperatorSet.OpeningGolay( HObject region, out HObject regionOpening, HTuple golayElement, HTuple rotation )def opening_golay( region: HObject, golay_element: str, rotation: int ) -> HObject

Herror opening_golay( const Hobject Region, Hobject* RegionOpening, const char* GolayElement, const Hlong Rotation )

Herror T_opening_golay( const Hobject Region, Hobject* RegionOpening, const Htuple GolayElement, const Htuple Rotation )

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

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

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

HRegion HRegion.OpeningGolay( string golayElement, int rotation )

DescriptionπŸ”—

opening_golayOpeningGolay is defined as a Minkowski subtraction followed by a Minkowski addition. First the Minkowski subtraction of the input region (Regionregionregion) with the structuring element from the Golay alphabet defined by GolayElementgolayElementgolay_element and Rotationrotationrotation is computed. Then the Minkowski addition 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.

opening_golayOpeningGolay serves to eliminate regions 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 opened.

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

Opened 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πŸ”—

opening_golayOpeningGolay 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

opening_segOpeningSeg, openingOpening

See also

erosion_golayErosionGolay, dilation_golayDilationGolay, closing_golayClosingGolay, hit_or_miss_golayHitOrMissGolay, thinning_golayThinningGolay, thickening_golayThickeningGolay, golay_elementsGolayElements

ModuleπŸ”—

Foundation