erosion_rectangle1 ( Region : RegionErosion : Width, Height : )

Erode a region with a rectangular structuring element.

erosion_rectangle1 applies an erosion with a rectangular structuring element to the input regions Region. The size of the structuring rectangle is Width x Height. The operator results in the region being reduced, and the elimination of areas smaller than the rectangular mask.

erosion_rectangle1 is a very fast operation because the height of the rectangle only enters logarithmically into the runtime complexity, while the width does not enter at all. This leads to excellent runtime efficiency, even in the case of very large (edge length > 100).

Regions containing small connecting strips between large areas are separated only seeminly. They remain logically one region.


Parameters

Region (input_object)
region(-array) -> object
Regions to be eroded.

RegionErosion (output_object)
region(-array) -> object
Eroded regions.

Width (input_control)
extent.x -> integer
Width of the structuring rectangle.
Default value: 10
Suggested values: 1, 2, 3, 4, 6, 10, 15, 20, 30, 50, 70, 100
Range of values: 1 <= Width <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

Height (input_control)
extent.y -> integer
Height of the structuring rectangle.
Default value: 10
Suggested values: 1, 2, 3, 4, 6, 10, 15, 20, 30, 50, 70, 100
Range of values: 1 <= Height <= 511 (lin)
Minimum increment: 1
Recommended increment: 1


Complexity

Let F1 be the area of an input region and H be the height of the rectangle. Then the runtime for one region is:

       O(sqrt(F1) * ld(H)) .


Result

erosion_rectangle1 returns 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_ndim1__


Possible Successors

reduce_domain, select_shape, area_center, connection


Alternatives

erosion1, minkowski_sub1


See also

rectangle1



Copyright © 1996-1997 MVTec Software GmbH