opening ( Region, StructElement : RegionOpening : : )

Open a region.

An opening operation is defined as an erosion followed by a Minkowsi addition. By applying opening to a region, larger structures remain mostly intact, while small structures like lines or points are eliminated. In contrast, a closing operation results in small gaps being retained or filled up (see closing).

opening serves to eliminate small regions (smaller than StructElement) and to smooth the boundaries of a region. The position of StructElement is meaningless, since an opening operation is invariant with respect to the choice of the reference point.

Structuring elements (StructElement) can be generated with operators such as circle, rectangle1, rectangle2, ellipse, draw_region, store_polygon, store_coord, etc.


Parameters

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

StructElement (input_object)
region -> object
Structuring element (position-invariant).

RegionOpening (output_object)
region(-array) -> object
Opened regions.


Example
/* Large regions in an aerial picture (beech trees or meadows): */
read_image(:Image:'wald1':) >
threshold__(Image:Light:80,255:) >
circle(:StructElement1:100,100,2:) >
circle(:StructElement2:100,100,20:) >
/* close the small gap */
closing(Light,StructElement1:H::) >
/* selecting the large regions */
opening(H,StructElement2:Large::).

/* Selecting of edges with certain orientation: */
read_image(:Image:'fabrik':) >
sobel_amp(Image:Sobel:'sum_abs',3:) >
threshold__(Sobel:Edges:10,255:) >
rectangle2(:StructElement:100,100,3.07819,20,1:) >
opening(Edges,StructElement:Direction::).

Complexity

Let F1 be the area of the input region, and F2 be the area of the structuring element. The the runtime complexity for one region is:

    O(2 * sqrt(F1) * sqrt(F2)) .


Result

opening 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__, connection, union1, watersheds, class_ndim1__, circle, ellipse, rectangle1, rectangle2, draw_region, store_coord, struct_elements, store_filled_polygon


Possible Successors

reduce_domain, select_shape, area_center, connection


Alternatives

minkowski_add1, erosion1, opening_circle


See also

circle, rectangle2, store_polygon



Copyright © 1996-1997 MVTec Software GmbH