MorphologicalImageProcessing1Introduction•Morphologydenotesabranchofbiologythatdealswiththeformandstructureofanimalsandplants•Atoolforextractingimagecomponentsthatareusefulintherepresentationanddescriptionofregionshape,suchasboundaries,skeletonsandconvexhull.MorphologicalImageProcessing2Introduction•Mathematicalmorphologyisbasedonsettheory.–Binaryimage:2-Dintegerspace–Grayscaleimage:3-Dintegerspace–Colorandtimevaryinginformation•Morphologicalprocessingbeginsatransitionfromafocusonpurelyimageprocessingtocomputervision.MorphologicalImageProcessing3Overview•Basicconceptsofsettheory•Importantconceptsinmathematicalmorphology•Somebasicmorphologicalalgorithms•TheextensionstograyscaleimageMorphologicalImageProcessing4BasicConceptsfromSetTheory•Elementofaset•Subset•Unionoftwosets•Intersectionoftwosets•Mutuallyexclusiveoftwosets•Complementofaset•DifferenceoftwosetsMorphologicalImageProcessing5BasicConcepts(cont.)•Reflectionofaset•TranslationofasetMorphologicalImageProcessing6BasicConcepts(cont.)MorphologicalImageProcessing7BasicConcepts(cont.)MorphologicalImageProcessing8LogicOperationsofBinaryImages•Powerfultoolstoimplementimageprocessingalgorithmbasedonmorphology.•AND,ORandNOT–Pixelbasedoperation–Functionallycomplete:canbecombinedtoformanyotherlogicoperationMorphologicalImageProcessing9LogicOperations(cont.)MorphologicalImageProcessing10ConceptsofMorphology•DilationandErosion–Twofundamentalmorphologicalprocessing•Dilation–AandBaresetsinZ2,thedilationofAbyB,denotedisdefinedasBA})(|{emptyABzBAzMorphologicalImageProcessing11ConceptsofMorphology(cont.)•ThreestepstocalculatedilationofAbyB.–ReflectionofB–Shiftingthereflectionbyz–Thesetofalldisplacements,z,suchthatBandAoverlapbyatleastoneelements.–Bisrefereedtoasthestructuringelement•ExampleMorphologicalImageProcessing12ConceptsofMorphology(cont.)MorphologicalImageProcessing13ConceptsofMorphology(cont.)MorphologicalImageProcessing14ConceptsofMorphology(cont.)•Erosion–AandBaresetsinZ2,theerosionofAbyB,denotedisdefinedas–TheerosionofAbyBisthesetofallpointszsuchthatB,translatedbyz,iscontainedinA.BA})(|{ABzBAzMorphologicalImageProcessing15ConceptsofMorphology(cont.)•ExampleMorphologicalImageProcessing16ConceptsofMorphology(cont.)MorphologicalImageProcessing17ConceptsofMorphology(cont.)•Relationbetweendilationanderosion–DualsofeachotherwithrespecttosetcomplementationandreflectionMorphologicalImageProcessing18ConceptsofMorphology(cont.)•OpeningandClosing•Opening–Tosmooththecontourofanobjectandeliminatesthinprotrusions.–Definedas,BBABA)(MorphologicalImageProcessing19ConceptsofMorphology(cont.)–TheunionofalltranslatesofBthatfitintoA})(|){(ABBBAzzMorphologicalImageProcessing20ConceptsofMorphology(cont.)–Properties•OpeningofAbyBisasubsetofA•IfCisasubsetofD,thenopeningofCbyBisasubsetofopeningofDbyB.•.BABBA)(MorphologicalImageProcessing21ConceptsofMorphology(cont.)•Closing–Tosmoothsectionsofcontours,fusesnarrowbreaksandlongthingulfs,eliminatessmallholesandfillsgapsinthecontour.–DefinedasBBABA)(MorphologicalImageProcessing22ConceptsofMorphology(cont.)MorphologicalImageProcessing23ConceptsofMorphology(cont.)–Properties•AisasubsetofClosingofAbyB•IfCisasubsetofD,thenclosingofCbyBisasubsetofclosingofDbyB.•.BABBA)(MorphologicalImageProcessing24ConceptsofMorphology(cont.)•Relationbetweenopeningandclosing:dualsofeachotherwithrespecttosetcomplementationandreflection.•ComprehensiveexamplesMorphologicalImageProcessing25ConceptsofMorphology(cont.)MorphologicalImageProcessing26ConceptsofMorphology(cont.)MorphologicalImageProcessing27MorphologicalAlgorithms•Hit-or-MissTransformation–Basictoolforshapedetection–Twostepsofdetection•Object•BackgroundMorphologicalImageProcessing28MorphologicalAlgorithmsMorphologicalImageProcessing29MorphologicalAlgorithms•LetBdenotesthesetcomposedofXanditsbackground,thematchofBinAis•GeneralizedVersion)]([)(*XWAXABAc][)(*21BABABAcMorphologicalImageProcessing30MorphologicalAlgorithms•Assumption–Twoormoreobjectsaredistinctonlyiftheyformdisjoint(disconnected)sets.•Reducedform–Ifwedonotcareaboutthebackground,thehit-or-misstransformreducestosimpleerosionMorphologicalImageProcessing31MorphologicalAlgorithms•BoundaryExtraction–TheboundaryofasetAcanbeobtainedbyfirsterodingAbyBandthenperformingthesetdifferencebetweenAanditserosion)()(BAAAMorphologicalImageProcessing32MorphologicalAlgorithmsMorphologicalImageProcessing33MorphologicalAlgorithmsMorphologicalImageProcessing34MorphologicalAlgorithms•RegionFilling,...3,2,1,)(1kABXXckkMorphologicalImageProcessing35MorphologicalAlgorithmsMorphologicalImageProcessing36MorphologicalAlgorithmsMorphologicalImageProcessing37MorphologicalAlgorithms•ExtractionofConnectedComponents,...3,2,1,)(1kABXXkkMorphologicalImageProcessing38MorphologicalAlgorithmsMorphologicalImageProcessing39MorphologicalAlgorithmsMorphologicalImageProcessing40MorphologicalAlgorithms•ConvexHull–AsetAissaidtobeconvexifthestraightlinesegmentjoininganytwopointsinAliesentirelywithinA.–ConvexHullHofanarbitrarysetSisthesmall