Herror ::erosion_seq (
    Hobject Region,
    Hobject *RegionErosion,
    const HTuple &GolayElement,
    const HTuple &Iterations
)
HRegion HRegion::ErosionSeq (
    const HTuple &GolayElement,
    const HTuple &Iterations
) const
HRegionArray HRegionArray::ErosionSeq (
    const HTuple &GolayElement,
    const HTuple &Iterations
) const

Erode a region sequentially.

::erosion_seq computes the sequential erosion of the input region Region with the selected structuring element GolayElement from the Golay alphabet. This is done by executing the operator ::erosion_golay with all rotations of the structuring element Iterations times. The following structuring elements can be selected:

'l', 'd', 'c', 'f', 'h', 'k'.

Only the ``foreground elements'' (even rotation numbers) are used. The elements 'i' and 'e' result in unchanged output regions. The elements 'l', 'm' and 'f2' are identical for the foreground. The Golay elements, together with all possible rotations, are described with the operator ::golay_elements.


Parameters

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

RegionErosion (output_object)
region(-array) -> Hobject * : HRegion(Array)
Eroded regions.

GolayElement (input_control)
string -> HTuple.char *
Structuring element from the Golay alphabet.
Default value: 'h'
List of values: 'l', 'd', 'c', 'f', 'h', 'k'

Iterations (input_control)
integer -> HTuple.long
Number of iterations.
Default value: 1
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 20, 30, 40, 50
Typical range of values: 1 <= Iterations
Minimum increment: 1
Recommended increment: 1


Complexity

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

       O(Iterations * 20 * sqrt(F)) .


Result

::erosion_seq 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

::threshold, ::regiongrowing, ::watersheds, ::class_ndim_norm


Possible Successors

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


Alternatives

::erosion_golay, ::erosion1, ::erosion2


See also

::dilation_seq, ::hit_or_miss_seq, ::thinning_seq


Module

Morphology



Copyright © 1996-2002 MVTec Software GmbH