Skip to content
CoreSource checked

Morphological Dilation

Expands bright or foreground regions according to a structuring element.

Quick Facts

Compact metadata for implementation and discovery.

Category
Image Processing
Difficulty
Beginner
Family
Mathematical Morphology
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Ready
Visualization
Ready

Overview

Morphological dilation sets each output pixel from the maximum value under a local structuring element, growing shapes and closing small gaps.

Core Concepts

structuring elementlocal maximumshape expansionbinary mask

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(pixels * kernel)

Average

O(pixels * kernel)

Worst

O(pixels * kernel)

Space

O(pixels)

When to Use

  • Use when image enhancement needs structuring element.
  • Use when the input matches the assumptions behind mathematical Morphology.

When Not to Use

  • Avoid when image noise, lighting, or scale breaks the algorithm's assumptions.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Expands bright or foreground regions according to a structuring element
  • Uses structuring element and local maximum to guide the work.
  • Produces processed image.

Use Cases

  • Image enhancement
  • Feature extraction
  • Segmentation and motion analysis

Inputs

  • Image or image sequence
  • Kernel, threshold, or model parameters

Outputs

  • Processed image
  • Mask
  • Feature map or motion field

Key Formulas (1)

Dilation

(A dilated by B) = {x | reflectedB shifted by x intersects A}
(A dilated by B) = {x | reflected_B shifted by x intersects A}

Defines dilation as shape expansion by a structuring element.

Pseudocode

  1. 1.Normalize the image and choose border handling
  2. 2.Evaluate the local filter, statistic, model, or response for each relevant pixel or region
  3. 3.Threshold, rank, refine, or combine the responses
  4. 4.Return the mask, transformed image, feature set, or geometric estimate

Canonical Example

Input
a small grayscale image patch with a clear edge, corner, or region
Output
Processed image
Explanation
Morphological Dilation applies structuring element to produce processed image.

Implementation Notes

  • Handle borders and pixel coordinate conventions consistently.
  • Keep the structuring element step separate enough to test independently.
  • Keep coordinate conventions, border handling, and image normalization explicit in tests.

Common Pitfalls

  • Applying operations in the wrong color space can distort the result.
  • Test edge cases, not only clean examples.
  • Thresholds tuned on one clean image can fail under different lighting, scale, blur, or noise.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show the source image beside masks, filters, or motion vectors produced by the algorithm.

Morphological Dilation mechanism walkthrough step 1 of 4
Step 1 of 4: Normalize the image and choose border handling
image-processing-mechanism

Notes

Morphological Dilation should be used with the assumptions and tradeoffs of mathematical Morphology in mind.

Sources (1)

What each reference supports for this entry.

Digital Image Processing

Book

Image-processing textbook support for Morphological Dilation's pixel-neighborhood operations, filtering rules, and image-analysis role.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toMorphological Erosion

Dilation expands foreground regions, while erosion shrinks them.

Tags

Image ProcessingMorphologySegmentationFiltering