thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq (算子)

名称

thinning_seqthinning_seqThinningSeqThinningSeqthinning_seq — 从区域中删除击中或击不中操作的结果(顺序)。

警告

thinning_seqthinning_seqThinningSeqThinningSeqThinningSeqthinning_seq 已过时,仅出于向后兼容性考虑而保留。

签名

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

描述

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

'l'

Skeleton, similar to skeletonskeletonSkeletonSkeletonSkeletonskeleton。This structuring element is also used in morph_skizmorph_skizMorphSkizMorphSkizMorphSkizmorph_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_skeletonMorphSkeletonMorphSkeletonMorphSkeletonmorph_skeleton

'c'

Uniform erosion of the region.

'e'

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

'i'

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

'f'

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

'f2'

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

'h'

A kind of inner boundary, which, however, is thicker than the result of boundaryboundaryBoundaryBoundaryBoundaryboundary, is generated. (Only IterationsIterationsIterationsIterationsiterationsiterations = 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_elementsGolayElementsGolayElementsGolayElementsgolay_elements

执行信息

参数

RegionRegionRegionRegionregionregion (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be processed.

RegionThinRegionThinRegionThinRegionThinregionThinregion_thin (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Result of the thinning operator.

GolayElementGolayElementGolayElementGolayElementgolayElementgolay_element (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Structuring element from the Golay alphabet.

默认值: 'l' "l" "l" "l" "l" "l"

值列表: 'c'"c""c""c""c""c", 'd'"d""d""d""d""d", 'e'"e""e""e""e""e", 'f'"f""f""f""f""f", 'f2'"f2""f2""f2""f2""f2", 'h'"h""h""h""h""h", 'i'"i""i""i""i""i", 'k'"k""k""k""k""k", 'l'"l""l""l""l""l", 'm'"m""m""m""m""m"

IterationsIterationsIterationsIterationsiterationsiterations (输入控制)  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.

默认值: 20

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

值范围: 1 ≤ Iterations Iterations Iterations Iterations iterations iterations (lin)

最小增量: 1

建议增量: 1

复杂度

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

结果

thinning_seqthinning_seqThinningSeqThinningSeqThinningSeqthinning_seq 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入区域为空或不存在时,其行为可通过以下方式设置:

否则,将抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection, union1union1Union1Union1Union1union1, watershedswatershedsWatershedsWatershedsWatershedswatersheds, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_struct_elementsgen_struct_elementsGenStructElementsGenStructElementsGenStructElementsgen_struct_elements, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled

可能的后继

pruningpruningPruningPruningPruningpruning, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, connectionconnectionConnectionConnectionConnectionconnection, complementcomplementComplementComplementComplementcomplement

替代

skeletonskeletonSkeletonSkeletonSkeletonskeleton, morph_skizmorph_skizMorphSkizMorphSkizMorphSkizmorph_skiz, expand_regionexpand_regionExpandRegionExpandRegionExpandRegionexpand_region

另见

hit_or_miss_seqhit_or_miss_seqHitOrMissSeqHitOrMissSeqHitOrMissSeqhit_or_miss_seq, erosion_golayerosion_golayErosionGolayErosionGolayErosionGolayerosion_golay, differencedifferenceDifferenceDifferenceDifferencedifference, thinning_golaythinning_golayThinningGolayThinningGolayThinningGolaythinning_golay, thinningthinningThinningThinningThinningthinning, thickening_seqthickening_seqThickeningSeqThickeningSeqThickeningSeqthickening_seq

模块

基础