1 / 121

Binary Morphology

Binary Morphology. Morphology. Morphology generally concerned with shape and properties of objects. Used for segmentation and feature extraction. Segmentation = used for cleaning binary objects. Two basic operations erosion (opening) dilation (closing). Morphological operations and algebras.

Download Presentation

Binary Morphology

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. Binary Morphology

  2. Morphology • Morphology generally concerned with shape and properties of objects. Used for segmentation and feature extraction. • Segmentation = used for cleaning binary objects. • Two basic operations • erosion (opening) • dilation (closing)

  3. Morphological operations and algebras • Different definitions in the textbooks • Different implementations in the image processing programs. • The original definition, based on set theory, is made by J. Serra in 1982. • Defined for binary images - binary operations (boolean, set-theoretical) • Can be used on grayscale images - multiple-valued logic operations

  4. Morphological operations on a PC • Various but slightly different implementations in • Scion • Paint Shop Pro • Adope Photoshop • Corel Photopaint • mm Try them, it is a lot of fun

  5. Morphological operations in Scion • Rank filtering (Grayscale) • Binary operations • based on 3x3 neighborhood • based on EDM (Euclidean Distance Map) • Applications • Noise reduction • Segmentation • Edge detection

  6. In general; what is “Morphology”? The science of form and structure the science of form, that of the outer form, inner structure, and development of living organisms and their parts about changing/counting regions/shapes Among other applications it is used to pre- or post-process images via filtering, thinning and pruning Count regions (granules) number of black regions Estimate size of regions area calculations • Smooth region edges • create line drawing of face • Force shapes onto region edges • curve into a square

  7. Mathematical Morphology - Set-theoretic representation for binary shapes

  8. Binary Morphology • Morphological operators are used to prepare binary (thresholded) images for object segmentation/recognition • Binary images often suffer from noise (specifically salt-and-pepper noise) • Binary regions also suffer from noise (isolated black pixels in a white region). Can also have cracks, picket fence occlusions, etc. • Dilation and erosion are two binary morphological operations that can assist with these problems.

  9. Goals of morphological operations: • 1. Simplifies image data • 2. Preserves essential shape characteristics • 3. Eliminates noise • 4. Permits the underlying shape to be identified and optimally reconstructed from their distorted, noisy forms

  10. What is the mathematical morphology ? • 1. An approach for processing digital image based on its shape • 2. A mathematical tool for investigating geometric structure in image • The language of morphology is set theory. Mathematical morphology is extension to set theory.

  11. Importance of Shape in Processing and Analysis • Shape is a prime carrier of information in machine vision • For instance, the following directly correlate with shape: • identification of objects • object features • assembly defects

  12. Shape Operators • Set Union (overlapping objects): • Shapes are usually combined by means of : • Set Difference based on Set intersection (occluded objects): Set difference Set intersection

  13. Morphological Operations • The primary morphological operations are dilationanderosion • More complicated morphological operators can be designed by means of combining erosions and dilations We will use combinations of union, complement, intersection, erosion, dilation, translation... Let us illustrate them and explain how to combine

  14. Dilation (Minkowski addition) • Erosion shrinks • Dilation expands binary regions • Can be used to fill in gaps or cracks in binary images structuring Element ( SE ) • If the point at the origin of the structuring element is set in the underlying image, then all the points that are set in the SE are also set in the image • Basically, its like OR’ing the SE into the image

  15. Dilation • Fills in holes. • Smoothes object boundaries. • Adds an extra outer ring of pixels onto object boundary, ie, object becomes slightly larger.

  16. Dilation example

  17. Morphology • Erosion and dilation clean image but leave objects either smaller or larger than their original size. • Opening and closing perform same functions as erosion and dilation but object size remains the same.

  18. More Erode and Dilate Examples Input Image Dilated Eroded Made in Paint Shop Pro

  19. Dilation explained pixed by pixel • • • • • • • • • • • • • • • • Denotes origin of B i.e. its (0,0) Denotes origin of A i.e. its (0,0) B A

  20. Dilation explained by shape of A • • • • • • • • • • • • • • • • Shape of A repeated without shift B Shape of A repeated with shift A

  21. Properties of Dilation 1. fills in valleys between spiky regions 2. increases geometrical area of object 3. sets background pixels adjacent to object's contour to object's value 4. smoothes small negative grey level regions objects are light (white in binary) Dilation does the following:

  22. Structuring Element for Dilation Length 6 Length 5

  23. Structuring Element for Dilation

  24. Structuring Element for Dilation Single point in Image replaced with this in the Result

  25. Structuring Element for Dilation

  26. Definition of Dilation: Mathematically • Dilation is the operation that combines two sets using vector addition of set elements. • Let A and B are subsets in 2-D space. A: image undergoing analysis, B: Structuring element, denotes dilation

  27. Mathematics: Dilation versus translation • Let A be a Subset of and . • The translation of A by x is defined as • The dilation of A by B can be computed as the union of translation of A by the elements of B x is a vector

  28. Dilation versus translation, illustrated • • • • • • • • • • • • • • • • • • • • • Element (0,0) Shift vector (0,1) Shift vector (0,0) B

  29. Mathematics of Dilation: using Union Formula Center of the circle This circle will create one point This circle will create no point

  30. Example of Dilation with various sizes of structuring elements Structuring Element Pablo Picasso, Pass with the Cape, 1960

  31. Mathematical Properties of Dilation • Commutative • Associative • Extensivity • Dilation is increasing Illustrated in next slide

  32. Illustration of Extensitivity of Dilation • • • • • • • • • • • • • • By 0 or O we denote the origin point A B Replaced with Here 0 does not belong to B and A is not included in A B

  33. More Properties of Dilation • Translation Invariance • Linearity • Containment • Decomposition of structuring element

  34. More Formalisms for Dilation • The dilation operator takes two pieces of data as input • A binary image, which is to be dilated • A structuring element (or kernel), which determines the behavior of the morphological operation • Suppose that X is the set of Euclidean coordinates of the input image, and K is the set of coordinates of the structuring element • Let Kxdenote the translation of K so that its origin is at x. • The DILATION of X by K is simply the set of all points x such that the intersection of Kx with X is non-empty

  35. Example of Dilation with SE that has an origin in its center 1 1 1 1 1 1 1 1 1 Example: Suppose that the structuring element is a 3x3 square with the origin at its center { (-1,-1), (0,-1), (1,-1), (-1,0), (0,0), (1,0), ( 1,1), (0,1), (1,1) } K = X =

  36. Dilation Example continued Note: Foreground pixels are represented by a color and background pixels are empty

  37. Steo-by-step explanation of Dilation Overlap of green and red Structuring element Input Explanation of processing First row processing output

  38. Dilation Second row processing output

  39. Dilation Third row processing output Fourth row processing nothing

  40. Final result of this Dilation Example

  41. Another example of Dilation that can be analyzed step-by-step by students

  42. Why we analyze Morphology mathematically? Useful when you want to write efficient software Very useful when you want to design a special purpose hardware computer for image processing using FPGAs. Useful when you want to prove something mathematically about images – this is an area of pure mathematics Useful when you want to create new morphological operators. Useful when you want to extend to complex numbers, quaternions, octonions, gray level and color images.

  43. Erosion

  44. Erosion • (Minkowski subtraction) • The contraction of a binary region (aka, region shrinking) • Use a structuring element on binary image data to produce a new binary image • Structuring elements (SE) are simply patterns that are matched in the image • It is useful to explain operation of erosion and dilation in different ways.

  45. Intuition for Erosion • Removes isolated noisy pixels. • Smoothes object boundary. • Removes the outer layer of object pixels, ie, object becomes slightly smaller.

  46. Properties of Erosion: Erosion removes spiky edges objects are light (white in binary) decreases geometrical area of object sets contour pixels of object to background value smoothes small positive grey level regions

  47. Erosion Example

  48. Erosion explained pixel by pixel • • • • • • • • • • • • • • When whole SE included, origin point copied to new image B A

  49. Structuring Element in Erosion Example

  50. Structuring Element in Erosion Example

More Related