5TH QUES GRAYSCALE MORPHOLOGY
What is Morphological Operations?
Morphological operations are techniques used in image processing that focus on the
structure and form of objects within an image. These operations process images based on
their shapes and are primarily applied to binary images, but can also be extended to
grayscale images. The core idea is to probe an image with a structuring element and
modify the pixel values based on their spatial arrangement and the shape of the
structuring element. Key morphological operations include erosion, dilation, opening,
closing, and others, each serving distinct purposes in enhancing and analyzing images.
Morphological operations rely on two key elements:
• The Input Image: Usually a binary image, where the objects of interest are
represented by foreground pixels (typically white) and the background by
background pixels (typically black). Grayscale images can also be processed using
morphological operations.
• The Structuring Element: A small matrix or kernel that defines the neighborhood of
pixels over which the operation is performed. The shape and size of the structuring
element can greatly influence the outcome of the morphological operation.
(Preliminaries, Erosion, Dilation, Opening, Closing)
1. Preliminaries
Morphological image processing is based on shape and structure of objects in an image.
It uses a small pattern called a Structuring Element (SE) to probe and modify the image.
Morphological operations rely on two key elements:
The Input Image: a binary image
The Structuring Element: A small matrix or kernel
Key Terms
• Set A → Foreground pixels (object)
• Structuring Element (B) → Small shape (square, disk, cross etc.)
• Origin → The reference point in B
• Translation → Shifting B over the image
• Reflection → Flipping B around its origin
, 2. Erosion (A ⊖ B)
Definition:
Erosion shrinks an object by removing boundary pixels.
Formula:
𝐴 ⊖ 𝐵 = {𝑧 ∣ 𝐵𝑧 ⊆ 𝐴}
Effect:
• Removes thin lines and small white regions
• Breaks narrow bridges
• Shrinks object boundaries
Uses:
• Noise removal
• Boundary extraction
• Shape simplification
3. Dilation (A ⊕ B)
Definition:
Dilation expands an object by adding pixels to boundaries.
Formula:
𝐴 ⊕ 𝐵 = {𝑧 ∣ (𝐵̂)𝑧 ∩ 𝐴 ≠ ∅}
Effect:
• Fills small holes
• Connects nearby objects
• Thickens shapes
Uses:
• Bridging gaps
• Crack filling
• Region growing