Presentation is loading. Please wait.

Presentation is loading. Please wait.

Table of Contents Preview 9.1 Preliminaries 9.2 Erosion and Dilation

Similar presentations


Presentation on theme: "Table of Contents Preview 9.1 Preliminaries 9.2 Erosion and Dilation"— Presentation transcript:

0 DIGITAL IMAGE PROCESSING
Chapter 9 – Morphological Image Processing J. Shanbehzadeh, M. Mahdijo Khwarizmi University of Tehran

1 Table of Contents Preview 9.1 Preliminaries 9.2 Erosion and Dilation
9.2.3 Duality 9.3 Opening and Closing 9.4 Hit-or-Miss Transformation

2 Preview Morphology : form and structure
Extracting image components for: representation and description of region shape From Image processing methods Input: Image Output: Image To Input: Image Output: Attributes

3 9.1 Preliminaries Reflection and Translation: Translation :
(B)z = {c | c = b + z, for b є B}

4 9.1 Preliminaries Structuring Elements:

5 9.1 Preliminaries Structuring Elements:

6 9.2 Erosion and Dilation (B)z = {c | c = b + z, for b є B} Erosion

7 9.2 Erosion and Dilation

8 Computing the Erosion of a Binary Image
For each foreground pixel, we superimpose the structuring element on top of the input image so that the origin of the structuring element coincides with the input pixel coordinates. If for every pixel in the structuring element, the corresponding pixel in the image underneath is a foreground pixel, then the input pixel is left as it is. Otherwise, it is set to background value.

9 The effect of Erosion removing any foreground pixel that is not completely surrounded by other white pixels (assuming 8- connectedness). Such pixels must lie at the edges of white regions, and so the practical upshot is that foreground regions shrink (and holes inside a region grow).

10 Effect of Erosion Using a 3×3 Square Structuring Element

11 9.2 Erosion

12 9.2 Erosion Erosion (More examples):

13 9.2 Erosion Erosion (More examples):

14 Erosion in removing salt noise
14 14

15 9.2 Dilation (B)z = {c | c = b + z, for b є B} Dilation

16 9.2 Dilation

17 9.2 Dilation

18 Dilation The basic effect of the operator on a binary image is to gradually enlarge the boundaries of regions of foreground pixels. Thus areas of foreground pixels grow in size while holes within those regions become smaller

19 Dilation: Example

20

21 Gray level erosion /dilation
􀂄 Chose the local minimum over the region defined by the structure element 􀂄 Put the minimums value in the same pixel position in the out image Results in darker images and light details are removed

22

23 Dilation in noise reduction

24 Dilation in edge detection

25 9.2 Erosion and Dilation Duality Proof:

26 9.3 Opening and Closing Opening Closing

27 Closing Opening Dilation Erosion

28 Isthmus An isthmus (/ˈɪsθməs/ or /ˈɪsməs/; plural: isthmuses; from Ancient Greek:ἰσθμός isthmos “neck”) is a narrow strip of land connecting two larger land areas, usually with water on either side.[1] A tombolo is an isthmus where the strip of land consists of a spit or bar. The Suez Canal goes across the western side of the Sinai Peninsula The Isthmus of Panama

29 pro·trude  (prō-tro̅o̅d′)v. pro·trud·ed, pro·trud·ing, pro·trudes
v.tr.To push or thrust outward. v.intr.To jut out; project. See Synonyms at bulge. Example sentences The air-conditioner does not protrude  into the alley. They are large-bodied and display a mouthful ofsharp teeth that protrude  in  Samantha's face and paws protrude  from thecutout door. Scrub the mussels, and use a paring knife toremove any beards that protrude 

30 9.3 Opening and Closing Erosion Dilation Opening:
smoothes the contour of an object , breaks narrow isthmuses, and eliminates thin protrusions. Erosion Dilation Opening is defined as an erosion followed by a dilation using the same structuring element for both operations.

