Skip to content

erosion_golayerosion_golayErosionGolayErosionGolayerosion_golayerosion_golay🔗

Short description🔗

erosion_golayerosion_golayErosionGolayErosionGolayerosion_golayerosion_golay — Erode a region with an element from the Golay alphabet.

Warning🔗

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

Signature🔗

erosion_golay( region Region, out region RegionErosion, string GolayElement, integer Iterations, integer Rotation )erosion_golay( Region : RegionErosion : GolayElement, Iterations, Rotation : )void ErosionGolay( const HObject& Region, HObject* RegionErosion, const HTuple& GolayElement, const HTuple& Iterations, const HTuple& Rotation )static void HOperatorSet.ErosionGolay( HObject region, out HObject regionErosion, HTuple golayElement, HTuple iterations, HTuple rotation )def erosion_golay( region: HObject, golay_element: str, iterations: int, rotation: int ) -> HObject

Herror erosion_golay( const Hobject Region, Hobject* RegionErosion, const char* GolayElement, const Hlong Iterations, const Hlong Rotation )

Herror T_erosion_golay( const Hobject Region, Hobject* RegionErosion, const Htuple GolayElement, const Htuple Iterations, const Htuple Rotation )

HRegion HRegion::ErosionGolay( const HString& GolayElement, Hlong Iterations, Hlong Rotation ) const

HRegion HRegion::ErosionGolay( const char* GolayElement, Hlong Iterations, Hlong Rotation ) const

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

HRegion HRegion.ErosionGolay( string golayElement, int iterations, int rotation )

Description🔗

erosion_golayErosionGolay erodes a region with the selected element GolayElementgolayElementgolay_element from the Golay alphabet. 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. The operator works by shifting the structuring element over the region to be processed (Regionregionregion). For all positions of the structuring element fully contained in the region, the corresponding reference point (relative to the structuring element) is added to the output region. This means that the intersection of all translations of the structuring element within the region is computed.

The parameter Iterationsiterationsiterations determines the number of iterations which are to be performed with the structuring element. The result of iteration \(n-1\) is used as input for iteration \(n\).

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) → objectobjectHObjectHRegionHObjectHobject

Regions to be eroded.

RegionErosionregionErosionregion_erosion (output_object) region(-array) → objectobjectHObjectHRegionHObjectHobject *

Eroded regions.

GolayElementgolayElementgolay_element (input_control) string → (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"

Iterationsiterationsiterations (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of iterations.

Default: 11
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 501, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50
Value range: 1 ≤ Iterations (lin)
Minimum increment: 1
Recommended increment: 1

Rotationrotationrotation (input_control) integer → (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(3 \cdot \sqrt{F}) \enspace . \end{eqnarray*}\]

Result🔗

erosion_golayErosionGolay returns 2 (H_MSG_TRUE) if all parameters are correct. The clipping according to the global image size is set via the operator set_system('clip_region',<'true'/'false'>). 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, watershedsWatersheds, class_ndim_normClassNdimNorm

Possible successors

reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter, connectionConnection

Alternatives

erosion_seqErosionSeq, erosion1Erosion1, erosion2Erosion2

See also

dilation_golayDilationGolay, opening_golayOpeningGolay, closing_golayClosingGolay, hit_or_miss_golayHitOrMissGolay, thinning_golayThinningGolay, thickening_golayThickeningGolay, golay_elementsGolayElements

Module🔗

Foundation