Grey‑Scale Morphological Structuring Elements

A morphological structuring element is a data structure used in morphological operations. A structuring element has an origin, offset values, and a don’t care mask. The structuring element’s offset values are signed grey‑scale values that are added to or subtracted from corresponding pixels in the source image. The result (the maximum of the sums or the minimum of the differences) is sent to the destination image pixel that corresponds to the structuring element’s origin.

A grey‑scale structuring element is implemented as a single 3x3 structuring element or as a linked list of 3x3 structuring elements. To define a grey‑scale structuring element, you specify the following:

  • Offset values (in the range –128 to 127) of each pixel location in the structuring element
  • The origin of the structuring element (any pixel location within the structuring element)
  • An optional don’t care mask

The figure below shows an example of a 3x3 grey‑scale morphological structuring element. Each pixel location in a 3x3 structuring element is identified by a compass position relative to the center (north, south, southeast, center, and so on) and is assigned an offset value. In this example the origin is the center pixel (outlined in bold).

 

3x3 grey‑scale morphological structuring element

The figure below shows the same 3x3 structuring element with a don’t care mask. A don’t care mask specifies which pixel locations in the structuring element are not to be used in the morphological operation. In this example, the mask consists of the shaded pixels NW, NE, SW, and SE, effectively making the 3x3 square structuring element a 3x3 diamond.

 

3x3 structuring element with don’t care mask