31 Opening Opening removes some of the foreground (bright) pixels from the edges of regions of foreground pixels. Opening is less destructive than erosion in general. The exact operation is determined by a structuring element.

32 Opening The effect of the operator is:
to preserve foreground regions that have a similar shape to this structuring element, or can completely contain the structuring element, Eliminating all other regions of foreground pixels.

33 Effect of opening using a 3×3 square structuring element

34 Opening opening can be very useful for separating out particularly shaped objects from the background, opening is far from being a universal 2-D object recognizer/segmenter. E.g. if we use a long thin structuring element to locate a pencils in our image, any one such element will only find pencils at a particular orientation.

35 Opening If it is necessary to find pencils at other orientations then differently oriented elements must be used to look for each desired orientation. It is also necessary to be very careful that the structuring element chosen does not eliminate too many desirable objects, or retain too many undesirable ones, and sometimes this can be a delicate or even impossible balance

36 9.3 Opening Opening:

37 9.3 Opening Opening: Separate out the circles from the lines, so that they can be counted. Opening with a disk shaped structuring element 11 pixels in diameter gives

38 9.3 Opening Opening: Extracting the horizontal and vertical lines The results of an Opening with a 3×9 vertically and 9x3 horizontally oriented structuring element is shown.

39 9.3 Opening and Closing Opening in removing salt noise:

40 9.3 Opening and Closing Opening in removing pepper noise:

41 9.3 Closing Closing: Dilation Erosion
41 Closing: Smooth sections of contours, but as opposed to Opening, it generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour Dilation Erosion

42 Closing Closing is opening performed in reverse.
Closing is the dual of opening, i.e. closing the foreground pixels with a particular structuring element, is equivalent to closing the background with the same element. a dilation followed by an erosion using the same structuring element for both operations. The closing operator requires two inputs: an image to be closed a structuring element.

43 Effect of closing using a 3×3 square structuring element

44 9.3 Closing Closing:

45 Closingwith a 22 pixel diameter disk
9.3 Closing: exapmles Removing the small holes while retaining the large holes Closingwith a 22 pixel diameter disk Closing with a disk-shaped structuring element with a diameter larger than the smaller holes

46 Enhance binary images of objects obtained from thresholding
9.3 Closing: examples Enhance binary images of objects obtained from thresholding

47 9.3 Closing Closing for pepper noise:

48 9.3 Closing Closing for salt noise:

49 9.3 Opening and Closing

50 9.3 Opening and Closing (a) A o B is a subset (subimage) of A.
(b) If C is a subset of D, then C o B is a subset of D o B. (c) (A o B) o B = A o B. (a) A is a subset (subimage) of A • B. (b) If C is a subset of D, then C • B is a subset of D • B. (c) (A•B)•B=A•B.

51 9.3 Opening and Closing

52 9.4 The Hit-or-Miss Transformation
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. It is actually the basic operation of binary morphology since almost all the other binary morphological operators can be derived from it.

53 9.4 The Hit-or-Miss Transformation
The structuring element used in the hit-and-miss is a slight extension to the type that has been introduced for erosion and dilation, in that it can contain both foreground and background pixels, rather than just foreground pixels. Example of the extended type of structuring element used in hit-and-miss operations. This particular element can be used to find corner points.

54 9.4 The Hit-or-Miss Transformation
Four structuring elements used for corner finding in binary images using the hit-and-miss transform. Note that they are really all the same element, but rotated by different amounts. After obtaining the locations of corners in each orientation, We can then simply OR all these images together to get the final result showing the locations of all right angle convex corners in any orientation.

55 9.4 The Hit-or-Miss Transformation

56 The Hit-or-Miss Transformation
Closing Opening Dilation Erosion The Hit-or-Miss Transformation 56

57 9.4 The Hit-or-Miss Transformation
Erosion Dilation


Download ppt "Table of Contents Preview 9.1 Preliminaries 9.2 Erosion and Dilation"

Similar presentations


Ads by Google