Course Syllabus - University of...
Transcript of Course Syllabus - University of...
![Page 1: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/1.jpg)
Course Syllabus
1. Color
2. Camera models, camera calibration
3. Advanced image pre-processing • Line detection
• Corner detection
• Maximally stable extremal regions
4. Mathematical Morphology • binary
• gray-scale
• skeletonization
• granulometry
• morphological segmentation
• Scale in image processing
5. Wavelet theory in image processing
6. Image Compression
7. Texture
8. Image Registration
• rigid
• non-rigid
• RANSAC
![Page 2: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/2.jpg)
References
• Books:
• Chapter 11, Image Processing, Analysis, and Machine Vision, Sonka et al
• Chapter 9, Digital Image Processing, Gonzalez & Woods
![Page 3: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/3.jpg)
Topics
1. Basic Morphological concepts
2. Binary Morphological operations • Dilation & erosion
• Hit-or-miss transformation
• Opening & closing
3. Gray scale morphological operations
4. Some basic morphological operations • Boundary extraction
• Region filling
• Extraction of connected component
• Convex hull
5. Skeletonization
6. Granularity
7. Morphological segmentation and watersheds
![Page 4: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/4.jpg)
Introduction
1. Morphological operators often take a binary image and a
structuring element as input and combine them using a set
operator (intersection, union, inclusion, complement).
2. The structuring element is shifted over the image and at each
pixel of the image its elements are compared with the set of
the underlying pixels.
3. If the two sets of elements match the condition defined by the
set operator (e.g. if set of pixels in the structuring element is a
subset of the underlying image pixels), the pixel underneath
the origin of the structuring element is set to a pre-defined
value (0 or 1 for binary images).
4. A morphological operator is therefore defined by its
structuring element and the applied set operator.
5. Image pre-processing (noise filtering, shape simplification)
6. Enhancing object structures (skeletonization, thinning, convex
hull, object marking)
7. Segmentation of the object from background
8. Quantitative descriptors of objects (area, perimeter, projection,
Euler-Poincaré characteristics)
binary
image
structuring
element
![Page 5: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/5.jpg)
Example: Morphological Operation
• Let ‘⊕’ denote a morphological operator
𝑋 ⊕ 𝐵 = {𝑝 ∈ 𝑍2|𝑝 = 𝑥 + 𝑏, 𝑥 ∈ 𝑋, 𝑏 ∈ 𝐵
![Page 6: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/6.jpg)
Dilation
• Morphological dilation ‘⊕’ combines two sets using vector of set elements
𝑋 ⊕ 𝐵 = {𝑝 ∈ 𝑍2|𝑝 = 𝑥 + 𝑏, 𝑥 ∈ 𝑋, 𝑏 ∈ 𝐵
Commutative: 𝑋 ⊕ 𝐵 = 𝐵 ⊕ 𝑋
Associative: 𝑋 ⊕ 𝐵 ⊕ 𝐷 = 𝑋 ⊕ 𝐵 ⊕ 𝐷
Invariant of translation: 𝑋ℎ ⊕ 𝐵 = 𝑋 ⊕ 𝐵 ℎ
If 𝑋 ⊆ 𝑌 then 𝑋 ⊕ 𝐵 ⊆ 𝑌 ⊕ 𝐵
![Page 7: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/7.jpg)
Erosion
1. Morphological erosion ‘⊖’ combines two sets using vector subtraction of set elements
and is a dual operator of dilation
𝑋 ⊖ 𝐵 = {𝑝 ∈ 𝑍2|∀𝑏 ∈ 𝐵, 𝑝 + 𝑏 ∈ 𝑋
Not Commutative: 𝑋 ⊖ 𝐵 ≠ 𝐵 ⊖ 𝑋
Not associative: 𝑋 ⊖ 𝐵 ⊖ 𝐷 = 𝑋 ⊖ 𝐵 ⊖ 𝐷
Invariant of translation: 𝑋ℎ ⊖ 𝐵 = 𝑋 ⊖ 𝐵 ℎ and 𝑋 ⊖ 𝐵ℎ = 𝑋 ⊖ 𝐵 −ℎ
If 𝑋 ⊆ 𝑌 then 𝑋 ⊖ 𝐵 ⊆ 𝑌 ⊖ 𝐵
![Page 8: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/8.jpg)
Duality: Dilation and Erosion
• Transpose Ă of a structuring element A is defined as follows
𝐴 = {−𝑎|𝑎 ∈ 𝐴
• Duality between morphological dilation and erosion operators
𝑋 ⊖ 𝐵 𝑐 = 𝑋𝑐 ⊕ 𝐵
![Page 9: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/9.jpg)
Hit-Or-Miss transformation
• Hit-or-miss is a morphological operators for finding local patterns of pixels. Unlike
dilation and erosion, this operation is defined using a composite structuring element
𝐵 = 𝐵1, 𝐵2 . The hit-or-miss operator is defined as follows
𝑋 ⊗ 𝐵 = {𝑥|𝐵1 ⊂ 𝑋 and 𝐵2 ⊂ 𝑋𝒄
![Page 10: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/10.jpg)
Hit-Or-Miss transformation: another example
Relation with erosion:
𝑋 ⊗ 𝐵 = 𝑋 ⊖ 𝐵1 ∩ 𝑋𝑐 ⊖ 𝐵2
![Page 11: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/11.jpg)
Hit-Or-Miss transformation: yet another example
![Page 12: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/12.jpg)
Opening
• Erosion and dilation are not inverse transforms. An erosion followed by a dilation leads
to an interesting morphological operation called opening
𝑋 ∘ 𝐵 = 𝑋 ⊖ 𝐵) ⊕ 𝐵
![Page 13: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/13.jpg)
Opening
• Erosion and dilation are not inverse transforms. An erosion followed by a dilation leads
to an interesting morphological operation called opening
𝑋 ∘ 𝐵 = 𝑋 ⊖ 𝐵) ⊕ 𝐵
![Page 14: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/14.jpg)
Opening
• Erosion and dilation are not inverse transforms. An erosion followed by a dilation leads
to an interesting morphological operation called opening
𝑋 ∘ 𝐵 = 𝑋 ⊖ 𝐵) ⊕ 𝐵
![Page 15: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/15.jpg)
Opening
• Erosion and dilation are not inverse transforms. An erosion followed by a dilation leads
to an interesting morphological operation called opening
𝑋 ∘ 𝐵 = 𝑋 ⊖ 𝐵) ⊕ 𝐵
![Page 16: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/16.jpg)
Closing
• A dilation followed by an erosion leads to the interesting morphological operation called
closing
𝑋 • 𝐵 = 𝑋 ⊕ 𝐵) ⊖ 𝐵
![Page 17: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/17.jpg)
Closing
• A dilation followed by an erosion leads to the interesting morphological operation called
closing
𝑋 • 𝐵 = 𝑋 ⊕ 𝐵) ⊖ 𝐵
![Page 18: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/18.jpg)
Closing
• A dilation followed by an erosion leads to the interesting morphological operation called
closing
𝑋 • 𝐵 = 𝑋 ⊕ 𝐵) ⊖ 𝐵
![Page 19: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/19.jpg)
Morphological Boundary Extraction
• The boundary of an object A denoted by δ(A) can be obtained by first eroding the object
and then subtracting the eroded image from the original image.
𝛿 𝐴 = 𝐴 − 𝐴 ⊖ 𝐵
![Page 20: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/20.jpg)
Quiz
• How to extract edges along a given orientation using morphological operations?
• An opening followed by a closing
• Or, a closing followed by an opening
𝑋 ∘ 𝐵) • 𝐵
𝑋 • 𝐵) ∘ 𝐵
![Page 21: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/21.jpg)
Gray Scale Morphological Operation
1 2( , )y f x x
1x
2x
Support F
top surface
T[A]
Set A
![Page 22: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/22.jpg)
Gray Scale Morphological Operation
• A: a subset of n-dimensional Euclidean space, A Rn
• F: support of A
• Top hat or surface
• A top surface is essentially a gray scale image f : F R
• An umbra U(f) of a gray scale image f : F R is the whole subspace below the top surface representing the gray scale image f. Thus,
1{ | s.t. ( , ) }nF x R y R x y A
( ) : nT A F R
( )( ) max{ | ( , ) }T A x y x y A
( ) {( , ) , ( )}U f x y F R y f x
![Page 23: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/23.jpg)
Gray Scale Morphological Operation
1 2( , )y f x x
1x
2x
top surface
T[A]
![Page 24: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/24.jpg)
Gray Scale Morphological Operation
• The gray scale dilation between two functions may be defined as the top surface of the dilation of their umbras
• More computation-friendly definitions
• Commonly, we consider the structure element k as a binary set. Then the definitions of gray-scale morphological operations simplifies to
( ( ) ( ))f k T U f U k
max{ ( ) ( )}z k
f k f x z k z
min{ ( ) ( )}z k
f k f x z k z
max{ ( )}z k
f k f x z
min{ ( )}z k
f k f x z
![Page 25: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/25.jpg)
Morphological Boundary Extraction
• The boundary of an object A denoted by δ(A) can be obtained by first eroding the object and then subtracting the eroded image from the original image.
( )A A A B
![Page 26: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/26.jpg)
Quiz
• How to extract edges along a given orientation using morphological operations?
![Page 27: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/27.jpg)
Morphological noise filtering
• An opening followed by a closing
• Or, a closing followed by an opening
( )X B B
( )X B B
![Page 28: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/28.jpg)
Morphological noise filtering
MATLAB DEMO
![Page 29: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/29.jpg)
Morphological Region Filling
• Task: Given a binary image X and a (seed) point p, fill the region surrounded by the pixels of X and contains p.
• A: An image where only the boundary pixels are labeled 1 and others are labeled 0
• Ac: The Complement of A
• We start with an image X0 where only the seed point p is 1 and others are 0. Then we repeat the following steps until it converges
1( ) 1,2,3,...c
k kX X B A k
![Page 30: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/30.jpg)
Morphological Region Filling
A Ac
![Page 31: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/31.jpg)
Morphological Region Filling
• The boundary of an object A denoted by δ(A) can be obtained by first eroding the object and then subtracting the eroded image from the original image.
( )A A A B
A
![Page 32: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/32.jpg)
Morphological Region Filling
1( ) ( ) 1,2,3,...c
k kX X B A k
![Page 33: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/33.jpg)
Morphological Region Filling
![Page 34: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/34.jpg)
Homotopic Transformation
• Homotopic tree
r1 r2
h1
h2
![Page 35: Course Syllabus - University of Iowauser.engineering.uiowa.edu/~aip/Lectures/Lecture09/ImageMorpholo… · subset of the underlying image pixels), the pixel underneath the origin](https://reader035.fdocuments.us/reader035/viewer/2022063008/5fbea21606dfbe591c2e72be/html5/thumbnails/35.jpg)
Quitz: Homotopic Transformation
• What is the relation between an element in the ith and i+1th levels?