Herror ::hit_or_miss_golay (
    Hobject Region,
    Hobject *RegionHitMiss,
    const HTuple &GolayElement,
    const HTuple &Rotation
)
HRegion HRegion::HitOrMissGolay (
    const HTuple &GolayElement,
    const HTuple &Rotation
) const
HRegionArray HRegionArray::HitOrMissGolay (
    const HTuple &GolayElement,
    const HTuple &Rotation
) const

Hit-or-miss operation for regions using the Golay alphabet.

::hit_or_miss_golay performs the hit-or-miss-transformation for the input regions Region (using structuring elements from the Golay alphabet). First, an erosion with the foreground of the structuring element GolayElement is done on the input region Region. Then an erosion with the background of the structuring element GolayElement is performed on the complement of the input region. The intersection of the two resulting regions is the result RegionHitMiss of ::hit_or_miss_golay. The following structuring elements are available:

'l', 'm', 'd', 'c', 'e','i', 'f', 'f2', 'h', 'k'.

The rotation number Rotation determines which rotation of the element should be used. The hit-or-miss-transformation selects precisely the points for which the conditions given by the selected Golay element are fulfilled.


Attention

Not all values of Rotation are valid for any Golay element.


Parameters

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

RegionHitMiss (output_object)
region(-array) -> Hobject * : HRegion(Array)
Result of the hit-or-miss operation.

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

Rotation (input_control)
integer -> HTuple.long
Rotation of the Golay element Depending on the element, not all rotations are valid.
Default value: 0
List of values: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15


Complexity

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

       O(6 * sqrt(F)) .


Result

::hit_or_miss_golay 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, ::connection, ::union1, ::watersheds, ::class_ndim_norm


Possible Successors

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


Alternatives

::hit_or_miss_seq, ::hit_or_miss


See also

::erosion_golay, ::dilation_golay, ::opening_golay, ::closing_golay, ::thinning_golay, ::thickening_golay, ::golay_elements


Module

Morphology



Copyright © 1996-2002 MVTec Software GmbH