2. It is possible to segment an image into regions
of common attribute by detecting the boundary
of each region for which there is a significant
change in attribute across the boundary
2
3. 3
Boundary of an
object
Consists of pixels that
belong to the object(s) itself
Consists of pixels that
belong to the background
Relation??
They are same
4. 4
Boundary of set A
β(A)
1. Erode A by B
2. Perform set difference between A & its
erosion
8. 8
Let A be a set. It contains a subset whose
elements are 8-connected boundary
points of a region.
All non-boundary points are labelled 0.
Set A
9. 9
Beginning with a point p inside the
boundary, the objective is to fill the
entire region with 1s.
A value 1 is assigned to the point p (p is an
arbitrarily selected point inside the boundary)
p
10. 10
Set Ac
The region is filled with 1s by the
following procedure.
Xk = (Xk-1 B) ∩ Ac for k = 1, 2, …
where X0 = p
Structuring element
B
origin
13. 13
The algorithm terminates at iteration
step k if Xk = Xk-1.
The set union of Xk and A contains the
filled set & its boundary.
The dilation process would fill the entire area if left
unchecked.
The intersection with Ac at each step limits the result to
inside the region of interest.
16. 16
Extraction of connected components
in a binary image is central to many
automated image analysis
applications
17. 17
Let A be a set and Y be a connected component in it.
Point p of Y is known.
The following iterative expression yields all the elements
of Y.
Set A
p
Y
X0 = p
X
Structuring
element B
19. 19
Set A is said to be convex, if
the straight line segment
joining any two points in A lies
entirely within A
20. 20
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
Convex hull & Convex
deficiency
useful for object description
21. 21
Algorithm for obtaining Convex
Hull, C(A), of a set A
There are four convex hull masks, where 1
represents black, 0 represents white and X
represents a pixel that doesn’t matter, either
0 or 1.
1 x x
1 0 x
1 x x
1 1 1
x 0 x
x x x
x x 1
x 0 1
x x 1
x x x
x 0 x
1 1 1
B1 B2
B3 B4
22. 22
The procedure consists of implementing the
following equation
Note: converged means when
• Where A represents iteratively applying the hit-or-miss
transform with the 4 masks.
• When the masks produce no more changes, the union is
performed between all 4 masks and the result becomes Di
+1
+1
23. 23
Convex Hull Masks
Convex hull uses the hit or miss
function
If any of these masks are found in the
image, then that middle pixel on the
image is replaced with a 1 or black
respectively.
To achieve the complete convex hull
image, these masks must be applied
repeatedly until no further changes
occur.
32. 32
Boundaries of greater complexity can be
used to limit growth even further in
images with more detail.
e.g. the maximum dimensions of the original
set of points along vertical, horizontal &
diagonal directions can be used.
Price paid for such refinements ??
Additional complexity
34. 34
Thinning: from many pixels width to
just one
• Much work has been done on the thinning
of ``thick'' binary images,
• where attempts are made to reduce shape
outlines which are many pixels thick to
outlines which are only one pixel thick.
Thinning of thick binary images
35. 35
Erase black pixels such that
An object without holes erodes to a
minimally connected stroke located
equidistant from its nearest outer
boundaries
An object with holes erodes to a
minimally connected ring midway between
each hole & its nearest outer boundary.
Thinning is used to remove selected
foreground pixels from binary images
37. 37
Applying thinning to
fault detection in PCB
All lines are thinned to one pixel width
Now you can check connectivity
38. 38
Thinning is basically a search & delete process.
It removes only those boundary pixels from the
image whose deletion
Does not change connectivity of their
neighbours locally and
Does not reduce the length of an already
thinned curve
Critical pixel
Its deletion changes the
connectivity of its
neighbourhood locally
End pixel
Its deletion reduces the length
of an already thinned curve.
The no. of neighbouring pixels
of an end pixel are ??
39. 39
Some boundary pixels
0 1 1
0 1 1
0 1 0
0 1 1
0 1 1
1 0 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
0 0 1
0 1 0
0 1 1
0 0 0
0 0 0
0 1 1
0 0 0
0 0 0
0 1 0
0 0 1
(a) (b) (c) (d)
(e) (f) (g)
The image A is
8-connected
The centre pixel of which windows is a
critical pixel ?
(b), (c), (d)
41. 41
0 1 1
0 1 1
0 1 0
0 1 1
0 1 1
1 0 0
0 1 0
0 1 0
0 1 0
0 1 0
0 1 0
0 0 1
0 1 0
0 1 1
0 0 0
0 0 0
0 1 1
0 0 0
0 0 0
0 1 0
0 0 1
(a) (b) (c) (d)
(e) (f) (g)
The centre pixel of which windows can be
deleted without affecting local connectivity
of the neighbourhood or reducing the length
of the arc?
(a), (e)
42. 42
0 1 1
0 1 1
0 1 0
0 1 1
0 1 1
1 0 0
(a) (b)
What happens to the centre pixels when we
consider the image A to be 4-connected?
In (a) the centre pixel becomes critical,
while in (b) it is not
47. 47
Thinning removes only those boundary pixels from the image
whose deletion
Does not change connectivity of their neighbours locally and
Does not reduce the length of an already thinned curve
The deletion of all boundary pixels that satisfy the
above criteria should be done simultaneously to
ensure symmetry in the resultant skeleton.
However, such strategy may delete completely a
curve segment such as the one given below since all
the pixels satisfy the above criteria.
1 1 1 1 1 1
1 1 1 1 1 1
48. 48
Solutio
n to the
proble
m
Apply the deletion process
simultaneously to all boundary
pixels of a particular side (N, S,
E or W)
How to find out the pixels
of the north boundary?
Pixel (x,y) is in the north boundary
if pixel (x, y+1) is in Ac
When is pixel (x, y) in the S, E or W boundary?
1 1 1
1 1
1 1
1 1 1
X
50. 50
The thinning of a set A by a
structuring element B can be defined
in terms of the
hit-or-miss transform
51. 51
A more useful expression for
thinning A symmetrically
Use a sequence of structuring elements
{B} = {B1, B2, ..., Bn}
where Bi is the rotated version of Bi-1
52. 52
Thinning
Thinning is often accomplished
using a sequence of rotated
structuring elements (a). Given
a set A (b), results of thinning
with first element is shown in
(c), and the next 7 elements (d)
– (i). There is no change
between 7th and 8th elements,
and no change after first 3
elements. Then it converges to
a m-connectivity.
n
n
B
B
B
A
B
A
B
B
B
B
B
A
hitnmiss
A
B
A
2
1
2
1
,
,
,
53. 53
Thickening is the morphological dual of thinning
Thickening can also be defined as
a sequential operation
54. 54
A separate algorithm is rarely
used for thickening
The usual procedure??
Thin the background of the set in
question & then take the complement
of the result
To thicken A
Let C = Ac
Thin C
Take Cc
Editor's Notes
William K Pratt
The no. of neighbouring pixels of an end pixel are less than two.