IT代写 CMT107 Visual Computing

CMT107 Visual Computing

Image Morphology

Copyright By PowCoder代写 加微信 powcoder

School of Computer Science and Informatics

Cardiff University

• Morphology
• Dilation

• Duality of Dilation and Erosion

• Hit-or-Miss transformation

Acknowledgement
The majority of the slides in this section are from Saha at University of Iowa

Morphology

• Morphological operators often take a binary image and a
structuring element as input and combine them using a
set operator (intersection, union, inclusion, complement).

• The structuring element is shifted over the image. At each
pixel of the image, its elements are compared with the
set of the underlying pixels.

• If the two sets match the condition defined by the set
operator (e.g., if the 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 predefined value (0 or 1 for binary images).

• A morphological operator is defined by its structuring
element and the applied set operator.

Morphology Applications

• Image pre-processing
• Noise filtering

• shape simplification

• Enhancing object structures
• Skeletonisation

• Thinning

• Convex hull

• Object marking

• Segmentation of the object from background

• Quantitative descriptors of objects

• Perimeter

Example: Morphological Operation

• Let ⊕ denote a morphological operator

𝑋⊕𝐵 = 𝑝 ∈ 𝑍2 𝑝 = 𝑥 + 𝑏, 𝑥 ∈ 𝑋, 𝑏 ∈ 𝐵}

𝐵 = 0,0 , 1,0

𝑋 = 0,0 , 1,0 , 1,1 , 1,2 , 2,2 , 0,3 , (0,4)

𝑋⊕𝐵 = { 0,0 , 1,0 , 2,0 , 1,1 , 2,1 , 1,2 , 2,2 ,
3,2 , 0,3 , 1,3 , 0,4 , (1,4)}

0,0 , (1,0) 1,1 , (2,1) 2,2 , (3,2) 0,4 , (1,4)

1,0 , (2,0) 1,2 , (2,2) 0,3 , (1,3)

• Morphological dilation ‘⊕’ combines two sets using vector addition of set

𝑋⊕𝐵 = 𝑝 ∈ 𝑍2 𝑝 = 𝑥 + 𝑏, 𝑥 ∈ 𝑋, 𝑏 ∈ 𝐵}

• Commutative:

• Associative:
𝑋⊕𝐵⊕𝐷 = 𝑋⊕(𝐵⊕𝐷)

• Invariant of translation:
𝑋ℎ⊕𝐵 = (𝑋⊕𝐵)ℎ

𝑋ℎ = 𝑝 ∈ 𝑍
2 𝑝 = 𝑥 + ℎ, 𝑥 ∈ 𝑋}

• If 𝑋 ⊆ 𝑌, then 𝑋⊕𝐵⊆ 𝑌⊕𝐵

• 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 𝑋⊖𝐵⊆ 𝑌⊖𝐵

Duality: Dilation and Erosion

• The transpose ෘ𝐵 of a structuring element 𝐵 is the structuring element
mirrored in the origin: ෘ𝐵 = −𝑏 𝑏 ∈ 𝐵}

• Duality between morphological dilation and erosion operators:

(𝑋⊖ 𝐵)𝑐= 𝑋𝑐 ⊕ ෘ𝐵 (𝑐 means complement)

• Erosion and dilation are not inverse transforms. An erosion followed by a
dilation leads to an interesting morphological operation, called opening

𝑋 ∘ 𝐵 = 𝑋⊖𝐵 ⊕𝐵

• Erosion and dilation are not inverse transforms. An erosion followed by a
dilation leads to an interesting morphological operation, called opening

𝑋 ∘ 𝐵 = 𝑋⊖𝐵 ⊕𝐵

• Erosion and dilation are not inverse transforms. An erosion followed by a
dilation leads to an interesting morphological operation, called opening

𝑋 ∘ 𝐵 = 𝑋⊖𝐵 ⊕𝐵

• Erosion and dilation are not inverse transforms. An erosion followed by a
dilation leads to an interesting morphological operation, called opening

𝑋 ∘ 𝐵 = 𝑋⊖𝐵 ⊕𝐵

• A dilation followed by an erosion leads to the interesting morphological
operation, called closing

𝑋 • 𝐵 = 𝑋⊕𝐵 ⊖𝐵

• A dilation followed by an erosion leads to the interesting morphological
operation, called closing

𝑋 • 𝐵 = 𝑋⊕𝐵 ⊖𝐵

• A dilation followed by an erosion leads to the interesting morphological
operation, called closing

𝑋 • 𝐵 = 𝑋⊕𝐵 ⊖𝐵

• Hit-or-miss is a morphological operator for finding local patterns of
foreground and background 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 𝑥 ⊂ 𝑋 𝑎𝑛𝑑 (𝐵2)𝑥 ⊂ 𝑋

• Relation with erosion

𝑋⊗𝐵 = (𝑋⊖ 𝐵1) ∩ (𝑋

Hit-or-Miss transformation

Hit-or-miss transformation: examples

Hit-or-miss transformation: examples

• What is morphology? What are the applications of morphology?

• What are the dilation, erosion, opening and closing operators?

• What is hit-or-miss transformation?

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com