Herror ::pruning (
    Hobject Region,
    Hobject *RegionPrune,
    const HTuple &Length
)
HRegion HRegion::Pruning (
    const HTuple &Length
) const
HRegionArray HRegionArray::Pruning (
    const HTuple &Length
) const

Prune the branches of a region.

::pruning removes branches from a skeleton (Region) having a length less than Length. All other branches are preserved.


Parameters

Region (input_object)
region(-array) -> Hobject: HRegion(Array)
Regions to be processed.

RegionPrune (output_object)
region(-array) -> Hobject * : HRegion(Array)
Result of the pruning operation.

Length (input_control)
integer -> HTuple.long
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 <= 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

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

  a) no region:    set_system('no_object_result',<RegionResult>)
  b) empty region: set_system('empty_region_result',<RegionResult>)
Otherwise, an exception is raised.


Possible Predecessors

::morph_skiz, ::skeleton, ::thinning_seq


Possible Successors

::reduce_domain, ::select_shape, ::area_center, ::connection


See also

::morph_skeleton, ::junctions_skeleton


Module

Morphology



Copyright © 1996-2002 MVTec Software GmbH