Download presentation
Presentation is loading. Please wait.
Published byJulia Warner Modified over 8 years ago
1
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben
2
Outline: Introduction. Some basic Concepts from Set theory Logic operations involving Binary Images. Dilation and Erosion Open and Close Processing gray scale images. The Hit-and-Miss transformation
3
Introduction The word morphology commonly denotes a branch of biology that deals with the form and structure of animals and plants. Mathematical morphology is a tool that extract image components that are useful in the representation and discription of region shape such as: Boundaries Skeletons Convex hull. Sets in mathematical morphology represent objects in an image.
4
Some basic Concepts from Set theory
5
Some basic Concepts from Set theory.. (cont.)
7
Logic Operation Involving Binary Images. Mostly used images are the binary images. The principle logic operations used in image processing are AND, OR and NOT Logic operations are operated on a pixel by pixel basis between 2 images,but, (NOT) operation use one image.
8
Logic Operation Involving Binary Images. More operations: XOR: when only 1 in a pixel or the other pixel is 1 but not both. NOT-AND: select the black pixel that simultaneously are in B but not in A. NOTE: Intersection ==AND Union ==OR Complement ==NOT
9
Logic Operation Involving Binary Images.
10
Note: -In binary images white will represent the foreground (1) while black is the background (0). -The set of coordinate to the image is simply the set of 2D Euclidean coordinates of al the foreground pixels in the image as the origin normally takes in one of the corners.
11
Logic Operation Involving Binary Images.
12
Dilation and Erosion
13
Dilation advantage in bridges gaps in an image.
14
Dilation Algorithm: Consider each of the background pixels in the input image as input. For each background pixel we put the structure element on top of the image so that the origin of the structure element coincides with the input image. If at least one pixel in the structure element coincides with the foreground pixel in the image underneath then the input pixel is set to the foreground, otherwise leave it as it background value.
15
Dilation and Erosion 111 111 111 Dilation example
16
Dilation and Erosion
17
Erosion advantage in eliminating irrelevant details in term of size in an image. Note: if the structure element is larger than the object then the object will be eliminated completely
18
Erosion algorithm: Consider each of the foreground pixels in the input image as input. For each foreground pixel we put the structure element on top of the image so that the origin of the structure element coincides with the input image. If for every pixel in the structure element the corresponding pixel in image underneath is a foreground pixel then the input pixel is left as foreground, otherwise set it to background value.
19
Dilation and Erosion
20
Opening and Closing Now we know that Erosion shrinks an object while Dilation expands it. By combining these operations we get Open or Close operation. Open: Erosion then Dilation Close: Dilation then Erosion. Opening and closing smothes the contour of an object but: Opening: breaks narrow lines and eliminates thin protrusions( do thickening) Closing: focus on thin protrusions so it eliminates small holes and fill gaps.
21
Opening and Closing Close Open
22
Opening and Closing Perform open transformation on image 1 and closing on image 2 where B is 1? Open by 1 Close by 1
23
Processing gray scale images
24
00000000 00355300 00599500 00355300 00000000 11 11 11111111 11466641 116 10 61 116 61 11466641 242 242 Initial image Dilation resultsErosion results The structuring element
25
The Hit-and-Miss transform The hit-and-miss transform is a general binary morphological operation that can be used to look for particular patterns of foreground and background pixels in an image. A ⊛B It is actually the basic operation of binary morphology since almost all the other binary morphology operators can be derived from it. As with other binary morphology operators it takes as input a binary image and a structuring element and produce another binary image as output.
26
The Hit-and-Miss transform The structure element contain both 1 and 0 The operation is done as: translating the structure image over all points in the image then by comparing the structure element 1’s and 0’s with image if they match then set the underlying pixel to foreground otherwise set as background. Example of structure element X1X 011 00X
27
The Hit-and-Miss transform Ex: assume the origin is at the center of 3X3 structure element. In order to find all corners in an image we need to run hit and miss four times with four different structure element. After obtaining the locations of corners we then simply OR all these images together to get the final result. X00 110 x1X 00X 011 x1X X1X 110 x00 X1X 011 00X
28
The Hit-and-Miss transform 0000000000 0000000000 0011110000 0011110000 0011110000 0011111110 0011000010 0001000010 0001111110 0000000000 0000000000 0000000000 0010000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 00X 011 x1X Exercise: do the rest and find the result..
29
Exercise : How can the hit and miss transform be used to perform erosion? How can the hit and miss transform be used with the not operation to perform dilation? What is the smallest number of different structuring elements that you would need to use to locate all foreground points in an image where they have at least one neighbor using the hit and miss transform? What do they look like?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.