1 What is mathematic morphology What is mathematic morphology ( ( 形形形 形形形 ) ) ? ? The mathematic way of analyzing geometri The mathematic way of analyzing geometri c shape and structure. c shape and structure. Its theory foundation is set algebra ( Its theory foundation is set algebra ( 形 形 形 形 ). ). Can describe the geometric shape using s Can describe the geometric shape using s et theory. et theory. Chap 6 Morphological Chap 6 Morphological Processing Processing
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. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
11
What is mathematic morphology What is mathematic morphology (( 形态学形态学 ))?? The mathematic way of analyzing geometric shaThe mathematic way of analyzing geometric sha
pe and structure.pe and structure.
Its theory foundation is set algebra (Its theory foundation is set algebra ( 代数代数 ).).
Can describe the geometric shape using set theoCan describe the geometric shape using set theory.ry.
Chap 6 Morphological Chap 6 Morphological ProcessingProcessing
22
The origin and development:The origin and development: 六十年代六十年代
19641964 年,法国巴黎矿业学院,年,法国巴黎矿业学院, G. MatheronG. Matheron 和 和 J.J.SerraSerra ,铁矿的定量岩石分析,预测开采价值;,铁矿的定量岩石分析,预测开采价值;
合成音乐和断层合成音乐和断层 XX 光照像等领域也有良好的应用前光照像等领域也有良好的应用前景。景。
66
Chap 6 Morphological Chap 6 Morphological ProcessingProcessing
The purpose of morphological processing:The purpose of morphological processing: used to extract image components that are usefuused to extract image components that are usefu
l in the representation and description of region l in the representation and description of region shape, such asshape, such as
Other morphological operators and Other morphological operators and
applicationsapplications
Opening and Closing …………Opening and Closing …………
Chap 6 Morphological Chap 6 Morphological ProcessingProcessing
Foreground and BackgroundForeground and Background
Basic operators of setBasic operators of set
Translation and ReflectionTranslation and Reflection
DilationDilation
88
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
Element and SetElement and Set
An image is called as a set.An image is called as a set.
For an image A, if pixel ‘a’ locates in the For an image A, if pixel ‘a’ locates in the
region of A, ‘a’ is called as the element of region of A, ‘a’ is called as the element of
A, written as,A, written as,
aaAA
Otherwise, written as,Otherwise, written as,
aaAA AA
aa
bb
99
SubsetSubset For two images A and B, if each pixel of B locates 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, win the region of A, B is called as the subset of A, written as,ritten as,
BBA A
It is said that B is the subset of A, or B is inclued iIt is said that B is the subset of A, or B is inclued in A.n A.
When When BBAA and there exists at least a pixel ‘a’ and there exists at least a pixel ‘a’ of A, of A, aaA and aA and aBB, it is written as , it is written as BBAA
BBA is equal toA is equal to A ABB, and B, and BA is equal to A is equal to AABB
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
1010
ZZ22 and Z and Z33
In mathematic morphology, the set In mathematic morphology, the set represents objects in an image. represents objects in an image.
As we known, there are two kinds of As we known, there are two kinds of image:image:
binary image binary image Z Z22
the element of the set is the the element of the set is the coordinatescoordinates (x,y) of pixel belong to the (x,y) of pixel belong to the objectobject
gray-scaled image gray-scaled image Z Z33
the element of the set is the the element of the set is the coordinatescoordinates (x,y) of pixel belong to the (x,y) of pixel belong to the object and the object and the gray levelsgray levels
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
1111
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
Foreground and BackgroundForeground and Background
For a binary image, generally, For a binary image, generally,
let the set ‘A’, which includes all pixels let the set ‘A’, which includes all pixels
that have value ‘1’ in the image, that have value ‘1’ in the image,
represents the object, also called as represents the object, also called as
foreground.foreground.
Contrarily, the set ‘B’, which includes all Contrarily, the set ‘B’, which includes all
pixels that have value ‘0’ in the image, pixels that have value ‘0’ in the image,
represents the background.represents the background.
In other words, the set ‘A’ corresponds to In other words, the set ‘A’ corresponds to
the binary image.the binary image.
1212
Basic operators of setBasic operators of set
BB
AA
the union the union
(( 并并 ) of A ) of A
and Band B
A∪BA∪B
the intersection the intersection
( ( 交交 ) ) of A and of A and
BB
AA∩∩BB
the the
complement complement
(( 补补 ) of A) of A
AACC
the difference the difference
(( 差差 ) between A ) between A
and Band B
AA--BBConsider: Consider:
A-B ?=B-AA-B ?=B-A
1313
TranslationTranslation
Let A is an image, b is a point, then the Let A is an image, b is a point, then the
translation of A by b can be defined as,translation of A by b can be defined as,
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
A b a b a A
44
33
22
11
0 1 2 3 40 1 2 3 4
44
33
22
11
0 1 2 3 40 1 2 3 4
Image A Point Image A Point
bb
44
33
22
11
0 1 2 3 40 1 2 3 4
A[b] or A[b] or
A[1,1]A[1,1]
1414
ReflectionReflection
The reflection of set A is defined as,The reflection of set A is defined as,
AAvv={a|-a={a|-aA}A}
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
44
33
22
11
0 1 2 3 40 1 2 3 4
Image AImage A
-1-1
-2-2
-3-3
-4-4
-4 -3 -2 -1 0-4 -3 -2 -1 0
AAvv
See ‘imreflection.See ‘imreflection.m’m’
1515
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
ReflectionReflection
See ‘imreflection.m’See ‘imreflection.m’
hh
wwhh
’’
w’w’
(imh,imw)(imh,imw)
1 0
0 1
1 1 1 1 1
h imh h
w imw w
h h imh
w w imw
1616
Hit (Hit ( 击中击中 ) and Miss) and Miss
For image A and B,For image A and B,
If If AABB, it is called as , it is called as ‘B hit A’‘B hit A’, written as,, written as,
BBAA
Otherwise, it is called as Otherwise, it is called as ‘B miss A’‘B miss A’..
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
B hit AB hit A
AA
BB
B miss AB miss A
AA
BB
1717
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
Structuring Element Structuring Element For an image, in order to find its structure, it is nFor an image, in order to find its structure, it is n
ecessary to observe the relationship between eaecessary to observe the relationship between each part of the image. Finally, a set of this relationch part of the image. Finally, a set of this relationship is obtained.ship is obtained.
When we observe the image, a kind of probe (When we observe the image, a kind of probe ( 探探针针 ), called as ‘structuring element’, is shifted i), called as ‘structuring element’, is shifted in the image. n the image.
Generally, Generally, the size of structuring element is smalthe size of structuring element is smaller than that of image.ler than that of image.
1818
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
Structuring Element Structuring Element
Let structuring element S locates at Let structuring element S locates at
position x. There are three kinds of position x. There are three kinds of
relationship between image X and S[x].relationship between image X and S[x].
S[xS[x11] is included in X: ] is included in X: S[xS[x11]]XX
6.1 Basic Symbols and Terms6.1 Basic Symbols and Terms
5 basic structuring elements5 basic structuring elements
2020
6.2.1 Erosion6.2.1 Erosion
The points set, which satisfies The points set, which satisfies
formulaformula
S[x]S[x]X, xX, xXX
is called as the erosion of S to X, is called as the erosion of S to X,
written as,written as,
XXSS
Also, defined as,Also, defined as,
XXS={x|S[x]S={x|S[x]X}X}
2121
55
44
33
22
11
0 1 2 3 4 50 1 2 3 4 5
XXSS
6.2.1 Erosion6.2.1 Erosion
For example,For example,
55
44
33
22
11
0 1 2 3 4 50 1 2 3 4 5
XX
SS
2222
6.2.1 Erosion6.2.1 Erosion
Consider,Consider,
55
44
33
22
11
0 1 2 3 4 50 1 2 3 4 5
XX
SS
55
44
33
22
11
0 1 2 3 4 50 1 2 3 4 5
XXSS
2323
6.2.1 Erosion6.2.1 Erosion
See ‘imageerode.m’See ‘imageerode.m’
Note, for an image X, with different S or samNote, for an image X, with different S or same S and different origin of S, the result of eroe S and different origin of S, the result of erosion is different.sion is different.
See ‘extractedge_erose.m’See ‘extractedge_erose.m’
XXSS
OriginOrigin
A=XA=XSS X-AX-A
2525
6.2.1 Erosion6.2.1 Erosion
Application:Application:
Eliminating the objects, whose size are smaller tEliminating the objects, whose size are smaller than that of structuring element.han that of structuring element.
See ‘denoise_erose.m’See ‘denoise_erose.m’
Review:Review:
Other ways to denoiseOther ways to denoise
See chapter 3 and chapter 4, enhancement, smoSee chapter 3 and chapter 4, enhancement, smoothingothing
2626
6.2.1 Erosion6.2.1 Erosion
Application:Application:
Separating the objects, between which there exiSeparating the objects, between which there exist smaller connected region.st smaller connected region.
See ‘separateobject_erose.m’See ‘separateobject_erose.m’
2727
6.2.1 Erosion6.2.1 Erosion
Problem:Problem:
Size of objects after erosion is reducedSize of objects after erosion is reduced
How to eliminate the holes inside the How to eliminate the holes inside the
objectsobjects
2828
6.2.2 Dilation6.2.2 Dilation
Expanding each point x in X to S[x], Expanding each point x in X to S[x],
Note, for an image X, with different S or samNote, for an image X, with different S or same S and different origin of S, the result of dile S and different origin of S, the result of dilation is different.ation is different.
3131
6.3.1 Opening (6.3.1 Opening ( 开运算开运算 )) For image X and structuring element S, ‘opening’ For image X and structuring element S, ‘opening’
is denoted as,is denoted as,
XX○S○S
defined as,defined as,
X○S=(XX○S=(XS)S)SS
X○S=X○S={S[x]|S[x]{S[x]|S[x]X}X}
namely, restoring the eroded image using dilation onamely, restoring the eroded image using dilation operation. But the restored image is not equal to the peration. But the restored image is not equal to the original image.original image.
See ‘imageopening.m’See ‘imageopening.m’
3232
6.3.1 Opening6.3.1 Opening
Application: smoothingApplication: smoothing
detecting accessory (detecting accessory ( 零件零件 ) using opening o) using opening operatonperaton
See ‘smoothing_opening.m’See ‘smoothing_opening.m’
3333
6.3.1 Opening6.3.1 Opening
Application:Application:
3434
6.3.2 Closing (6.3.2 Closing ( 闭运算闭运算 )) For image X and structuring element S, ‘closing’ iFor image X and structuring element S, ‘closing’ i
s denoted as,s denoted as,
XX●●SS
defined as, defined as, XX●●S=(XS=(XS)S)SS
namely, restoring the dilated image using erosion namely, restoring the dilated image using erosion operation. operation.
same as opening, the restored image is not equal to same as opening, the restored image is not equal to the original imagethe original image
Note, the result of opening and closing is different.Note, the result of opening and closing is different.See ‘imageclosing.m’See ‘imageclosing.m’
3535
6.3.2 Closing6.3.2 Closing
Application:Application:
connect two adjacent objectsconnect two adjacent objects
See ‘connect_closing.m’See ‘connect_closing.m’
3636
6.3.2 Closing (6.3.2 Closing ( 闭运算闭运算 ))
Application:Application:
3737
6.3 Opening and Closing6.3 Opening and Closing
Application of opening and closingApplication of opening and closing