1、Mathematical MorphologyA Geometric Approach to Image Processing and Analysis2Image Analysis and Processing Geometry Space Abstract SpaceLinearNon LinearLinearlConvolutionlFourier,WaveletlTomographlSplinesStatisticallMultivariate analysislNeural SetslStereologyMorphologicallMorphological FilteringlGr
2、anulometrylRandom setslWatershedsSyntacticallSemantic approachlGrammarslIndexation结构元素4数学形态学研究几何结构的基本思想是利用“结构元素”(structuring element)探测图像,看能否将这个结构元素很好地填放在图像的内部,同时验证填放结构元素的方法是否有效。4结构元素的设计在处理实际问题中是非常重要的,它决定了抽取信息的结果,构造不同的结构元素,就可以完成不同的分析任务。AB二值图像的表示4一个矩阵4图像中位于原点处的像素值用带“”号下标的字体表示,并约定用“1”表示活动(前景)像素,用“0”表示
3、不活动(背景)像素。处理图像时,假定所有不在矩阵边框内的像素均为“0”值。4如有界矩阵S,其中含有一个23的矩形4带下标的元素0表示 原点的位置 0000011101110000S图像形态学初步4腐蚀4膨胀4膨胀与腐蚀的代数意义4膨胀与腐蚀的滤波特点4小结4作业基础平移概念将一个集合A平移距离x,表示为A+x:AaxaxAaxa+xA+xA二值图像的平移1、腐蚀(erode)定义集合A被集合B“腐蚀”,表示为BA:AxBxBA其中A为输入图像,B为结构元素 腐蚀的结果由将B平移x,但仍然包含在A内的所有x点组成。如果将B看作模板,则由在平移过程中,所有可以填入A 内部的模板的原点组成。腐蚀还有
4、几种常用表示:E(A,B),ERODE(A,B)腐蚀的性质1、如果原点在结构元素的内部,则腐蚀后的图像为原图像的一个子集,即腐蚀具有收缩图像的作用,也就是可以去除比模板小的噪声;2、如果原点不在结构元素的内部,则腐蚀后的图像可能不在原图像的内部,反而可能具有填充图像内孔洞的作用。AB原点在结构元素内部时的腐蚀AB原点不在结构元素内部时的腐蚀数值举例010101001101,1 1011 10AB011000010000000BA原点不在结构元素内11111111101111,101111101110101111111101AB0101110010101000111100110100011111
5、0BA11111111111111111111111111111111111)(BAA2、膨胀(、膨胀(dilate)A被B膨胀表示为BA:ccBABA)(Ac表示A 的补集。膨胀还可以用D(A,B),DILATE(A,B)表示 ABAB利用圆盘对矩形膨胀,尖角被磨圆性质1、对前景的外部作了平滑滤波 2、满足交换律 ABBA:BbbABA3、膨胀的等效表达式:AaaBBA膨胀ABAB离散情况下的明克夫斯基和(膨胀)小结小结1、膨胀可以实现图像缝隙的连接;2、腐蚀可以去除小颗粒噪声或毛刺;3、多种组合,实现开、闭、击中、击不中;4、典型的非线性滤波,滤波效果可交互控制;5、模板设计与算法设计膨胀
6、、腐蚀的组合滤波效果应用4边界提取 4骨架抽取 4极限腐蚀 4Top-hat变换 4流域变换 4灰度形态变换 Basic Morphology OperatorspDilation,Erosion,Opening,Closing Basic Morphology AlgorithmspBoundary extractionpRegion fillingpHit-or-Miss transformationpThinningpThickeningpPruningApplicationsFilteringSegmentationCoding&Compression Object detection
7、Computer visionQuestionWhat is Mathematical Morphology?A Commercial Answer Mathematical Morphology is FAST!Mathematical Morphology is CHEAP!PhysicalSignal analysis techniques based on set theory aiming at the study of relations between physical and structural propertiesSignal ProcessingNon linear si
8、gnal processing techniques based on minimum and maximum operationsEngineeringAlgorithm and software/hardware tools for developing signal processing applicationsAn(imprecise)Mathematical AnswerA mathematical tool for investigating geometric structure in binary and grayscale images.Shape Processing an
9、d Analysis Visual perception requires transformation of images so as to make explicit particular shape information.Goal:Distinguish meaningful shape information from irrelevant one.The vast majority of shape processing and analysis techniques are based on designing a shape operator which satisfies d
10、esirable properties.ExampleZImage analysis consists of obtaining measurements characteristic to images under consideration.ZGeometric measurements(e.g.,object location,orientation,area,length of perimeter)Grayscale ImagesBinary ImagesMorphological Shape Operators Objects are opaque and shape informa
11、tion is not additive!Shapes are usually combined by means of Set Union(overlapping objects):Set Intersection(occluded objects):XX12X1X2XXXXc2112X2X1Morphological Shape Operators Shape operators should distribute over set-unions and set-intersections(a type of“linearity”)!()=()()XXXX1212Morphological
12、Dilation()=()()XXXX1212MorphologicalErosionMorphological Operators Erosions and dilations are the most elementary operators of mathematical morphology.More complicated morphological operators can be designed by means of combining erosions and dilations.QuestionWhat is Mathematical Morphology?A(preci
13、se)Mathematical AnswerAlgebra Complete LatticesOperators Erosions-DilationsMathematical MorphologyTopology Hit-or-MissGeometry Convexity-Connectivity DistanceApplications Image Processing and AnalysisA mathematical tool that studies operators on complete latticesMathematicalLattice theory for object
14、s or operators in continuous or discrete spacesTopology and stochastic modelsTranslation Invariant Operators()=()XXhhXXhhMorphological Erosion()=()()XXXX1212“LINEARITY”()=()XXhhTRANSLATION INVARIANCE|)(XBhBXXhMorphological ErosionBhXBX|)(XBhBXXhMorphological ErosionPablo Picasso,Pass with the Cape,1
15、960StructuringElementMorphological Dilation()=()()XXXX1212“LINEARITY”()=()XXhhTRANSLATION INVARIANCE|)(XBhBXXhMorphological Dilation|)(XBhBXXhXBXhBMorphological DilationPablo Picasso,Pass with the Cape,1960StructuringElementMorphological DilationMorphological Opening|)(XBBBBXBXhhBhBXXBBXBX)(Morpholo
16、gical OpeningPablo Picasso,Pass with the Cape,1960StructuringElementMorphological Opening Is a smoothing filter!Amount and type of smoothing is determined by the shape and size of the structuring element.Approximates a shape from below,since XBXMorphological Opening&ClosingDilation,Erosion,Opening,C
17、losing Morphological Opening&Closing Opening Smoothes the contour Breaks narrow isthmuses Eliminates thin protrusions X B is a subset of X Closing Smoothes the contour Fuses narrow breaks Eliminates small holl Fill gaps in the contour X B is a subset of XFiltering ExampleBoundary Extraction)()(XXXBQ
18、uestionHenri Matisse,Woman with Amphoraand Pomegranates,1952Can we automatically extract the largest connected component(the womans body)in this image?AnswerORIGINALEROSION(MARKER)ORIGINAL B MARKERMARKERMARKERMARKERThis is a morphological operator that filters out connected image components of a cer
19、tain size and shape CONNECTED OPERATORS!Connected Component,|)(XCCxCXxC)()(XXXxxReconstruction)()()(XXxXx Geodesic Reconstruction)()(XXxMxM)()(0XXMM),()(xBXMXxM Region Filling 8-connected boundary Beginning with a point P inside X and let Do UntilPX 0ckkABXX)(11kkXXImportant ResultsXXXX1212()()Incre
20、asingOperator+!)(BXBXXBBTranslationInvariantOperator()=()XXhhMain Idea Examine the geometrical structure of an image by matching it with small patterns at various locations.By varying the size and shape of the matching patterns,called structuring elements,one can extract useful information about the
21、 shape of the different parts of the image and their interrelations.Results in image operators which are well suited for the analysis of the geometrical and topological structure of an image.QuestionWhat about gray-scale images?Greyscale Erosion()=()()FFFF1212“LINEARITY”MINIMUM)()()()(hBhxFxBFxFh()=
22、()()()=()()F xhFxhF xvFxvTRANSLATION INVARIANCEGrayscale Dilation()()=()()()FxFB xF hB x hh()=()()FFFF1212“LINEARITY”MAXIMUM()=()()()=()()F xhFxhF xvFxvTRANSLATIONINVARIANCEGrayscale Dilation&Erosion Grayscale Opening&Closing Greyscale OpeningStructuringElementGrayscale MorphologyORIGINALEROSIONDILA
23、TIONOPENINGRemark)()(hFxBFxBhFlat Erosionotherwise,for,0)(BxxBFlat Dilation)()(hFxBFxBhAn Application-Target DetectionDATAMARKEROPENINGMORPHOLOGICAL RECONSTRUCTIONTargetsAn Application:Target DetectionMORPHOLOGICALRECONSTRUCTIONMARKERCLOSINGDATAAn Application:Target DetectionTHRESHOLDINGDATAFINAL RESULTCorrectly detected targetsIncorrectly detected target