ScientiaLux
strataquest Glossary Morphological Operations
BOM Operation

Morphological Operations

Shape processing with structuring elements

View
Definition
The fundamental shape-processing operations from mathematical morphology — erosion, dilation, opening, closing, and derived transforms — that probe and modify image structures using a structuring element, providing the theoretical foundation for many StrataQuest engines.
Structuring Element Probe
A small shape tests and modifies image structures
Erosion & Dilation
The two primitives from which all others derive
Opening & Closing
Erosion+dilation cleans protrusions; dilation+erosion fills gaps
Gray-Scale Extensions
Erosion = local min, dilation = local max

How It Works

Mathematical morphology provides a framework for analyzing and modifying image shapes using a small probe called a structuring element (SE).

Fundamental Operations

OperationDefinitionEffect
ErosionPositions where SE fits entirely within foregroundShrinks objects, removes features smaller than SE, separates touching objects
DilationPositions where reflected SE overlaps any foregroundGrows objects, fills small holes, bridges narrow gaps
OpeningErosion followed by dilationRemoves protrusions, breaks thin connections, smooths contours
ClosingDilation followed by erosionFills holes, joins narrow breaks, smooths concavities

Derived Operations

  • Morphological gradient: Dilation − Erosion → extracts object boundaries
  • Top-hat: Original − Opening → extracts bright features from uneven background
  • Bottom-hat: Closing − Original → extracts dark features
  • Hit-or-miss: Erosion by B₁ AND erosion of complement by B₂ → detects specific patterns
Simplified

Morphological operations reshape objects in images using a small template shape. Erosion peels away the outer layer of objects (shrinking). Dilation adds a layer (growing). Opening (erosion then dilation) removes small bumps without changing overall size. Closing (dilation then erosion) fills small holes. These four operations are the building blocks for most shape-processing tasks.

Image Processing Foundation

Mathematical morphology, formalized by Serra and Matheron in the 1960s, is described by Solomon & Breckon as a framework where "many more sophisticated morphological procedures can be reduced to a sequence of dilations and erosions."

Rolling-Ball Analogy

Solomon & Breckon provide an intuitive visualization for opening: "Imagine the ball rolling around freely within A but constrained to always stay inside its boundary. The set of all reachable points belongs in the opening." For closing: "roll SE around the outer boundary of A. The resulting contour defines the closed object."

Key Asymmetry

Dilation and erosion are duals but not strict inverses: "we cannot restore by dilation an object which has previously been completely removed by erosion" (Solomon & Breckon). This is why StrataQuest's Grow engine includes a "Shrink (retain)" mode that preserves a trace of small objects.

Structuring Element Choice

"Much of the art in morphological processing is to choose the structuring element so as to suit the particular application" (Solomon & Breckon). Disk SEs are isotropic (direction-independent). Square SEs process faster but introduce anisotropy — the "uneven effect on an object of erosion/dilation with a SE whose shape differs from the object."

Grayscale Morphology

For flat structuring elements applied to grayscale images: gray erosion = local minimum filter, gray dilation = local maximum filter. The top-hat transform (original − opening) is particularly important in StrataQuest: it extracts bright features against a slowly varying background, directly relevant to Background Removal.

Simplified

Think of morphological operations using the rolling-ball analogy: for opening, roll a ball inside the object — anywhere the ball can't reach (narrow protrusions, thin connections) gets removed. For closing, roll the ball around the outside — narrow gaps and small holes get filled in. The size of the ball (structuring element) determines what counts as 'small enough to remove.'

Parameters & Settings

ParameterTypeDescription
InputBinary or grayscale imageThe image to process.
OperationSelectionErosion, Dilation, Opening, Closing, Gradient, Top-hat, or Bottom-hat.
SE ShapeSelectionStructuring element shape: Disk (isotropic), Square, Cross, or custom.
SE Size / RadiusPixelsSize of the structuring element. Must be appropriate to the structures being modified — smaller than objects to preserve, larger than artifacts to remove.
Simplified

Choose the Operation (erosion, dilation, opening, closing, etc.), SE Shape (disk for isotropic processing), and SE Size (determines what's 'small enough' to be affected). Disk SE with a radius of 2–5 pixels handles most tissue cleanup tasks.

Connected Terms

Share This Term
Term Connections