Skip to content

junctions_skeletonJunctionsSkeletonJunctionsSkeletonjunctions_skeletonjunctions_skeleton🔗

Short description🔗

junctions_skeletonJunctionsSkeletonJunctionsSkeletonjunctions_skeletonjunctions_skeleton — Find junctions and end points in a skeleton.

Signature🔗

junctions_skeleton( region Region, out region EndPoints, out region JuncPoints )void JunctionsSkeleton( const HObject& Region, HObject* EndPoints, HObject* JuncPoints )static void HOperatorSet.JunctionsSkeleton( HObject region, out HObject endPoints, out HObject juncPoints )def junctions_skeleton( region: HObject ) -> Tuple[HObject, HObject]

Herror junctions_skeleton( const Hobject Region, Hobject* EndPoints, Hobject* JuncPoints )

Herror T_junctions_skeleton( const Hobject Region, Hobject* EndPoints, Hobject* JuncPoints )

HRegion HRegion::JunctionsSkeleton( HRegion* JuncPoints ) const

HRegion HRegion.JunctionsSkeleton( out HRegion juncPoints )

Description🔗

junctions_skeletonJunctionsSkeleton detects junctions and end points in a skeleton (see skeletonSkeleton). The junctions in the input region Regionregionregion are output as a region in JuncPointsjuncPointsjunc_points, while the end points are output as a region in EndPointsendPointsend_points.

To obtain reasonable results with junctions_skeletonJunctionsSkeleton the input region Regionregionregion must not contain lines which are more than one pixel wide. Regions obtained by skeletonSkeleton meet this condition, while regions obtained by morph_skeletonMorphSkeleton do not meet this condition in general.

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

Input skeletons.

EndPointsendPointsend_points (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

Extracted end points.

Number of elements: EndPoints == Region

JuncPointsjuncPointsjunc_points (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

Extracted junctions.

Number of elements: JuncPoints == Region

Example🔗

(HDevelop)

* non-connected branches of a skeleton
skeleton(Region,Skeleton)
junctions_skeleton(Skeleton,EPoints,JPoints)
difference(Skeleton,JPoints,Rows)
set_system('neighborhood',4)
connection(Rows,Parts)
(C)
/* non-connected branches of a skeleton */
skeleton(Region,&Skeleton)\;
junctions_skeleton(Skeleton,&EPoints,&JPoints)\;
difference(Skeleton,JPoints,&Rows)\;
connection(Rows,&Parts)\;

Complexity🔗

Let \(F\) be the area of the input region. Then the runtime complexity is \(O(F)\).

Result🔗

junctions_skeletonJunctionsSkeleton always returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<'true'/'false'>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

skeletonSkeleton

Possible successors

area_centerAreaCenter, connectionConnection, get_region_pointsGetRegionPoints, differenceDifference

See also

pruningPruning, split_skeleton_regionSplitSkeletonRegion

Module🔗

Foundation