chapter 9: morphological image processingit.nrru.ac.th/krit/411304/chapter09.pdfexample: application...
TRANSCRIPT
![Page 1: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/1.jpg)
Digital Image ProcessingChapter 9:
Digital Image ProcessingChapter 9:Chapter 9:
Morphological Image ProcessingChapter 9:
Morphological Image ProcessingMorphological Image ProcessingMorphological Image Processing
![Page 2: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/2.jpg)
What are Morphological Operations? What are Morphological Operations?
Morphological operations come from the word “morphing”in Biology which means “changing a shape”.
MorphingMorphing
Image morphological operations are used to manipulateImage morphological operations are used to manipulateobject shapes such as thinning, thickening, and filling.
Binary morphological operations are derived fromset operationsset operations.
![Page 3: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/3.jpg)
Basic Set Operations Basic Set Operations
C f i bi i h lConcept of a set in binary image morphology:Each set may represent one object. Each pixel (x,y) has
i b l b lits status: belong to a set or not belong to a set.
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 4: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/4.jpg)
Translation and Reflection Operations Translation and Reflection Operations Translation ReflectionTranslation Reflection
BbbwwB for ,ˆ AazaccA z for ,
AB
A
z = (z1,z2)
(A) B̂(A)z B
![Page 5: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/5.jpg)
Logical Operations* Logical Operations*
*F bi i l(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
*For binary images only
![Page 6: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/6.jpg)
Dilation Operations Dilation Operations
ˆ ABzBA z
= Empty setDilate means “extend”
A = Object to be dilatedB St t i l tB = Structuring element
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 7: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/7.jpg)
Dilation Operations (cont.) Dilation Operations (cont.)
ˆR fl ti BReflection
StructuringStructuringElement (B)
Original image (A) Intersect pixel Center pixel
![Page 8: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/8.jpg)
Dilation Operations (cont.) Dilation Operations (cont.)
Result of Dilation Boundary of the “center pixels” where intersects A zB̂
![Page 9: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/9.jpg)
Example: Application of DilationExample: Application of Dilation
“Repair” broken characters(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
Repair broken characters
![Page 10: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/10.jpg)
Erosion Operation Erosion Operation
AA ABzBA z
Erosion means “trim”
A = Object to be erodedi lB = Structuring element
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 11: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/11.jpg)
Erosion Operations (cont.) Erosion Operations (cont.)
StructuringElement (B)Element (B)
Original image (A) Intersect pixel Center pixel
![Page 12: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/12.jpg)
Erosion Operations (cont.) Erosion Operations (cont.)
Result of ErosionB d f th “ t i l ”Boundary of the “center pixels”where B is inside A
![Page 13: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/13.jpg)
Example: Application of Dilation and ErosionExample: Application of Dilation and Erosion
Remove small objects such as noiseRemove small objects such as noise
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 14: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/14.jpg)
Duality Between Dilation and ErosionDuality Between Dilation and Erosion
BABA cc ˆ) (
Proof:where c = complement
Proof:
ABzBA cc)( ABz
ABzBAcc
z) (
ABz
ABzc
z
z
BAc ˆ
![Page 15: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/15.jpg)
Opening Operation Opening Operation
BBABA )( BBABA ) (
ABBBAor
ABBBA zz
= Combination of all parts of A that can completely contain B p p y
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
Opening eliminates narrow and small details and corners.
![Page 16: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/16.jpg)
Example of Opening Example of Opening
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 17: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/17.jpg)
Closing Operation Closing Operation
BBBA )A( BBBA )A(
Closing fills narrow gaps and notchesClosing fills narrow gaps and notches
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 18: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/18.jpg)
Example of Closing Example of Closing
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 19: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/19.jpg)
Duality Between Opening and ClosingDuality Between Opening and Closing
ˆ BABA cc ˆ
Properties OpeningProperties OpeningABA 1
BDBCDC
ABA
then If 2. .1
BABBA .3Properties ClosingProperties Closing
BAA .1Properties ClosingProperties Closing
BABBABDBCDC
3 then If 2.
BABBA .3
Idem potent property: can’t change any more
![Page 20: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/20.jpg)
Example: Application of Morphological OperationsExample: Application of Morphological Operations
Finger print enhancement
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 21: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/21.jpg)
HitHit--oror--Miss Transformation Miss Transformation
)( XWAXAXA c )( XWAXAXA c *
h X h b d dwhere X = shape to be detectedW = window that can contain X
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 22: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/22.jpg)
HitHit--oror--Miss Transformation (cont.) Miss Transformation (cont.)
)( XWABABA c )( XWABABA c *
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 23: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/23.jpg)
Boundary Extraction Boundary Extraction
BAAβ(A) BAAβ(A)
Original B dOriginal image
Boundary
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 24: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/24.jpg)
Region Filling Region Filling
cABXX kk ABXX 1
h X d i lwhere X0 = seed pixel p
Original Results of region fillingOriginal image
Results of region filling
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 25: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/25.jpg)
Extraction of Connected Components Extraction of Connected Components
ABXX kk 1 where X0 = seed pixel p
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 26: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/26.jpg)
Example: Extraction of Connected Components Example: Extraction of Connected Components
X-ray imagef bof bones
ThresholdedThresholdedimage
C t dConnectedcomponents
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 27: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/27.jpg)
Convex Hull Convex Hull Convex hull has no concave partConvex hull has no concave part.
Convex hull
i
iDAC
4
1)( i
convi XD Algorithm: where
i1
4,3,2,1 , 1 iABXX ik
ik * 1kk
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 28: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/28.jpg)
Example: Convex Hull Example: Convex Hull
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 29: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/29.jpg)
Thinning Thinning
cBAABAABA
)() ( *cBAA ) ( *
))...))((...(( 21 nBBBABA
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 30: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/30.jpg)
Example: Thinning Example: Thinning
Make an object thinner.
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 31: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/31.jpg)
Thickening Thickening
* )( BAABA . ** ) ( BAABA . ) )...) ) ((...(( 21 nBBBABA . . . .
*
)) ))(( ((
Make an object thicker
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
Make an object thicker
![Page 32: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/32.jpg)
Skeletons Skeletons
Dot lines are skeletons of thisstructure
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 33: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/33.jpg)
Skeletons (cont.) Skeletons (cont.) K
)()(0
ASAS k
K
k
with BkB)AkB)AAS (()( with BkB)AkB)AASk ( ()(
where ...) ) ) (...( ( BBBAkB)A
k times
and kBAkK max
![Page 34: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/34.jpg)
Skeletons Skeletons
(Images from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 35: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/35.jpg)
Pruning Pruning
BAX 1
8
= thinning
) ( 1
8
12
k
kBXX
* = finding end points
AHXX )( 23 = dilation at end points
314 XXX = Pruned result
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 36: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/36.jpg)
Example: Pruning Example: Pruning
Originalgimage
After Thi i EndThinning3 times
End points
DilationPrunedresult
of end points resultp
![Page 37: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/37.jpg)
Summary of Binary Morphological Operations Summary of Binary Morphological Operations
(Tables from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 38: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/38.jpg)
Summary of Binary Morphological Operations (cont.) Summary of Binary Morphological Operations (cont.)
(Tables from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 39: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/39.jpg)
Summary of Binary Morphological Operations (cont.) Summary of Binary Morphological Operations (cont.)
(Tables from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 40: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/40.jpg)
Summary of Binary Morphological Operations (cont.) Summary of Binary Morphological Operations (cont.)
(Tables from Rafael C.Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 41: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/41.jpg)
Basic Types of Structuring ElementsBasic Types of Structuring Elements
x = don’t care
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 42: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/42.jpg)
GrayGray--Scale Dilation Scale Dilation
DDbfbf d)(|)()(1 D Case
DyxDytxsyxbytxsfbf )(;)()(|)()(max
bf DxDxsxbxsfbf and )(|)()(max2-D Case1-D Case
bf DyxDytxsyxbytxsfbf ),(;)(),(|),(),(max
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 43: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/43.jpg)
Original image
GrayGray--Scale Dilation (cont.) Scale Dilation (cont.) Reflection
SubimageOriginal image
+
Reflectionof B
+
Moving Max
gwindow
StructuringStructuring element B
Note: B can be any shape and subimage must have
Output imagethe same shape asreflection of B.
![Page 44: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/44.jpg)
GrayGray--Scale ErosionScale Erosion1 D Case DDbfbf d)(|)()(i
DyxDytxsyxbytxsfbf )(;)()(|)()(min2-D Case1-D Case bf DxDxsxbxsfbf and )(|)()(min
bf DyxDytxsyxbytxsfbf ),(;)(),(|),(),(min
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 45: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/45.jpg)
Original image
GrayGray--Scale Erosion (cont.) Scale Erosion (cont.)
SubimageOriginal image
B
-
Moving
Min
Moving window
StructuringStructuring element B
Note: B can be any shape and subimage must have
Output imagethe same shape as B.
![Page 46: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/46.jpg)
Example: GrayExample: Gray--Scale Dilation and ErosionScale Dilation and ErosionOriginal image After dilationOriginal image After dilation
Darker Brighter
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
After erosion
![Page 47: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/47.jpg)
GrayGray--Scale OpeningScale Opening
bbfbf )( bbfbf )(
Opening cuts peaks
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 48: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/48.jpg)
GrayGray--Scale ClosingScale Closing
bbfbf )( bbfbf )(
Cl i fill ll(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
Closing fills valleys
![Page 49: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/49.jpg)
Example: GrayExample: Gray--Scale Opening and ClosingScale Opening and Closing
Original image After closingAfter opening
Reduce whitebj
Reduce darkobjects
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
objects j
![Page 50: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/50.jpg)
GrayGray--scale Morphological Smoothing scale Morphological Smoothing
S hi P f i f ll d b l iSmoothing: Perform opening followed by closing
Original image After smoothingOriginal image After smoothing
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 51: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/51.jpg)
Morphological Gradient Morphological Gradient
)()( bfbf )()( bfbfg
Original image Morphological Gradient
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 52: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/52.jpg)
TopTop--Hat Transformation Hat Transformation
)( bffh
Original image Results of top-hat transform
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 53: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/53.jpg)
Example: Texture Segmentation Application Example: Texture Segmentation Application
Small blob
Original image Segmented result
Algorithm:f l i h i b i i l l
Large blob
1. Perform closing on the image by using successively larger structuring elements until small blobs are vanished.2 Perform opening to join large blobs together
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
2. Perform opening to join large blobs together3. Perform intensity thresholding
![Page 54: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/54.jpg)
Example: Granulometry Example: Granulometry Objective: to count the number of particles of each sizeObjective: to count the number of particles of each sizeMethod:1. Perform opening using structuring elements of increasing size2. Compute the difference between the original image and the result
after each opening operation3 The differenced image obtained in Step 2 are normalized and used3. The differenced image obtained in Step 2 are normalized and used
to construct the size-distribution graph.
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
Original imageSize distribution
graph
![Page 55: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/55.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 56: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/56.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 57: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/57.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 58: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/58.jpg)
Gradient ImageGradient Image
Surface of POriginalimage
P
at edges looklik t i idP
g
like mountain ridges.
![Page 59: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/59.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 60: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/60.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 61: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/61.jpg)
Morphological Watershads Morphological Watershads
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
![Page 62: Chapter 9: Morphological Image Processingit.nrru.ac.th/krit/411304/Chapter09.pdfExample: Application of Dilation and Erosion Remove small objects such as noiseRemove small objects](https://reader033.vdocuments.site/reader033/viewer/2022042612/5f711c867be3ab377d18dcd3/html5/thumbnails/62.jpg)
Convex Hull Convex Hull
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.