Herror ::thickening (
    Hobject Region,
    Hobject StructElement1,
    Hobject StructElement2,
    Hobject *RegionThick,
    const HTuple &Row,
    const HTuple &Column,
    const HTuple &Iterations
)
HRegion HRegion::Thickening (
    const HRegion &StructElement1,
    const HRegion &StructElement2,
    const HTuple &Row,
    const HTuple &Column,
    const HTuple &Iterations
) const
HRegionArray HRegionArray::Thickening (
    const HRegion &StructElement1,
    const HRegion &StructElement2,
    const HTuple &Row,
    const HTuple &Column,
    const HTuple &Iterations
) const

Add the result of a hit-or-miss operation to a region.

::thickening performs a thickening of the input regions using morphological operations. The operator first applies a hit-or-miss-transformation to Region (cf.::hit_or_miss), and then adds the detected points to the input region. The parameter Iterations determines the number of iterations performed.

For the choice of the structuring elements StructElement1 and StructElement2, as well as for Row and Column, the same restrictions described under ::hit_or_miss apply.

The structuring elements (StructElement1 and StructElement2) can be generated by calling ::golay_elements, for example.


Attention

If the reference point is contained in StructElement1 the input region remains unchanged.


Parameters

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

StructElement1 (input_object)
region -> Hobject: HRegion
Structuring element for the foreground.

StructElement2 (input_object)
region -> Hobject: HRegion
Structuring element for the background.

RegionThick (output_object)
region(-array) -> Hobject * : HRegion(Array)
Result of the thickening operator.

Row (input_control)
point.y -> HTuple.long
Row coordinate of the reference point.
Default value: 16
Suggested values: 0, 2, 4, 8, 16, 32, 128
Typical range of values: 0 <= Row <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

Column (input_control)
point.x -> HTuple.long
Column coordinate of the reference point.
Default value: 16
Suggested values: 0, 2, 4, 8, 16, 32, 128
Typical range of values: 0 <= Column <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

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, 70, 100, 200, 400
Typical range of values: 1 <= Iterations
Minimum increment: 1
Recommended increment: 1


Complexity

Let F be the area of an input region, F1 the area of the structuring element 1, and F2 the area of the structuring element 2. Then the runtime complexity for one object is:

      O(Iterations * sqrt(F) * (sqrt(F1) + sqrt(F2))) .


Result

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

::golay_elements, ::threshold, ::regiongrowing, ::connection, ::union1, ::watersheds, ::class_ndim_norm, ::gen_circle, ::gen_ellipse, ::gen_rectangle1, ::gen_rectangle2, ::draw_region, ::gen_region_points, ::gen_struct_elements, ::gen_region_polygon_filled


Possible Successors

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


Alternatives

::thickening_golay, ::thickening_seq


See also

::hit_or_miss


Module

Morphology



Copyright © 1996-2002 MVTec Software GmbH