Professional Documents
Culture Documents
CS3IA16/CSMIP16
Image Analysis
Morphological Image Processing
Object A
NOT operation
only involves one
image, whilst
other operations
involve more than
one image.
Structuring element
• The structuring element is a small binary image. Its
pixel values are of 0 or 1.
– The pattern of 1s and 0s specifies the shape of the
structuring element.
– The origin of the structuring element is usually one of its
pixels, although this is not necessary.
An example of dilation
A B A B
• Some important points are illustrated.
– Dilation expands the original image.
– Original image is contained in the dilated image, i.e.
A A B.
– Dilation fill up small holes in objects.
An example of erosion
A B A B
• Erosion has effects on an image set opposite to
dilation.
– Erosion operation shrinks the original image.
– The eroded image is contained in the original image.
– Erosion removes or breaks narrow “bridges”.
– It has been shown that ( A B ) B A
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
Group discussions
• A is a set to be operated.
• There are three different types of structuring elements
as denoted by B1, B2, and B3.
• Sketch the result of the following morphological
operations
A
( A B1 ) B2
(A B2 ) B3 L
L/4 L/2
L L
L/4
B1 B2 B3
Original image
Morphological operation:
hit-or-miss transform
• The morphological hit-or-miss transform is used to
extract various image features from an object. It is
defined as
A B ( A B1 ) ( Ac B2 )
• Where A is the set representing the object, and
B=(B1,B2) is called a composite structuring element,
satisfying B1 B2 .
• In order to extract features from object A, it is
necessary to carefully design or choose the composite
structuring element B(B1B2).
Autumn-term 2017 CS3IA16/CSMIP16 Image Analysis 25
B1
A A B1
A B ( A B1 ) ( Ac B2 )
B2
AC A c B2
Morphological algorithms
• Based on the basic morphological operations, e.g.
erosion, dilation, opening, closing, and hit-or-miss,
many morphological algorithms can be generated.
• Some morphological algorithms are listed here
– Boundary extraction
– Region filling
– Extraction of connected components
– Thinning and thickening
– Convex hull
– Skeletons: sketching frame
– Pruning: removing parasitic components
Autumn-term 2017 CS3IA16/CSMIP16 Image Analysis 27
( A) A ( A B)
A
Thresholding
Set A eroded by a
5×5 structuring
element
Grey-scale morphology
• Grey-scale image f(x,y), structuring element b(x,y)
• Dilation: enhance brightness
(f b)( s, t ) max{ f ( s x, t y ) b( x, y ) | ( s x), (t y) D f ; ( x, y ) Db }
Positions of rolling
ball for opening
Result of opening
Positions of rolling
ball for closing
Result of closing