HALCON Reference Manual 10.0.2
Table of Contents / Morphology / Region ClassesClassesClasses | | | Operators

golay_elementsgolay_elementsgolay_elementsGolayElementsGolayElements (Operator)

Name

golay_elementsgolay_elementsgolay_elementsGolayElementsGolayElements — Generate the structuring elements of the Golay alphabet.

Signature

golay_elements( : StructElement1, StructElement2 : GolayElement, Rotation, Row, Column : )

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)

Herror golay_elements(Hobject* StructElement1, Hobject* StructElement2, const HTuple& GolayElement, const HTuple& Rotation, const HTuple& Row, const HTuple& Column)

HRegion HRegion::GolayElements(HRegion* StructElement2, const HTuple& GolayElement, const HTuple& Rotation, const HTuple& Row, const HTuple& Column)

void HOperatorSetX.GolayElements(
[out] IHUntypedObjectX*StructElement1, [out] IHUntypedObjectX*StructElement2, [in] VARIANT GolayElement, [in] VARIANT Rotation, [in] VARIANT Row, [in] VARIANT Column)

IHRegionX* HRegionX.GolayElements(
[in] BSTR GolayElement, [in] Hlong Rotation, [in] Hlong Row, [in] Hlong Column)

static void HOperatorSet.GolayElements(out HObject structElement1, out HObject structElement2, HTuple golayElement, HTuple rotation, HTuple row, HTuple column)

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

Description

golay_elementsgolay_elementsgolay_elementsGolayElementsGolayElements generates the structuring elements from the Golay alphabet. The parameter GolayElementGolayElementGolayElementGolayElementgolayElement determines the name of the structuring element, while RotationRotationRotationRotationrotation determines its rotation. The structuring elements are intended for use in hit_or_misshit_or_misshit_or_missHitOrMissHitOrMiss: In StructElement1StructElement1StructElement1StructElement1structElement1 the structuring element for the foreground is returned, while in StructElement2StructElement2StructElement2StructElement2structElement2 the structuring element for the background is returned. RowRowRowRowrow and ColumnColumnColumnColumncolumn 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_elementsgolay_elementsgolay_elementsGolayElementsGolayElements only even values are accepted, and determine the Golay element for StructElement1StructElement1StructElement1StructElement1structElement1. The next larger odd value is used for StructElement2StructElement2StructElement2StructElement2structElement2. 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_elementsgolay_elementsgolay_elementsGolayElementsGolayElements). The element 'e' has only four possible rotations, and hence the rotation must be between 0 and 7 (for golay_elementsgolay_elementsgolay_elementsGolayElementsGolayElements 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

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)

Parallelization

Parameters

StructElement1StructElement1StructElement1StructElement1structElement1 (output_object)  region objectHRegionHRegionHRegionXHobject *

Structuring element for the foreground.

StructElement2StructElement2StructElement2StructElement2structElement2 (output_object)  region objectHRegionHRegionHRegionXHobject *

Structuring element for the background.

GolayElementGolayElementGolayElementGolayElementgolayElement (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of the structuring element.

Default value: 'l' "l" "l" "l" "l"

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

RotationRotationRotationRotationrotation (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

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

RowRowRowRowrow (input_control)  point.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Row coordinate of the reference point.

Default value: 16

Suggested values: 0, 16, 32, 128, 256

Typical range of values: 0 ≤ Row Row Row Row row ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

ColumnColumnColumnColumncolumn (input_control)  point.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column coordinate of the reference point.

Default value: 16

Suggested values: 0, 16, 32, 128, 256

Typical range of values: 0 ≤ Column Column Column Column column ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 1

Result

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

Possible Successors

hit_or_misshit_or_misshit_or_missHitOrMissHitOrMiss

Alternatives

gen_region_pointsgen_region_pointsgen_region_pointsGenRegionPointsGenRegionPoints, gen_struct_elementsgen_struct_elementsgen_struct_elementsGenStructElementsGenStructElements, gen_region_polygon_filledgen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilled

See also

dilation_golaydilation_golaydilation_golayDilationGolayDilationGolay, erosion_golayerosion_golayerosion_golayErosionGolayErosionGolay, opening_golayopening_golayopening_golayOpeningGolayOpeningGolay, closing_golayclosing_golayclosing_golayClosingGolayClosingGolay, hit_or_miss_golayhit_or_miss_golayhit_or_miss_golayHitOrMissGolayHitOrMissGolay, thickening_golaythickening_golaythickening_golayThickeningGolayThickeningGolay

References

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

Module

Foundation


Table of Contents / Morphology / Region ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH