Skip to content

golay_elementsGolayElementsGolayElementsgolay_elementsgolay_elementsπŸ”—

Short descriptionπŸ”—

golay_elementsGolayElementsGolayElementsgolay_elementsgolay_elements β€” Generate the structuring elements of the Golay alphabet.

WarningπŸ”—

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

SignatureπŸ”—

golay_elements( out region StructElement1, out region StructElement2, string GolayElement, integer Rotation, point.y Row, point.x Column )void GolayElements( HObject* StructElement1, HObject* StructElement2, const HTuple& GolayElement, const HTuple& Rotation, const HTuple& Row, const HTuple& Column )static void HOperatorSet.GolayElements( out HObject structElement1, out HObject structElement2, HTuple golayElement, HTuple rotation, HTuple row, HTuple column )def golay_elements( golay_element: str, rotation: int, row: int, column: int ) -> Tuple[HObject, HObject]

Herror golay_elements( Hobject* StructElement1, Hobject* StructElement2, const char* GolayElement, const Hlong Rotation, const Hlong Row, const Hlong Column )

Herror T_golay_elements( Hobject* StructElement1, Hobject* StructElement2, const Htuple GolayElement, const Htuple Rotation, const Htuple Row, const Htuple Column )

HRegion HRegion::GolayElements( const HString& GolayElement, Hlong Rotation, Hlong Row, Hlong Column )

HRegion HRegion::GolayElements( const char* GolayElement, Hlong Rotation, Hlong Row, Hlong Column )

HRegion HRegion::GolayElements( const wchar_t* GolayElement, Hlong Rotation, Hlong Row, Hlong Column ) (Windows only)

HRegion HRegion.GolayElements( string golayElement, int rotation, int row, int column )

DescriptionπŸ”—

golay_elementsGolayElements generates the structuring elements from the Golay alphabet. The parameter GolayElementgolayElementgolay_element determines the name of the structuring element, while Rotationrotationrotation determines its rotation. The structuring elements are intended for use in hit_or_missHitOrMiss: In StructElement1structElement1struct_element_1 the structuring element for the foreground is returned, while in StructElement2structElement2struct_element_2 the structuring element for the background is returned. Rowrowrow and Columncolumncolumn determine the reference point of the structuring element.

The rotations are numbered from 0 to 15. This does not mean, however, that there are 16 different rotations: Even values denote rotations of the foreground elements, while odd values denote rotations of the background elements.

For golay_elementsGolayElements only even values are accepted, and determine the Golay element for StructElement1structElement1struct_element_1. The next larger odd value is used for StructElement2structElement2struct_element_2. There are no rotations for the Golay elements β€˜h’ and β€˜i’. Therefore, only the values 0 and 1 are possible as β€œrotations” (and hence only 0 for golay_elementsGolayElements). The element β€˜e’ has only four possible rotations, and hence the rotation must be between 0 and 7 (for golay_elementsGolayElements the values 0, 2, 4, or 6 must be used).

The tables below show the elements of the Golay alphabet with all possible rotations. The characters used have the following meaning:

    *  Foreground pixel
    o  Background pixel
    .  Don't care pixel

[\(\bullet\)] Foreground pixel

[\(\circ\)] Background pixel

[\(\cdot\)] Don’t care pixel

