1 / 133

Lecture Two for teens

Lecture Two for teens. Introduction to Morphological Operators. About this lecture. In this lecture we introduce INFORMALLY the most important operations based on morphology, just to give you the intuitive feeling. In next lectures we will introduce more formalism and more examples.

haines
Download Presentation

Lecture Two for teens

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture Two for teens

  2. Introduction to Morphological Operators

  3. About this lecture • In this lecture we introduce INFORMALLY the most important operations based on morphology, just to give you the intuitive feeling. • In next lectures we will introduce more formalism and more examples.

  4. Binary Morphological Processing • Non-linear image processing technique • Order of sequence of operations is important • Linear: (3+2)*3 = (5)*3=15 3*3+2*3=9+6=15 • Non-linear: (3+2)2 + (5)2 =25 [sum, then square] (3)2 + (2)2 =9+4=13 [square, then sum] • Based on geometric structure • Used for edge detection, noise removal and feature extraction  Used to ‘understand’ the shape/form of a binary image

  5. Introduction • Structuring Element • Erosion • Dilation • Opening • Closing • Hit-and-miss • Thinning • Thickening

  6. 1D Morphological Operations

  7. 1 1 1 Example for 1D Erosion Input image Structuring Element Output Image

  8. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  9. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  10. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  11. 1 1 1 Example for Erosion Input image Structuring Element Output Image Structured element is completely included in set of ones

  12. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  13. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  14. 1 1 1 Example for Erosion Input image Structuring Element Output Image

  15. 1 1 1 Example for 1D Dilation Input image Structuring Element Output Image Structuring element overlaps with input image

  16. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  17. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  18. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  19. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  20. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  21. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  22. 1 1 1 Example for Dilation Input image Structuring Element Output Image

  23. 2D Morphological Operations

  24. Image – Set of Pixels • Basic idea is to treat an object within an image as a set of pixels (or coordinates of pixels) • In binary images, pixels that are ‘off’, set to 0, are background and appear black. • Foreground pixels (objects) are 1 and appear white

  25. Neighborhood • Set of pixels defined by their location relation to the pixel of interest • Defined by structuring element • Specified by connectivity • Connectivity- • ‘4-connected’ • ‘8-connected’

  26. Labeling Connected Components • Label objects in an image • 4-Neighbors • 8-Neighbors p p

  27. 4 and 8 Connect Input Image 8 – Connect 4 - Connect

  28. Morphological Image Processing Basic operations on shapes From: Digital Image Processing, Gonzalez,Woods And Eddins

  29. Morphological Image Processing From: Digital Image Processing, Gonzalez,Woods And Eddins

  30. Operations on binary images in MATLAB From: Digital Image Processing, Gonzalez,Woods And Eddins

  31. Translation of Object A by vector b • Define Translation ob object A by vector b: At = { t  I2 : t = a+b, a  A } Where I2 is the two dimensional image space that contains the image • Definition of DILATION is the UNION of all the translations: A B =  { t  I2 : t = a+b, a  A } for all b’s in B

  32. Structuring Element (Kernel) • Structuring Elements can have varying sizes • Usually, element values are 0,1 and none(!) • Structural Elements have an origin • For thinning, other values are possible • Empty spots in the Structuring Elements are don’t care’s! Box Disc Examples of stucturing elements

  33. Reflection of the structuring element From: Digital Image Processing, Gonzalez,Woods And Eddins

  34. Idea of DILATION versus TRANSLATION A A1 Object B is one point located at (a,0) A1: Object A is translated by object B Since dilation is the union of all the translations, A B =  At where the set union  is for all the b’s in B, the dilation of rectangle A in the positive x direction by a results in rectangle A1 (same size as A, just translated to the right)

  35. DILATION – B has 2 Elements A A2 A1 (part of A1 is under A2) -a a -a a Object B is 2 points, (a,0), (-a,0) There are two translations of A as result of two elements in B Dilation is defined as the UNION of the objectsA1 and A2. NOT THE INTERSECTION

  36. 2D DILATION

  37. Rounded corners DILATION Round Structuring Element (SE) can be interpreted as rolling the SE around the contour of the object. New object has rounded corners and is larger in every direction by ½ width of the SE

  38. DILATION Rounded corners Square Structuring Element (SE) can be interpreted as moving the SE around the contour of the object. New object has square corners and is larger in every direction by ½ width of the SE

  39. DILATION • The shape of B determines the final shape of the dilated object. • B acts as a geometric filter that changes the geometric structure of A

  40. 2D EROSION

  41. Another important operator • Introduction to Morphological Operators • Used generally on binary images, e.g., background subtraction results! • Used on gray value images, if viewed as a stack to binary images. • Good for, e.g., • Noise removal in background • Removal of holes in foreground / background • Check: www.cee.hw.ac.uk/hipr

  42. A first Example: Erosion • Erosion is an important morphological operation • Applied Structuring Element:

  43. Dilation versus Erosion • Basic operations • Are dual to each other: • Erosion shrinks foreground, enlarges Background • Dilation enlarges foreground, shrinks background

  44. Erosion • Erosion is the set of all points in the image, where the structuring element “fits into”. • Consider each foreground pixel in the input image • If the structuring element fits in, write a “1” at the origin of the structuring element! • Simple application of pattern matching • Input: • Binary Image (Gray value) • Structuring Element, containing only 1s!

  45. Another example of erosion • White = 0, black = 1, dual property, image as a result of erosion gets darker

  46. Introduction to Erosion on Gray Value Images • View gray value images as a stack of binary images! Intensity is lower so the image is darker

  47. Erosion on Gray Value Images • Images get darker!

  48. Example: Counting Coins • Counting coins is difficult because they touch each other! • Solution: Binarization and Erosion separates them!

  49. DILATION more details

  50. Example: Dilation • Dilation is an important morphological operation • Applied Structuring Element:

More Related