Presentation is loading. Please wait.

Presentation is loading. Please wait.

BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department.

Similar presentations


Presentation on theme: "BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department."— Presentation transcript:

1 BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department

2 BYST Morp-2 DIP - WS2002: Morphology Mathematical Morphology q is based on set theory; q concerns the study of form and structure (shape and properties of objects/regions of an image); q can be used for pre/post-processing within image analysis such as filtering, thinning, and pruning. Mathematical morphology is a tool that:

3 BYST Morp-3 DIP - WS2002: Morphology Cont’d.Morphology Basic Definitions: 1. Standard set notation: Ø = empty set = is a member or element of = ‘implies that’ The expression {p | } means ‘the set of points, p, such that the listed is (are) true’.

4 BYST Morp-4 DIP - WS2002: Morphology Cont’d.Morphology 2. ‘Included’ Therefore if p is an element of A then p is also an element of N. That is, The binary object can be identified as a subset of pixels A contained or ‘included’ within the total set of image pixels N. That is,

5 BYST Morp-5 DIP - WS2002: Morphology Cont’d.Morphology 3. ‘Complement’ The ‘complement’ of the set A is the set which are not element of A, that is, all the white background pixels in the image. The complement of A can be denoted as A c and defined as: Therefore, if p is an element of A it cannot be an element of A c, i.e.

6 BYST Morp-6 DIP - WS2002: Morphology Cont’d.Morphology 4. ‘Transposition (Reflection)’ The ‘transposition’ of the set of pixels, A, is the set such that each pixel position is reflected about a defined origin. The ‘transposition’ of A, denoted Â, is defined as: 5. ‘Union’ The ‘union’ of two sets A and B is denoted by A  B and defined as:

7 BYST Morp-7 DIP - WS2002: Morphology Cont’d.Morphology 6. ‘Intersection’ The ‘intersection’ of two sets A and B is denoted by A  B and defined as: 7. ‘Difference’ The ‘difference’ between two sets A and B is denoted by A\B and defined as:

8 BYST Morp-8 DIP - WS2002: Morphology Cont’d.Morphology This is analogous to the logical XOR (exclusive OR) operation. The resulting set is the set such that each pixel is belonged to either set A or set B. 8. ‘Translation’ The ‘translation’ of A by x = (x 1, x 2 ), denoted (A) x, is defined as: A vector addition

9 BYST Morp-9 DIP - WS2002: Morphology Cont’d.Morphology Original Image Reflection of set A to produce set B.

10 BYST Morp-10 DIP - WS2002: Morphology Cont’d.Morphology

11 BYST Morp-11 Cont’d.Morphology A\B (A XOR B) Translation, (A) x, of set A by vector x (2,2)

12 BYST Morp-12 DIP - WS2002: Morphology Cont’d.Morphology q Set in mathematical morphology represent the shapes of objects in an image. q A binary image can be treated as a 2D point set of integer pairs (Z 2 ). Each element of a set is a tuple (2-D vector) whose coordinates are the (x,y) coordinates of a black (by convention) pixel in the image. An example of point set = the origin (0,0) X Y A discrete image ‘P’ = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1)}.

13 BYST Morp-13 DIP - WS2002: Morphology Cont’d.Morphology q Gray-scale digital images can be represented as sets of integer triples (Z 3 ); (x, y, intensity value). q Morphological operators usually take a binary image (point set A) and another small point set B called a “structuring element”. q B is expressed with respect to a local origin called the “representative point” and the pixel in the image A corresponding to the representative point is called the “current” pixel. q Usually, the structuring element is sized 3x3 and has its origin at the center pixel.

14 BYST Morp-14 DIP - WS2002: Morphology Cont’d.Morphology q Determine the shape of structuring element. q The structuring element is shifted over the image. q At each pixel of the image elements of the structuring element are compared with the set of the underlying pixels. q If the two sets of elements match the condition defined by the set operator, the pixel underneath the origin of the structuring element is set to a pre-defined value (0 or 1 for binary image). Generic morphological operator:

15 BYST Morp-15 DIP - WS2002: Morphology Dilation and Erosion Two operations which are fundamental to morphological analysis of images are ‘dilation’ and ‘erosion’. Two operations which are fundamental to morphological analysis of images are ‘dilation’ and ‘erosion’. Almost all morphological operations can be defined in terms of these two basic operations. Almost all morphological operations can be defined in terms of these two basic operations. Dilation (Grow, Expand) Enlarge the boundaries of regions of foreground pixels and fill in holes in the object (a binary image).

