Morphological Image ProcessingMorphologySet Theory: Definitions and NotationsSet RelationsTranslation and ReflectionLogic Operations Between Binary ImagesDilation and ErosionExample of DilationExample of ErosionOpeningClosingExample: Opening & ClosingFinger Print Processing using Opening and ClosingHit-or-Miss Transformation for shape detectionHit-or-Miss TransformHit-or-Miss TransformMorphological Boundary ExtractionExample of Boundary ExtractionRegion FillingRegion Filling ExampleConnected Component ExtractionThinningThickeningSkeletonSkeleton EquationsIllustration of Skeleton ComputationPruning1ECE533 Digital Image ProcessingMorphological Image Processing2ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuMorphologyMorphology»The branch of biology that deals with the form and structure of organisms without consideration of functionMathematical Morphology»Mathematical tool for processing shapes in image, including boundaries, skeletons, convex hulls, etc. »Use of set theoretical approach3ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuSet Theory: Definitions and NotationsSET ()»A collection of objects (elements)membership ()»If is an element (member) of a set , we write Subset ()»Let A, B are two sets. If for every a A, we also have a B, then the set A is a subset of B, that is, A B»If A B and B A, then A = B. Empty set ()Complement set»If A , then its complement set Ac = {| , and A}Union ()»A B = {| A or B}Intersection ()»A B = {| A and B}Set difference (-)»B\A = B Ac»Note that B-A A-BDisjoint sets »A and B are disjoint (mutually exclusive) if A B= 4ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuSet Relations5ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuTranslation and ReflectionTranslation (A)z = { c| c = a + z, for a A } Reflection: BbbwwB for ,|ˆ6ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuLogic Operations Between Binary Images7ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuDilation and ErosionDilationB: structure elementErosionA B = {z | (B)z A}Relations(A B)c = AABzABzBAzzˆ|ˆ|ˆcA B�8ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuExample of Dilation9ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuExample of Erosion10ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuOpeningA B = (A B) B11ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuClosingA - B = (A B) B12ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuExample: Opening & Closing13ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuFinger Print Processing using Opening and Closing14ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuHit-or-Miss Transformation for shape detectionFigure 9.12 (a) Set A, (b) A window W and the localBackground of X w.r.t. W, W-X. (c) Ac. (d) AXIntersection of (d) and (e) shows the locationof the origin of X, as desired. (d)(e)A15ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuHit-or-Miss TransformDenote B1: object, B2: local background of B1, then, orReason to have a local background:»Two or more objects are distinct only if they form disjoint (disconnected) sets. This is guaranteed by requiring that each object have at least a one-pixel-thick background around it.16ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuHit-or-Miss Transform Previous example does not contain don’t care entries. In structure element»1 – foreground»0 – background»X – don’t careOutput is 1 if exact match of both foreground and background pixels.Hitnmiss.m»+1: foreground»-1: background»0: don’t careHitnmiss.mmatch not : match : 111010111111111111*.111010111111010111111111111*.11101011117ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuMorphological Boundary Extraction (A) = A − (A B) (9.5-1)18ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuExample of Boundary Extraction19ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuRegion Filling AXYkABXXkckk,3,2,1;1Fig915.m20ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuRegion Filling Example21ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuConnected Component ExtractionY: connected component in set A,p: a known point in Y kkkkkXYXXABXXpXthen if110Fig915.m22ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuThinningThinning is often accomplished using a sequence of rotated structuring elements (a). Given a set A (b), results of thinning with first element is shown in (c), and the next 7 elements (d) – (i). There is no change between 7th and 8th elements, and no change after first 3 elements. Then it converges to a m-connectivity. nnBBBABABBBBBAhitnmissABA2121,,,Fig921.m23ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuThickeningA-B = A hitnmiss(A,B)A-{B} =((…(A-B1) -B2) … -Bn) Thickening is the dual of thinning operation. Usually, thickening a set A is accomplished by thinning Ac, and then complement the result. Then a post-processing prunning process is applied to remove disconnected points as shown to the left.24ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuSkeletonA skeleton of a set A consists of points z that is the center of a maximum diskA maximum disk is a circle in A that can not be enclosed by another circle that is also in A. Figure 9.23. (a) set A, (b), (c) sets of possible maximum disks. (d) dotted line is the skeleton.25ECE533 Digital Image Processing(c) 2003-2006 by Yu Hen HuSkeleton Equations10( ) ( ) (9.5-11)( ( ) ) (9.5-15)KkkKkkS A S AA S A kB==== �UUDefine k consecutive erosions of A as:AkB = ( …(AB)B) …)B) (9.5-13)Sk(A) = (AkB) − (AkB)B (9.5-12)Let K = max{k | (AkB) } (9.5-14)Then the skeleton can be found as:26ECE533 Digital
View Full Document