The names of the elements and their rotation numbers are displayed below the respective element. The elements with even number contain the foreground pixels, while the elements with odd numbers contain the background pixels.

    * * *
    * * *
    * * *
    h(0,1)

    o o o
    o o o
    o o o
    i(0,1)

    . . .    o o .    o o o    . o o
    o * o    o * .    o * o    . * o
    o o o    o o .    . . .    . o o
    e(0,1)   e(2,3)   e(4,5)   e(6,7)

               o                 *                 *                  o
    o o o    . . o    * . o    * . .    * * *    . . *    o . *     o . .
    . * .  * . * . o  * * o  * . * . o  . * .  o . * . *  o * *   o . *   *
    * * *    * . .    * . o    . . o    o o o    o . .    o . *     . . *
               *                 o                 o                  *
    l(0,1)  l(2,3)    l(4,5)  l(6,7)    l(8,9) l(10,11)  l(12,13) l(14,15)

               *                 *                 .                  .
    * . .    * . .    * * *    . . *    . . *    o . .    . o .     . . o
    * * o  * . * . .  . * .  . . * . *  o * *  . . * . *  . * .   * . * . .
    * . .    . . o    . o .    o . .    . . *    . . *    * * *     * . .
               .                 .                 *                  *
    m(0,1)  m(2,3)    m(4,5)  m(6,7)    m(8,9) m(10,11)  m(12,13) m(14,15)

               o                 o                 .                  .
    o . .    o . .    o o o    . . o    . . o    * . .    . * .     . . *
    o * *  o . * . .  . * .  . . * . o  * * o  . . * . o  . * .   o . * . .
    o . .    . . *    . * .    * . .    . . o    . . o    o o o     o . .
               .                 .                 o                  o
    d(0,1)  d(2,3)    d(4,5)  d(6,7)    d(8,9) d(10,11)  d(12,13) d(14,15)

               *                 *                 o                  o
    * o o    o * o    * o *    o * o    o o *    * . o    o * o     o . *
    o * *  * * * . o  o * o  o . * * *  * * o  o . * * *  o * o   * * * . o
    * o o    o . *    o * o    * . o    o o *    o * o    * o *     o * o
               o                 o                 *                  *
    f(0,1)  f(2,3)    f(4,5)  f(6,7)    f(8,9) f(10,11)  f(12,13) f(14,15)

               *                 o                 o                  *
    * * *    o . *    o o *    o . o    o o o    o . o    * o o     * . o
    o * o  o . * . *  o * *  o . * . *  o * o  * . * . o  * * o   * . * . o
    o o o    o . o    o o *    o . *    * * *    * . o    * o o     o . o
               o                 *                 *                  o
    f2(0,1) f2(2,3)  f2(4,5)  f2(6,7)  f2(8,9) f2(10,11)f2(12,13) f2(14,15)

               *                 .                 .                  o
    * * o    . . *    . . *    . . .    . . .    . . .    o . .     * . .
    . * .  . . * . o  . * *  . . * . *  . * .  o . * . .  * * .   * . * . .
    . . .    . . .    . . o    . . *    o * *    * . .    * . .     . . .
               .                 o                 *                  .
    k(0,1)  k(2,3)    k(4,5)  k(6,7)    k(8,9) k(10,11)  k(12,13) k(14,15)

    * . .      *      * * *      *      . . *      .      . . .       .
    * o .    * . .    . o .    . . *    . o *    . . .    . o .     . . .
    * . .  * . o . .  . . .  . . o . *  . . *  . . o   *  * * *   *   o . .
             . . .             . . .             . . *              * . .
               .                 .                 *                  *
    c(0,1)  c(2,3)    c(4,5)  c(6,7)    c(8,9) c(10,11)  c(12,13) c(14,15)

Execution informationπŸ”—

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

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

  • Processed without parallelization.

ParametersπŸ”—

StructElement1structElement1struct_element_1 (output_object) region β†’ objectHObjectHRegionHObjectHobject *

Structuring element for the foreground.

StructElement2structElement2struct_element_2 (output_object) region β†’ objectHObjectHRegionHObjectHobject *

Structuring element for the background.

GolayElementgolayElementgolay_element (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the structuring element.

Default: 'l'"l"
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)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, 140, 2, 4, 6, 8, 10, 12, 14

Rowrowrow (input_control) point.y β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Row coordinate of the reference point.

Default: 1616
Suggested values: 0, 16, 32, 128, 2560, 16, 32, 128, 256
Value range: 0 ≀ Row ≀ 511 (lin)
Minimum increment: 1
Recommended increment: 1

Columncolumncolumn (input_control) point.x β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Column coordinate of the reference point.

Default: 1616
Suggested values: 0, 16, 32, 128, 2560, 16, 32, 128, 256
Value range: 0 ≀ Column ≀ 511 (lin)
Minimum increment: 1
Recommended increment: 1

ResultπŸ”—

golay_elementsGolayElements returns 2 (H_MSG_TRUE) if all parameters are correct. Otherwise, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

hit_or_missHitOrMiss

Alternatives

gen_region_pointsGenRegionPoints, gen_struct_elementsGenStructElements, gen_region_polygon_filledGenRegionPolygonFilled

See also

dilation_golayDilationGolay, erosion_golayErosionGolay, opening_golayOpeningGolay, closing_golayClosingGolay, hit_or_miss_golayHitOrMissGolay, thickening_golayThickeningGolay

ReferencesπŸ”—

J. Serra: β€œImage Analysis and Mathematical Morphology”. Volume I. Academic Press, 1982

ModuleπŸ”—

Foundation