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.
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.'