16 BYST Morp-16 DIP - WS2002: Morphology Dilation Let A and B as sets in Z 2. The dilation of A by B, denoted A  B, is defined as: Cont’d. i.e. An output pixel will be set at all points where the translated B (structuring element) and the image A have a ‘non-empty’ intersection. Generally, the dilation process is performed by laying the structuring element on the image and shifting it across the image in a manner similar to convolution. At each pixel, Dilation

17 BYST Morp-17 DIP - WS2002: Morphology If the origin of the structuring element coincides with a ‘0’ in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a ‘0’ in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a ‘1’ in the image, perform the OR logic operation on all pixels within the structuring element. If the origin of the structuring element coincides with a ‘1’ in the image, perform the OR logic operation on all pixels within the structuring element. Dilation Cont’d.

18 BYST Morp-18 DIP - WS2002: Morphology Dilation Cont’d. (a) An Original Image 3x3 Structuring Element (b)The Dilation of (a)

19 BYST Morp-19 DIP - WS2002: Morphology Erosion Erosion (Shrink, Reduce) Shrink the boundaries of regions of foreground pixels and enlarge holes in the object (a binary image). Let A and B as sets in Z 2. The dilation of A by B, denoted A B, is defined as: Erosion

20 BYST Morp-20 DIP - WS2002: Morphology Erosion Cont’d. i.e. The erosion of A by B is simply the set of all point of A such that B is a subset of A. Generally, the erosion process is similar to dilation, but we turn pixels to ‘0’, not ‘1’. At each pixel, If the origin of the structuring element coincides with a ‘0’ in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a ‘0’ in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a ‘1’ in the image, and any of the ‘1’ pixels in the structuring element extend beyond the object If the origin of the structuring element coincides with a ‘1’ in the image, and any of the ‘1’ pixels in the structuring element extend beyond the object

21 BYST Morp-21 DIP - WS2002: Morphology Erosion Cont’d. (‘1’ pixels) in the image, then change the ‘1’ pixel in the image to a ‘0’. Erosions can be made directional by using less symmetrical structuring elements. For example, a structuring element that is 10 pixels wide and 1 pixel high will erode in a horizontal direction only.

22 BYST Morp-22 DIP - WS2002: Morphology Erosion Cont’d. (a) An Original Image 3x3 Structuring Element (b)The Erosion of (a)

23 BYST Morp-23 DIP - WS2002: Morphology Opening can be used to eliminate all pixels in regions that are too small to contain the structuring element. Opening and Closing Opening Erosion followed by a dilation using the same structuring element. The opening of an image A by the structuring element B is denoted by and is defined as

24 BYST Morp-24 DIP - WS2002: Morphology Closing connects objects that are close to each other, fills up small holes, and smoothes the object outline by filling up narrow gulfs. Opening and Closing Closing Dilation followed by an erosion using the same structuring element. The closing of an image A by the structuring element B is denoted by and is defined as Cont’d.

25 BYST Morp-25 DIP - WS2002: Morphology Opening and Closing Cont’d. (a) An Original Image 3x3 Structuring Element (b)The Opening of (a)

26 BYST Morp-26 DIP - WS2002: Morphology Opening and Closing Cont’d. (a) An Original Image 3x3 Structuring Element (b)The Closing of (a)

27 BYST Morp-27 DIP - WS2002: Morphology Hit-or-Miss Transformation Hit-or-Miss Shape detection or Find local patterns of pixels. = size of the structuring element * The hit-or-miss transformation of an image A by the structuring element B = (B 1, B 2 ) is denoted by and is defined as * where B 1 = X = pattern of pixels that we want to find, B 2 = W - X, W = a small window enclosing “X”.

28 BYST Morp-28 DIP - WS2002: Morphology Hit-or-MissCont’d.

29 BYST Morp-29 Boundary Extraction The boundary of set A,  (A), can be obtained by the following operations:  (A) = A - (A B)

30 BYST Morp-30 DIP - WS2002: Morphology Thinning and Thickening The thinning of set A by a structuring element B, denoted A B, can be defined as: A B = A - (A B) * If a sequence of structuring elements {B} = {B 1, B 2, B 3, …, B n } is used where B i is a rotated version of B i-1. The process is to thin A by one pass with B 1, then thin the result with one pass of B 2, and so on, unit A is thinned with one pass of B n.

31 BYST Morp-31 DIP - WS2002: Morphology Thinning

32 BYST Morp-32 Thickening The thickening of set A by a structuring element B, denoted A B, can be defined as: A B = A U (A B) *


Download ppt "BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department."

Similar presentations


Ads by Google