Create Presentation
Download Presentation

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**MATHEMATICS OF BINARY MORPHOLOGY**and APPLICATIONS IN Vision**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**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)**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**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**Mathematical Morphology - Set-theoretic representation**for binary shapes**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.**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**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.**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**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**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**Libraries of Structuring Elements**• Application specific structuring elements created by the user**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**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**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**The Concept**of Minkowski Sum**Minkowski’s Sum**Definition of Minkowski’s sum of sets S and B : l Minkowski’s Sum l**Another View at Dilation**Dilation : l Dilation Dilation**Comparison of Dilation and Minkowski sum**Dilation : Bx = x and b are points Minkowski sum**It is like dilation but we are not going around , we go**only to top and to right**Dilation and Minkowski Set**Dilation and Minkowski Set are denoted by + or by No unified notation**Dilation is not the Minkowski’s sum**Minkowski’s Sum l**Dilation is not the Minkowski’s sum**l b b b b Dilation l Dilation l B is not the same as B**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**Dilation fills holes**• Fills in holes. • Smoothes object boundaries. • Adds an extra outer ring of pixels onto object boundary, ie, object becomes slightly larger.**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.**More Erode and Dilate Examples**Input Image Dilated Eroded Made in Paint Shop Pro**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**Dilation explained by shape of A**• • • • • • • • • • • • • • • • Shape of A repeated without shift B Shape of A repeated with shift A**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:**Structuring Element for Dilation**Length 6 Length 5**Structuring Element for Dilation**Single point in Image replaced with this in the Result**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**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**Dilation versus translation, illustrated**• • • • • • • • • • • • • • • • • • • • • Element (0,0) Shift vector (0,1) Shift vector (0,0) B**Dilation using Union Formula**Center of the circle This circle will create one point This circle will create no point**Example of Dilation with various sizes of structuring**elements Structuring Element Pablo Picasso, Pass with the Cape, 1960**Mathematical Properties of Dilation**• Commutative • Associative • Extensivity • Dilation is increasing Illustrated in next slide**Illustration of Extensitivity of Dilation**• • • • • • • • • • • • • • A B Replaced with Here 0 does not belong to B and A is not included in A B**More Properties of Dilation**• Translation Invariance • Linearity • Containment • Decomposition of structuring element