Skip to content

erosion_seqErosionSeqErosionSeqerosion_seqerosion_seqπŸ”—

Short descriptionπŸ”—

erosion_seqErosionSeqErosionSeqerosion_seqerosion_seq β€” Erode a region sequentially.

WarningπŸ”—

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

SignatureπŸ”—

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

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

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

HRegion HRegion::ErosionSeq( const HString& GolayElement, Hlong Iterations ) const

HRegion HRegion::ErosionSeq( const char* GolayElement, Hlong Iterations ) const

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

HRegion HRegion.ErosionSeq( string golayElement, int iterations )

DescriptionπŸ”—

erosion_seqErosionSeq computes the sequential erosion of the input region Regionregionregion with the selected structuring element GolayElementgolayElementgolay_element from the Golay alphabet. This is done by executing the operator erosion_golayErosionGolay with all rotations of the structuring element Iterationsiterationsiterations times. The following structuring elements can be selected:

β€˜l’, β€˜d’, β€˜c’, β€˜f’, β€˜h’, β€˜k’.

Only the β€œforeground elements” (even rotation numbers) are used. The elements β€˜i’ and β€˜e’ result in unchanged output regions. The elements β€˜l’, β€˜m’ and β€˜f2’ are identical for the foreground. The Golay elements, together with all possible rotations, are described with the operator golay_elementsGolayElements.

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

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

Eroded 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', 'f', 'h', 'k', 'l'"c", "d", "f", "h", "k", "l"

Iterationsiterationsiterations (input_control) 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

ComplexityπŸ”—

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

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

ResultπŸ”—

erosion_seqErosionSeq 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, watershedsWatersheds, class_ndim_normClassNdimNorm

Possible successors

connectionConnection, reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter

Alternatives

erosion_golayErosionGolay, erosion1Erosion1, erosion2Erosion2

See also

dilation_seqDilationSeq, hit_or_miss_seqHitOrMissSeq, thinning_seqThinningSeq

ModuleπŸ”—

Foundation