Professional Documents
Culture Documents
BY
Garima Goel (20169001) Jit Sen Gupta (20165059)
Manali Gupta (20162021) Suman Khanal (20165109)
Anushri Ganguly (20155023) Aamod Kumar Tripathi
(20165128)
Ashi Gupta (20165087) Dharavath Sunil (20165079)
Shubham Bhardwaj (20161093) Jayshankar Kumar (20165095)
Sai Govind Maurya (20165092) Raushan Kumar (20165124)
MATHEMATICAL MORPHOLOGY
• Used to extract image components that are
useful in the representation and description of
region shape, such as
– Boundaries extraction
– Skeletons
– Convex hull
– Morphological filtering
– Thinning
– Pruning
MATHEMATICAL MORPHOLOGY
Mathematical framework used for:
• Pre-processing
– Noise filtering, shape simplification, etc.
• Enhancing object structure
– Skeletonization, convex hull, etc.
• Segmentation
– Watershed, etc.
• Quantitative description
– Area, perimeter, etc.
Z2 and Z3
• Set in mathematical morphology represent
objects in an image
• Binary image : the element of the set is the
coordinates (x,y) of pixel belong to the object
and belong to integer space Z2
• Gray scaled image: The elements of the set are
the coordinates (x,y) of pixel belonging to the
object and the gray level and belong to integer
space Z3
BASIC SET OPERATIONS
STRUCTURING ELEMENTS
• A structuring element is a small image – used as a moving
window – whose support delineates pixel neighbourhoods
in the image plane.
• It can be of any shape, size or connectivity (more than 1
piece, have holes).
• The figure shows structuring elements in which the circles
mark its origin which can be placed anywhere relative to its
support.
STRUCTURING ELEMENTS
STRUCTURING ELEMENTS
STRUCTURING ELEMENTS
• Let I be an image and Z a SE
• Z + p means that Z is moved
so that its origin with the
location of p in SP .
• Z + p is the translate of Z to
location p in SP.
• The set of locations in the
image delineated by Z +p is
called the Z-neighbourhood
of p in I denoted by N{I,Z}
(p).
BASIC SET OPERATIONS
EROSION
With A and B as sets in Z2 the erosion of A by B is denoted by A Ө B
and is defined by,
A Ө B = { z|(B)z C A }
This equation can also be expressed as,
A Ө B = { z|(B)z ∩ AꜤ = Ǿ }
Fig: (a) Set A. (b) Square structuring element, B. (c) Erosion of A by B shown
shaded. (d) Elongated structuring element. (e) Erosion of A by B using this element.
Removing the lines connecting the center region to the Border Pads using
Erosion.
Fig: Using erosion to remove image components. (a) A 486×486 binary image of
a wire bond mask. (b)-(d) Image eroded using square structuring elements of
sizes 11×11, 15×15 and 45×45, respectively. The elements of the SEs were all 1s.
DILATION
With A and B as the sets in Z2, the dilation of A and B, denoted by A⊕B,
is defined as,
A⊕B = { z|(B̂)z ∩ A = Ø }
This equation can aslo be definedQ as,
A⊕B = { z|[(B̂)z ∩ A ] C Ø }
Fig: (a) Set A. (b) Square structuring element (the dot denotes the origin). (c)
Dilation of A by B, shown shaded. (d) Elongated structuring element. (e) Dilation of
A using this element.
Unlike erosion, which is a shrinking or thinning operation, dilation grows
or thickens the binary image. The specific manner and extent of this
thickening is controlled by the shape of the structuring element used.
Duality
Erosion and Dilation are duals of each other with respect to set
complementation and reflection. That is,
(A Ө B)Ꜥ = AꜤ ⊕ B̂
and
(A ⊕ B)Ꜥ = AꜤ Ө B̂
A • B=( A ⊕ B) Ө B
Fig.(a)Structure of element “B” rolling on the outer boundary of set A (b)Heavy line is
the outer boundary of the closing (c)Complete closing(shaded)
MORPHOLOGICAL OPENING
AND CLOSING
OPENING CLOSING
USE OF OPENING AND CLOSING FOR
MORPHOLOGICAL FILTERING
HIT OR MISS ALGORITHM
• We want to find the location of “D”
• Let D be enclosed by a small background W.
Define the local background W – D as shown.
• Consider the complement AC of the set of all
shapes , i.e., A = C U D U E
• Erode A by D. Since e is smaller than D it
disappears. D eroded by D is a single point
and C eroded by D is a rectangular region of
all locations of D inside C.
• Now erode of AC by W-D to give the set of all
translates of W-D such that the center of W-
D is in AC. Note that W-D fits around D giving
a single point. Since E is smaller than D there
is also a set of points inside E corresponding
to the translates of W-D containing E.
• The intersection of A eroded by D and AC
eroded by W-D is the location of D.
9.5. Some Basic Morphological Algorithms-
•
Extraction of connected components fro
image is central to many automated ima
applications.
The following iterative procedure accom
objective:
= ( ⊕ B) ∩ A where k = 1, 2, 3,…
where B is a suitable structuring ele
X- Ray image of chicken filet with bone
fragment-
9.5.4. Convex Hull :-
• set
A “A” is said to be convex if the straight line segment joining
any two points in “A” lies entirely within “A”. The convex hull “H”
of an arbitrary set “S” is the smallest convex set containing “S”.
The set difference “H-S” is called the convex deficiency of “S”.
Let , i = 1, 2, 3, 4 represent the four structuring elements in the
figure 9.19(a) being shown in the next slide. The procedure
consists of implementing the equation :-
=( ⊕⋃A , where i = 1, 2, 3, 4 and k = 1, 2, 3,….
With = A, when the procedure converges ( i.e., when = ), we let
. Then the convex Hull of “A” is-
C(A) =
Figure illustrating Convex Hull :-
9.5.5. Thinning :-
• The
thinning of a set “A” by structuring
element B, denoted by A ⊗ B, can be defined
in terms of hit and miss transform.
A ⊗ B = A-(A ⊛ B)
=A∩
The figure illustrating the mechanism of
Thinning is being shown in the next slide.
9.5.6. Thickening :-
• Thickening
is the morphological dual of
thinning and is defined by the expression-
B = A ⋃ (A ⊛ B)
Figure illustrating the mechanism of
Thickening is being shown in the next slide.
9.5.7. Skeletons :-
Figure signifying Skeleton :-
Ways to implement equations in the previous
slide :-
9.5.8. Pruning :-
Figure Showing a Pruned Image :-
9.5.9. Morphological Reconstruction :-
Mathematical explanation of the process of
Morphological Reconstruction by Dilation & by
Erosion :-
Sample Applications of Morphological
reconstruction :-
Examples of Complement of text images :-
Border Clearing :-
9.5.10. Summary of Morphological
Operations on Binary Images :-
Grayscale Morphology
• The elementary binary morphological
operations can be extended to
grayscale images through the use of
min and max operations.
– To perform morphological analysis on a grayscale
image, regard the image as a height map.
– min and max filters attribute to each image pixel a
new value equal to the minimum or maximum
value in a neighborhood around that pixel.
• The neighborhood represents the shape of the
structuring element.
45
Grayscale Morphology
– The min and max filters are analogous to erosion
and dilation.
• Grayscale morphology has applications in:
– contrast-enhancement
– texture description
– edge detection
– thresholding
46
Grayscale Dilation
• The grayscale dilation of an image involves
assigning to each pixel, the maximum
value found over the neighborhood of the
structuring element.
• The dilated value of a pixel x is the maximum
value of the image in the neighborhood
defined by the SE when its origin is at x:
B (f )x (f B)x max f (x )
B
47
Grayscale Dilation
B
48
Grayscale Erosion
• The grayscale erosion of an image involves
assigning to each pixel, the minimum
value found over the neighborhood of the
structuring element.
• The eroded value of a pixel x is the minimum
value of the image in the neighborhood
defined by the SE when its origin is at x:
B (f )x (f Ⓐ B ) x min f (x )
B
49
Grayscale Erosion
B
50
Grayscale Opening
• The grayscale opening of an image involves
performing a grayscale erosion, followed
by grayscale dilation.
• The opened value of a pixel is the maximum
of the minimum value of the image in the
neighborhood defined by the SE:
S B ( B )
51
Grayscale Opening
B B
52
Grayscale Closing
• The grayscale closing of an image involves
performing a grayscale dilation, followed
by grayscale erosion.
S B (B )
53
Grayscale Closing
B B
54
Morphological Smoothing
with
the geodesic erosion of size 1 of f with respect to
g is defined as