Morphological Image Processing New
Morphological Image Processing New
Here black=1
and white=0
for better
representation
Reflection
• Reflection
𝐵 = {𝑤|𝑤 = −𝑏, 𝑓𝑜𝑟 𝑏 ∈ 𝐵}
Translation
• If A=binary image and w=(x,y) is a particular
coordinate point then
Aw = {(a,b)+(x,y) : (a,b) ϵ A }
= Set A translated in direction (x,y)
• If w=(2,2) ,the set A has been shifted in the x
and y directions by the values given in w.
Structuring elements (SE)
• SE is a small image ,used as a moving window, whose
support delineates pixel neighborhoods in the image
plane
• SE controls and decides the final shape of object in result
image
• SE can be of any shape, size or connectivity
• SE’s origin can be placed anywhere relative to its support
• SE’s origin is generally its centre of gravity, but can be
other point also
• In DIP, SE are rect. arrays, so smallest possible background
elements (0 pixels) are added.
• SE visits each pixel on image with its origin and perform
specified Set / Logical operation
Structuring elements
Structuring elements
Dilation
• Dilation (thickening) is an operation that grows objects in a binary
image (thickening controlled by structuring element)
• If A= binary image and B=structuring element
A B {z|(Bˆ )z A Φ}
A B A x
xB
• What this means is that for every point, xB we translate A by
those coordinates. Then we take the union of all these translations.
• Simplified : When SE visits on a target pixel, it performs OR
operation around neighborhood including the target pixel.
Dilation
Dilation
Structuring element
Binary image
Dilation
Dilation
Structuring element
Dilation
Structuring element
Binary image
Erosion
Erosion
Structuring element
Erosion
Erosion Dilation
SE=13x13 SE=13x13
Erosion
Structuring
Element
A AC
X k ( X k 1 B) Ac k 1,2,3,...
Hole/Region-Filling
• Given A and B
• Start with X0 (zero matrix of same
Size as A) with a known point in hole.
X 1 ( X 0 B ) Ac
• Repeat the above step until
Xk = X k-1
• Xk contains filled region of hole.
• Xk U A = hole filled image
•Holes may be created due to reflections in original image of metal ball bearings.
More techniques
• Hit or Miss Transform : to find a shape in image
• Skeletonization: Minimum number of connected
1-valued pixels symmetrically contained within
the shape
Exercise
• For the given binary image A and structuring element
B:
– Compute the morphological opening of A with B.
– Demonstrate using example that dilation and erosion are
duals of each other.
Solution
• Opening= Erosion followed by dilation
Thank you