Skip to content

thinning_seqThinningSeqThinningSeqthinning_seqthinning_seqπŸ”—

Short descriptionπŸ”—

thinning_seqThinningSeqThinningSeqthinning_seqthinning_seq β€” Remove the result of a hit-or-miss operation from a region (sequential).

WarningπŸ”—

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

SignatureπŸ”—

thinning_seq( region Region, out region RegionThin, string GolayElement, integer Iterations )void ThinningSeq( const HObject& Region, HObject* RegionThin, const HTuple& GolayElement, const HTuple& Iterations )static void HOperatorSet.ThinningSeq( HObject region, out HObject regionThin, HTuple golayElement, HTuple iterations )def thinning_seq( region: HObject, golay_element: str, iterations: Union[int, str] ) -> HObject

Herror thinning_seq( const Hobject Region, Hobject* RegionThin, const char* GolayElement, const Hlong Iterations )

Herror T_thinning_seq( const Hobject Region, Hobject* RegionThin, const Htuple GolayElement, const Htuple Iterations )

HRegion HRegion::ThinningSeq( const HString& GolayElement, const HTuple& Iterations ) const

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

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

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

HRegion HRegion.ThinningSeq( string golayElement, HTuple iterations )

HRegion HRegion.ThinningSeq( string golayElement, int iterations )

DescriptionπŸ”—

thinning_seqThinningSeq calculates the sequential thinning of the input regions with a structuring element from the Golay alphabet (GolayElementgolayElementgolay_element). To do so, thinning_seqThinningSeq calls the operator thinning_golayThinningGolay with all possible rotations of the structuring element Iterationsiterationsiterations times. If Iterationsiterationsiterations is chosen large enough, the operator calculates the skeleton of a region if the structuring elements β€˜l’ or β€˜m’ are used. For the element β€˜c’ the background and foreground are exchanged in order to have an effect on the interior boundary of a region. If a very large value or β€˜maximal’ is passed for Iterationsiterationsiterations the iteration stops if no more changes occur. The following structuring elements are available:

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

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

Result of the thinning operator.

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

Structuring element from the Golay alphabet.

Default: 'l'"l"
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 / string)HTuple (Hlong / HString)HTuple (int / long / string)Union[int, str]Htuple (Hlong / char*)

Number of iterations. For β€˜f’, β€˜f2’, β€˜h’ and β€˜i’ the only useful value is 1.

Default: 2020
Suggested values: 'maximal', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 70, 100, 150, 200"maximal", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 70, 100, 150, 200
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(Iterations \cdot 6 \cdot \sqrt{F}) \enspace . \end{eqnarray*}\]

ResultπŸ”—

thinning_seqThinningSeq 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, gen_circleGenCircle, gen_ellipseGenEllipse, gen_rectangle1GenRectangle1, gen_rectangle2GenRectangle2, draw_regionDrawRegion, gen_region_pointsGenRegionPoints, gen_struct_elementsGenStructElements, gen_region_polygon_filledGenRegionPolygonFilled

Possible successors

pruningPruning, reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter, connectionConnection, complementComplement

Alternatives

skeletonSkeleton, morph_skizMorphSkiz, expand_regionExpandRegion

See also

hit_or_miss_seqHitOrMissSeq, erosion_golayErosionGolay, differenceDifference, thinning_golayThinningGolay, thinningThinning, thickening_seqThickeningSeq

ModuleπŸ”—

Foundation