Skip to content

hit_or_miss_golayhit_or_miss_golayHitOrMissGolayHitOrMissGolayhit_or_miss_golayhit_or_miss_golay🔗

Short description🔗

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

Warning🔗

hit_or_miss_golayHitOrMissGolay is obsolete and is only provided for reasons of backward compatibility.

Signature🔗

hit_or_miss_golay( region Region, out region RegionHitMiss, string GolayElement, integer Rotation )hit_or_miss_golay( Region : RegionHitMiss : GolayElement, Rotation : )void HitOrMissGolay( const HObject& Region, HObject* RegionHitMiss, const HTuple& GolayElement, const HTuple& Rotation )static void HOperatorSet.HitOrMissGolay( HObject region, out HObject regionHitMiss, HTuple golayElement, HTuple rotation )def hit_or_miss_golay( region: HObject, golay_element: str, rotation: int ) -> HObject

Herror hit_or_miss_golay( const Hobject Region, Hobject* RegionHitMiss, const char* GolayElement, const Hlong Rotation )

Herror T_hit_or_miss_golay( const Hobject Region, Hobject* RegionHitMiss, const Htuple GolayElement, const Htuple Rotation )

HRegion HRegion::HitOrMissGolay( const HString& GolayElement, Hlong Rotation ) const

HRegion HRegion::HitOrMissGolay( const char* GolayElement, Hlong Rotation ) const

HRegion HRegion::HitOrMissGolay( const wchar_t* GolayElement, Hlong Rotation ) const (Windows only)

HRegion HRegion.HitOrMissGolay( string golayElement, int rotation )

Description🔗

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

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

The rotation number Rotationrotationrotation 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 Rotationrotationrotation are valid for any Golay element.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

Regionregionregion (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject

Regions to be processed.

RegionHitMissregionHitMissregion_hit_miss (output_object) region(-array) → objectobjectHObjectHRegionHObjectHobject *

Result of the hit-or-miss operation.

GolayElementgolayElementgolay_element (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Structuring element from the Golay alphabet.

Default: 'h'"h"
List of values: 'c', 'd', 'e', 'f', 'f2', 'h', 'i', 'k', 'l', 'm'"c", "d", "e", "f", "f2", "h", "i", "k", "l", "m"

Rotationrotationrotation (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Rotation of the Golay element. Depending on the element, not all rotations are valid.

Default: 00
List of values: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 150, 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:

\[\begin{eqnarray*} O(6 \cdot \sqrt{F}) \enspace . \end{eqnarray*}\]

Result🔗

hit_or_miss_golayHitOrMissGolay returns 2 (H_MSG_TRUE) if all parameters are correct. The clipping according to the global image size is set via the operator set_system('clip_region',<'true'/'false'>). The behavior in case of empty or no input region can be set via:

  • no region: set_system('no_object_result',<RegionResult>)

  • empty region: set_system('empty_region_result',<RegionResult>)

Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, regiongrowingRegiongrowing, connectionConnection, union1Union1, watershedsWatersheds, class_ndim_normClassNdimNorm

Possible successors

reduce_domainReduceDomain, select_shapeSelectShape, area_centerAreaCenter, connectionConnection

Alternatives

hit_or_miss_seqHitOrMissSeq, hit_or_missHitOrMiss

See also

erosion_golayErosionGolay, dilation_golayDilationGolay, opening_golayOpeningGolay, closing_golayClosingGolay, thinning_golayThinningGolay, thickening_golayThickeningGolay, golay_elementsGolayElements

Module🔗

Foundation