Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Processing and Analysis (ImagePandA)

Similar presentations


Presentation on theme: "Image Processing and Analysis (ImagePandA)"— Presentation transcript:

1 Image Processing and Analysis (ImagePandA)
7 – Morphological Image Processing Christoph Lampert / Chris Wojtan Based on content from “Digital Image Processing” by Gonzalez and Woods TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:

2 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

3 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

4 Preliminaries Set theory 𝐵 = 𝑤 𝑤=−𝑏, for 𝑏∈𝐵 Reflection
𝐵 𝑧 = 𝑐 𝑐=𝑏+𝑧, for 𝑏∈𝐵 Translation

5 Preliminaries Set theory Structuring elements (SEs)
Small sets or subimages used to probe an image SEs are padded to rectangular images

6 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

7 Erosion and Dilation Erosion 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ⊆𝐴} 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ∩ 𝐴 𝑐 =∅}

8 Erosion and Dilation Erosion 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ⊆𝐴} 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ∩ 𝐴 𝑐 =∅}

9 Erosion and Dilation Erosion 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ⊆𝐴} 𝐴⊖𝐵={𝑧| 𝐵 𝑧 ∩ 𝐴 𝑐 =∅}

10 Erosion and Dilation 𝐴⊕𝐵={𝑧| 𝐵 𝑧 ∩𝐴≠∅} Dilation

11 Erosion and Dilation 𝐴⊕𝐵={𝑧| 𝐵 𝑧 ∩𝐴≠∅} Dilation

12 Erosion and Dilation Duality
Erosion is just like dilating the compliment Dilation is just like eroding the compliment (𝐴⊖𝐵) 𝑐 = 𝐴 𝑐 ⊕ 𝐵 (𝐴⊕𝐵) 𝑐 = 𝐴 𝑐 ⊖ 𝐵

13 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

14 Opening and Closing Opening A∘𝐵= 𝐴⊖𝐵 ⊕𝐵 Closing A∘𝐵= 𝐴⊕𝐵 ⊖𝐵

15 Opening and Closing Opening A∘𝐵= 𝐴⊖𝐵 ⊕𝐵 Closing A∘𝐵= 𝐴⊕𝐵 ⊖𝐵

16 Opening and Closing

17 Opening and Closing

18 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

19 The Hit-or-Miss Transformation
Given disjoint structuring elements 𝐶 and 𝐷 𝐴⊛𝐵= 𝐴⊖𝐶 ∩( 𝐴 𝑐 ⊖𝐷) Point 𝑧 belongs to the hit-or-miss transform output if:  𝐶 translated to 𝑧 fits in 𝐴, and 𝐷 translated to 𝑧 misses 𝐴 (fits the background of 𝐴) Result is the set of positions where the first structuring element fits in the foreground of the input image, and the second structuring element misses it completely. It is used to detect patterns or shapes

20 The Hit-or-Miss Transformation

21 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

22 Boundary Extraction 𝛽 𝐴 =𝐴−(𝐴⊖𝐵)

23 Boundary Extraction 𝛽 𝐴 =𝐴−(𝐴⊖𝐵)

24 Hole Filling Pick a pixel inside of a hole, call it 𝑋 0
Iterate 𝑋 𝑘 =( 𝑋 𝑘−1 ⊕𝐵)∩ 𝐴 𝑐

25 Hole Filling Pick a pixel inside of a hole, call it 𝑋 0
Iterate 𝑋 𝑘 =( 𝑋 𝑘−1 ⊕𝐵)∩ 𝐴 𝑐

26 Extracting Connected Components
Pick a pixel inside of a shape, call it 𝑋 0 Iterate 𝑋 𝑘 =( 𝑋 𝑘−1 ⊕𝐵)∩𝐴

27 Thinning 𝐴⊗𝐵=𝐴− 𝐴⊛𝐵 =𝐴∩ (𝐴⊛𝐵) 𝑐 Repeat until no change

28

29 Thickening Morphological dual of thinning 𝐴⊙𝐵=𝐴∪ 𝐴⊛𝐵
Repeat until no change More common approach: Thin the background 𝐴 𝑐 and then compliment the result

30 Thickening

31 Pruning

32 Geodesic Dilation

33 Geodesic Erosion

34 Morphological Reconstruction

35 Morphological Reconstruction

36 Border clearing Find all boundary pixels in A
Morphologically reconstruct all of them Subtract those from the original

37 Border clearing

38 Outline Preliminaries Erosion and Dilation Opening and Closing
The Hit-or-Miss Transformation Some Basic Morphological Algorithms Gray-Scale Morphology

39 Gray-Scale Morphology

40 Gray-Scale Morphology
Erosion 𝑓⊖𝑏 𝑥,𝑦 = min 𝑠,𝑡 ∈𝑏 𝑓(𝑥+𝑠,𝑦+𝑡) Dilation 𝑓⨁𝑏 𝑥,𝑦 = max 𝑠,𝑡 ∈𝑏 𝑓(𝑥−𝑠,𝑦−𝑡)

41 Gray-Scale Morphology

42 Gray-Scale Morphology
Erosion 𝑓⊖𝑏 𝑥,𝑦 = min 𝑠,𝑡 ∈𝑏 𝑓(𝑥+𝑠,𝑦+𝑡) Dilation 𝑓⨁𝑏 𝑥,𝑦 = max 𝑠,𝑡 ∈𝑏 𝑓(𝑥−𝑠,𝑦−𝑡) Opening f∘𝑏= 𝑓⊖𝑏 ⊕𝑏 Closing f∘𝑏= 𝑓⊕𝑏 ⊖𝑏

43 Gray-Scale Morphology

44 Gray-Scale Morphology

45 Gray-Scale Morphology

46 Gray-Scale Morphology
Mostly analogous to binary morphology Lots of potential, but lots of heuristics/hacks Not easy to find general tricks that work on all problems

47 Gray-Scale Morphology


Download ppt "Image Processing and Analysis (ImagePandA)"

Similar presentations


Ads by Google