HALCON Reference Manual 10.0.2
Table of Contents / Morphology / Region ClassesClassesClasses | | | Operators

pruningpruningpruningPruningPruning (Operator)

Name

pruningpruningpruningPruningPruning — Prune the branches of a region.

Signature

pruning(Region : RegionPrune : Length : )

Herror pruning(const Hobject Region, Hobject* RegionPrune, const Hlong Length)

Herror T_pruning(const Hobject Region, Hobject* RegionPrune, const Htuple Length)

Herror pruning(Hobject Region, Hobject* RegionPrune, const HTuple& Length)

HRegion HRegion::Pruning(const HTuple& Length) const

HRegionArray HRegionArray::Pruning(const HTuple& Length) const

void HOperatorSetX.Pruning(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionPrune, [in] VARIANT Length)

IHRegionX* HRegionX.Pruning([in] Hlong Length)

static void HOperatorSet.Pruning(HObject region, out HObject regionPrune, HTuple length)

HRegion HRegion.Pruning(int length)

Description

pruningpruningpruningPruningPruning removes branches from a skeleton (RegionRegionRegionRegionregion) having a length less than LengthLengthLengthLengthlength. All other branches are preserved.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions to be processed.

RegionPruneRegionPruneRegionPruneRegionPruneregionPrune (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Result of the pruning operation.

LengthLengthLengthLengthlength (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Length of the branches to be removed.

Default value: 2

Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50

Typical range of values: 1 ≤ Length Length Length Length length ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

Complexity

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

      O(Length * 3 * sqrt(F)) .

Result

pruningpruningpruningPruningPruning 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

morph_skizmorph_skizmorph_skizMorphSkizMorphSkiz, skeletonskeletonskeletonSkeletonSkeleton, thinning_seqthinning_seqthinning_seqThinningSeqThinningSeq

Possible Successors

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain, select_shapeselect_shapeselect_shapeSelectShapeSelectShape, area_centerarea_centerarea_centerAreaCenterAreaCenter, connectionconnectionconnectionConnectionConnection

See also

morph_skeletonmorph_skeletonmorph_skeletonMorphSkeletonMorphSkeleton, junctions_skeletonjunctions_skeletonjunctions_skeletonJunctionsSkeletonJunctionsSkeleton

Module

Foundation


Table of Contents / Morphology / Region ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH