450 likes | 636 Views
Chap 6 Morphological Processing. What is mathematic morphology ( 形态学 ) ? The mathematic way of analyzing geometric shape and structure. Its theory foundation is set algebra ( 代数 ) . Can describe the geometric shape using set theory. Chap 6 Morphological Processing.
E N D
Chap 6 Morphological Processing What is mathematic morphology (形态学)? • The mathematic way of analyzing geometric shape and structure. • Its theory foundation is set algebra (代数). • Can describe the geometric shape using set theory.
Chap 6 Morphological Processing • The origin and development: • 六十年代 • 1964年,法国巴黎矿业学院,G. Matheron和 J.Serra,铁矿的定量岩石分析,预测开采价值; • 1966年,G.Matheron, J.Serra和Ph. Formeny奠定了数学形态学; • 1968年4月,法国成立枫丹白露数学形态学研究中心;
Chap 6 Morphological Processing • The origin and development: • 七十年代 • TAS(纹理分析系统); • 大量专利; • 但仅面向用户和自然科学家;
Chap 6 Morphological Processing • The origin and development: • 八十年代,数学形态学广为人知 • 1982年,Serra,”Image Analysis and Mathematical Morphology”; • 84年枫丹白露成立MorphoSystem指纹识别公司; • 86年枫丹白露成立Noesis图象处理公司; • 全球成立十几家数学形态学研究中心,进一步奠定理论基础 • 1985年后,它逐渐成为分析图像几何特征的工具。
The origin and development: • 九十年代以后 现已应用在多门学科的数字图像分析和处理的过程中,进行图象增强、分割、恢复、边缘检测、纹理分析等,例如: • 医学和生物学中应用数学形态学对细胞进行检测、研究心脏的运动过程及对脊椎骨癌图像进行自动数量描述; • 在工业控制领域应用数学形态学进行食品平检验(碎米)和电子线路特征分析; • 在交通管制中监测汽车的运动情况等等。 • 另外,数学形态学在金相学、指纹检测、经济地理、合成音乐和断层X光照像等领域也有良好的应用前景。
Chap 6 Morphological Processing The purpose of morphological processing: • used to extract image components that are useful in the representation and description of region shape, such as • boundaries extraction • skeletons • morphological filtering • thinning (细化) • pruning (修剪)
Chap 6 Morphological Processing Contents: • Basic symbols and terms • Element and Set • Subset • Hit and Miss • Structuring element • Basic morphological operators • Erosion • Other morphological operators and applications • Opening and Closing ………… • Foreground and Background • Basic operators of set • Translation and Reflection • Dilation
b a A 6.1 Basic Symbols and Terms • Element and Set • An image is called as a set. • For an image A, if pixel ‘a’ locates in the region of A, ‘a’ is called as the element of A, written as, aA • Otherwise, written as, aA
6.1 Basic Symbols and Terms • Subset • For two images A and B, if each pixel of B locates in the region of A, B is called as the subset of A, written as, BA • It is said that B is the subset of A, or B is inclued in A. • When BA and there exists at least a pixel ‘a’ of A, aA and aB, it is written as BA • BA is equal to AB, and BA is equal to AB
6.1 Basic Symbols and Terms • Z2 and Z3 • In mathematic morphology, the set represents objects in an image. • As we known, there are two kinds of image: • binary image Z2 the element of the set is the coordinates (x,y) of pixel belong to the object • gray-scaled image Z3 the element of the set is the coordinates (x,y) of pixel belong to the object and the gray levels
6.1 Basic Symbols and Terms • Foreground and Background For a binary image, generally, • let the set ‘A’, which includes all pixels that have value ‘1’ in the image, represents the object, also called as foreground. • Contrarily, the set ‘B’, which includes all pixels that have value ‘0’ in the image, represents the background. • In other words, the set ‘A’ corresponds to the binary image.
A A∪B A∩B the union (并) of A and B the intersection (交) of A and B B AC A-B the complement (补) of A the difference (差) between A and B • Basic operators of set Consider: A-B ?=B-A
4 3 2 1 4 3 2 1 4 3 2 1 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 Image A Point b A[b] or A[1,1] 6.1 Basic Symbols and Terms • Translation • Let A is an image, b is a point, then the translation of A by b can be defined as,
-4 -3 -2 -1 0 4 3 2 1 -1 -2 -3 -4 0 1 2 3 4 Image A Av 6.1 Basic Symbols and Terms • Reflection The reflection of set A is defined as, Av={a|-aA} See ‘imreflection.m’
6.1 Basic Symbols and Terms • Reflection See ‘imreflection.m’ h’ w w’ (imh,imw) h
A A B B B miss A B hit A 6.1 Basic Symbols and Terms • Hit (击中) and Miss For image A and B, • If AB, it is called as ‘B hit A’, written as, BA • Otherwise, it is called as ‘B miss A’.
6.1 Basic Symbols and Terms • Structuring Element • For an image, in order to find its structure, it is necessary to observe the relationship between each part of the image. Finally, a set of this relationship is obtained. • When we observe the image, a kind of probe (探针), called as ‘structuring element’, is shifted in the image. • Generally, the size of structuring element is smaller than that of image.
S[x2] S[x1] S[x3] 6.1 Basic Symbols and Terms • Structuring Element • Let structuring element S locates at position x. There are three kinds of relationship between image X and S[x]. • S[x1] is included in X: S[x1]X • S[x2] hits X: S[x2]X • S[x3] misses X: S[x3]X= • S[x]与X相关最大 • S[x]与X部分相关 • S[x]与X不相关
6.1 Basic Symbols and Terms 5 basic structuring elements
6.2.1 Erosion • The points set, which satisfies formula S[x]X, xX is called as the erosion of S to X, written as, XS • Also, defined as, XS={x|S[x]X}
5 4 3 2 1 XS 0 1 2 3 4 5 6.2.1 Erosion For example, 5 4 3 2 1 X S 0 1 2 3 4 5
5 4 3 2 1 XS 0 1 2 3 4 5 6.2.1 Erosion Consider, 5 4 3 2 1 X S 0 1 2 3 4 5
6.2.1 Erosion • See ‘imageerode.m’ • Note, for an image X, with different S or same S and different origin of S, the result of erosion is different.
Origin S X-A A=XS 6.2.1 Erosion Application: obtaining boundary See ‘extractedge_erose.m’ X
6.2.1 Erosion • Application: Eliminating the objects, whose size are smaller than that of structuring element. See ‘denoise_erose.m’ • Review: Other ways to denoise See chapter 3 and chapter 4, enhancement, smoothing
6.2.1 Erosion • Application: Separating the objects, between which there exist smaller connected region. See ‘separateobject_erose.m’
6.2.1 Erosion Problem: • Size of objects after erosion is reduced • How to eliminate the holes inside the objects
6.2.2 Dilation • Expanding each point x in X to S[x], written as, XS • defined as, XS={x|S[x]x} XS={X[s]|sS} XS={S[x]|xX}
XS 5 4 3 2 1 S X 0 1 2 3 4 5 X[s1] X[s3] 5 4 3 2 1 5 4 3 2 1 5 4 3 2 1 5 4 3 2 1 X[s2] 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 XS={X[s]|sS} • S: s1(0,0), s2(0,1), s3(1,0) • X[s]={x+s|xX} (translation) • XS=X[s1]X[s2]X[s3]
6.2.2 Dilation • See ‘dilation.m’ • Note, for an image X, with different S or same S and different origin of S, the result of dilation is different.
6.3.1 Opening (开运算) • For image X and structuring element S, ‘opening’ is denoted as, X○S • defined as, X○S=(XS)S X○S={S[x]|S[x]X} • namely, restoring the eroded image using dilation operation. But the restored image is not equal to the original image. See ‘imageopening.m’
6.3.1 Opening Application: smoothing • detecting accessory (零件) using opening operaton • See ‘smoothing_opening.m’
6.3.1 Opening Application:
6.3.2 Closing (闭运算) • For image X and structuring element S, ‘closing’ is denoted as, X●S • defined as, X●S=(XS)S • namely, restoring the dilated image using erosion operation. • same as opening, the restored image is not equal to the original image • Note, the result of opening and closing is different. See ‘imageclosing.m’
6.3.2 Closing Application: connect two adjacent objects See ‘connect_closing.m’
6.3.2 Closing (闭运算) Application:
6.3 Opening and Closing Application of opening and closing See ‘findboundary.m’
6.3.3 Hit-or-Miss Transformation For image X and structuring element S, • Let S consists of S1 and S2 S= S1S2 S1S2= • X hit by S is defined as, XS=(XS1)(XCS2) =(XS1)(XS2v)C =(XS1)-(XS2V) • using hit-or-miss transformation, we can exactly locate S in X. reflection