thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq (Operator)

Name

thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq — Remove the result of a hit-or-miss operation from a region (sequential).

Warning

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

Signature

thinning_seq(Region : RegionThin : GolayElement, Iterations : )

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)

void ThinningSeq(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)

static void HOperatorSet.ThinningSeq(HObject region, out HObject regionThin, HTuple golayElement, HTuple iterations)

HRegion HRegion.ThinningSeq(string golayElement, HTuple iterations)

HRegion HRegion.ThinningSeq(string golayElement, int iterations)

def thinning_seq(region: HObject, golay_element: str, iterations: Union[int, str]) -> HObject

Description

thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq calculates the sequential thinning of the input regions with a structuring element from the Golay alphabet (GolayElementGolayElementGolayElementgolayElementgolay_element). To do so, thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq calls the operator thinning_golaythinning_golayThinningGolayThinningGolaythinning_golay with all possible rotations of the structuring element IterationsIterationsIterationsiterationsiterations times. If IterationsIterationsIterationsiterationsiterations 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 IterationsIterationsIterationsiterationsiterations the iteration stops if no more changes occur. The following structuring elements are available:

'l'

Skeleton, similar to skeletonskeletonSkeletonSkeletonskeleton. This structuring element is also used in morph_skizmorph_skizMorphSkizMorphSkizmorph_skiz.

'm'

A skeleton with many “hairs” and multiple (parallel) branches.

'd'

A skeleton without multiple branches, but with many gaps, similar to morph_skeletonmorph_skeletonMorphSkeletonMorphSkeletonmorph_skeleton.

'c'

Uniform erosion of the region.

'e'

One pixel wide lines are shortened. This structuring element is also used in morph_skizmorph_skizMorphSkizMorphSkizmorph_skiz.

'i'

Isolated points are removed. (Only IterationsIterationsIterationsiterationsiterations = 1 is useful.)

'f'

Y-junctions are eliminated. (Only IterationsIterationsIterationsiterationsiterations = 1 is useful.)

'f2'

One pixel long branches and corners are removed. (Only IterationsIterationsIterationsiterationsiterations = 1 is useful.)

'h'

A kind of inner boundary, which, however, is thicker than the result of boundaryboundaryBoundaryBoundaryboundary, is generated. (Only IterationsIterationsIterationsiterationsiterations = 1 is useful.)

'k'

Junction points are eliminated, but also new ones are generated.

The Golay elements, together with all possible rotations, are described with the operator golay_elementsgolay_elementsGolayElementsGolayElementsgolay_elements.

Execution Information

Parameters

RegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Regions to be processed.

RegionThinRegionThinRegionThinregionThinregion_thin (output_object)  region(-array) objectHRegionHObjectHObjectHobject *

Result of the thinning operator.

GolayElementGolayElementGolayElementgolayElementgolay_element (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Structuring element from the Golay alphabet.

Default: 'l' "l" "l" "l" "l"

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

IterationsIterationsIterationsiterationsiterations (input_control)  integer HTupleUnion[int, str]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Number of iterations. For 'f', 'f2', 'h' and 'i' the only useful value is 1.

Default: 20

Suggested values: 'maximal'"maximal""maximal""maximal""maximal", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 70, 100, 150, 200

Value range: 1 ≤ Iterations Iterations Iterations iterations 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:

Result

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

Otherwise, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionconnection, union1union1Union1Union1union1, watershedswatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormclass_ndim_norm, gen_circlegen_circleGenCircleGenCirclegen_circle, gen_ellipsegen_ellipseGenEllipseGenEllipsegen_ellipse, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2, draw_regiondraw_regionDrawRegionDrawRegiondraw_region, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsgen_region_points, gen_struct_elementsgen_struct_elementsGenStructElementsGenStructElementsgen_struct_elements, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled

Possible Successors

pruningpruningPruningPruningpruning, reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionconnection, complementcomplementComplementComplementcomplement

Alternatives

skeletonskeletonSkeletonSkeletonskeleton, morph_skizmorph_skizMorphSkizMorphSkizmorph_skiz, expand_regionexpand_regionExpandRegionExpandRegionexpand_region

See also

hit_or_miss_seqhit_or_miss_seqHitOrMissSeqHitOrMissSeqhit_or_miss_seq, erosion_golayerosion_golayErosionGolayErosionGolayerosion_golay, differencedifferenceDifferenceDifferencedifference, thinning_golaythinning_golayThinningGolayThinningGolaythinning_golay, thinningthinningThinningThinningthinning, thickening_seqthickening_seqThickeningSeqThickeningSeqthickening_seq

Module

Foundation