 Download Download Presentation MATHEMATICS OF BINARY MORPHOLOGY and APPLICATIONS IN Vision

# MATHEMATICS OF BINARY MORPHOLOGY and APPLICATIONS IN Vision

Download Presentation ## MATHEMATICS OF BINARY MORPHOLOGY and APPLICATIONS IN Vision

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. MATHEMATICS OF BINARY MORPHOLOGY and APPLICATIONS IN Vision

2. 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 In general; what is “Morphology”? • Smooth region edges • create line drawing of face • Force shapes onto region edges • curve into a square

3. What is Morphology in computer vision ? • 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)

4. 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

5. 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

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

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

8. 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

9. 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.

10. 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

11. Binary Morphology

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

13. Morphological Operations based on combining base 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. Libraries of Structuring Elements • Application specific structuring elements created by the user

15. Notation x -2 -1 0 1 2 -2 -1 0 1 2 B y A special set : the structuring element Origin at center in this case, but not necessarily centered nor symmetric X No necessarily compact nor filled 3*3 structuring element, see next slide how it works

16. Dilation

17. Explanation of Dilation Dilation : x = (x1,x2) such that if we center B on them, then the so translated B intersects X. X difference dilation B

18. Notation for Dilation Dilation : x = (x1,x2) such that if we center B on them, then the so translated B intersects X. How to formulate this definition ? 1) Literal translation Mathematical definition of dilation 2) Better : from Minkowski’s sum of sets Another Mathematical definition of dilation uses the concept of Minkowski’s sum B is ingeneral not the same as B

19. The Concept of Minkowski Sum

20. Minkowski’s Sum Definition of Minkowski’s sum of sets S and B : l Minkowski’s Sum l

21. Another View at Dilation Dilation : l Dilation Dilation

22. Comparison of Dilation and Minkowski sum Dilation : Bx = x and b are points Minkowski sum

23. It is like dilation but we are not going around , we go only to top and to right

24. Dilation and Minkowski Set Dilation and Minkowski Set are denoted by + or by  No unified notation

25. Dilation is not the Minkowski’s sum Minkowski’s Sum l

26. Dilation is not the Minkowski’s sum l b b b b Dilation l Dilation l B is not the same as B

27. Dilation with other structuring elements

28. Dilation with other structuring elements

29. Dilation vs SE • 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

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

31. Main Applications of Dilation

32. Dilation example

33. Possible problems with Morphological Operators • 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.

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

35. 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

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

37. 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 Properties of Dilation objects are light (white in binary) Dilation does the following:

38. Structuring Element for Dilation Length 6 Length 5

39. Structuring Element for Dilation

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

41. Structuring Element for Dilation

42. 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

43. 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

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

45. Dilation using Union Formula Center of the circle This circle will create one point This circle will create no point

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

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

48. Illustration of Extensitivity of Dilation • • • • • • • • • • • • • • A B Replaced with Here 0 does not belong to B and A is not included in A B

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