Digital Image Processing Lecture # 10 Morphological Image Processing Autumn 2012
Agenda Extraction of Connected Component Convex Hull Thinning Thickening Skeletonization Pruning Gray-scale Morphology Digital Image Processing Lecture # 10 2
Some Basic Morphological Algorithms (3) Extraction of Connected Components Central to many automated image analysis applications. Let A be a set containing one or more connected components, and form an array X 0 (of the same size as the array containing A) whose elements are 0s, except at each location known to correspond to a point in each connected component in A, which is set to 1. Digital Image Processing Lecture # 10 3
Some Basic Morphological Algorithms (3) Extraction of Connected Components Central to many automated image analysis applications. X ( X B) A k k 1 B : structuring element until X k X k-1 Digital Image Processing Lecture # 10 4
Digital Image Processing Lecture # 10 5
Digital Image Processing Lecture # 10 6
Some Basic Morphological Algorithms (4) Convex Hull A set 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 or of an arbitrary set S is the smallest convex set containing S. Digital Image Processing Lecture # 10 7
Some Basic Morphological Algorithms (4) Convex Hull i Let B, i 1, 2, 3, 4, represent the four structuring elements. The procedure consists of implementing the equation: with X A. i 0 i i X ( X * B ) A k k 1 i 1,2,3,4 and k 1, 2,3,... When the procedure converges, or X X,let D X, the convex hull of A is 4 C( A) D i 1 i i i i i k k 1 k Digital Image Processing Lecture # 10 8
Digital Image Processing Lecture # 10 9
Digital Image Processing Lecture # 10 10
Some Basic Morphological Algorithms (5) Thinning The thinning of a set A by a structuring element B, defined A B A ( A* B) A ( A* B) c Digital Image Processing Lecture # 10 11
Some Basic Morphological Algorithms (5) A more useful expression for thinning A symmetrically is based on a sequence of structuring elements: 1 2 3 n B B, B, B,..., B where B i is a rotated version of B i-1 The thinning of Aby a sequence of structuring element { B} A B A B B B 1 2 n { } ((...(( ) )...) ) Digital Image Processing Lecture # 10 12
Digital Image Processing Lecture # 10 13
Some Basic Morphological Algorithms (6) Thickening: The thickening is defined by the expression A B A A* B The thickening of Aby a sequence of structuring element { B} A B A B B B 1 2 n { } ((...(( ) )...) ) In practice, the usual procedure is to thin the background of the set and then complement the result. Digital Image Processing Lecture # 10 14
Some Basic Morphological Algorithms (6) Digital Image Processing Lecture # 10 15
Some Basic Morphological Algorithms (7) Skeletons A skeleton, S( A) of a set A has the following properties a. if z is a point of S( A) and ( D) is the largest disk centered at z and contained in A, one cannot find a larger disk containing ( D ) and included in A. The disk ( D) is called a maximum disk. b. The disk ( D) touches the boundary of A at two or more different places. z z z z Digital Image Processing Lecture # 10 16
Some Basic Morphological Algorithms (7) Digital Image Processing Lecture # 10 17
Some Basic Morphological Algorithms (7) The skeleton of A can be expressed in terms of erosion and openings. S( A) S ( A) k 0 with K max{ k A kb }; K k S ( A) ( A kb) ( A kb) B k where B is a structuring element, and ( A kb) ((..(( A B) B)...) B) k successive erosions of A. Digital Image Processing Lecture # 10 18
Digital Image Processing Lecture # 10 19
Digital Image Processing Lecture # 10 20
Some Basic Morphological Algorithms (7) A can be reconstructed from the subsets by using K A ( S ( A) kb) k 0 k where S ( A) kb denotes k successive dilations of A. k ( S ( A) kb) ((...(( S ( A) B) B)... B) k k Digital Image Processing Lecture # 10 21
Digital Image Processing Lecture # 10 22
Some Basic Morphological Algorithms (8) Pruning a. Thinning and skeletonizing tend to leave parasitic components b. Pruning methods are essential complement to thinning and skeletonizing procedures Digital Image Processing Lecture # 10 23
Pruning: Example X A { B} 1 Digital Image Processing Lecture # 10 24
Pruning: Example 8 2 1* k k 1 X X B Digital Image Processing Lecture # 10 25
Pruning: Example X X H A 3 2 H : 3 3 structuring element Digital Image Processing Lecture # 10 26
Pruning: Example 11/19/2012 27 Digital Image Processing Lecture # 10 27
Pruning: Example 11/19/2012 28 Digital Image Processing Lecture # 10 28
Digital Image Processing Lecture # 10 29
Digital Image Processing Lecture # 10 30 30
Digital Image Processing Lecture # 10 31
Digital Image Processing Lecture # 10 32
5 basic structuring elements Digital Image Processing Lecture # 10 33