mestrado em ciência de computadores
DESCRIPTION
VC 14/15 – TP9 Region-Based Segmentation. Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos. Miguel Tavares Coimbra. Outline. Region-based Segmentation Morphological Filters. Topic: Region-based Segmentation. Region-based Segmentation - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/1.jpg)
Mestrado em Ciência de Computadores
Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos
VC 14/15 – TP9Region-Based Segmentation
Miguel Tavares Coimbra
![Page 2: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/2.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Outline
• Region-based Segmentation
• Morphological Filters
![Page 3: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/3.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Topic: Region-based Segmentation
• Region-based Segmentation
• Morphological Filters
![Page 4: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/4.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Why Region-Based Segmentation?
• Segmentation– Edge detection and
Thresholding not always effective.
• Homogenous regions– Region-based
segmentation.– Effective in noisy
images.
![Page 5: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/5.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Definitions
• Based on sets.• Each image R is a set
of regions Ri.– Every pixel belongs to
one region.– One pixel can only
belong to a single region.
S
iiRR
1
ji RR
R1
R3R2
R4
R6
R5
R7
![Page 6: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/6.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
R1
R3
R2
R4
R6
R5
R7
![Page 7: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/7.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Basic Formulation
Let R represent the entire image region. Segmentation partitions R into n subregions, R1, R2, ..., Rn, such that:
a)
b)
c)
d)
e)
a) Every pixel must be in a region
b) Points in a region must be connected.
c) Regions must be disjoint.
d) All pixels in a region satisfy specific properties.
e) Different regions have different properties.
n
ii RR
1
.21 region, connected a is , ..., n, i Ri
jijiRR ji , and allfor
.,...,2,1for )( niTRUERP i
.for )( jiFALSERRP ji
![Page 8: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/8.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
How do we form regions?
• Region Growing
• Region Merging
• Region Splitting
• Split and Merge
• Watershed
• ...
What a computer sees
![Page 9: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/9.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Region growing
• Groups pixels into larger regions.
• Starts with a seed region.
• Grows region by merging neighboring pixels.
• Iterative process– How to start?– How to iterate?– When to stop?
InitialRegions
IterationsStop
Condition
Finish
![Page 10: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/10.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
![Page 11: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/11.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Region merging
• Algorithm– Divide image into an initial set of regions.
• One region per pixel.
– Define a similarity criteria for merging regions.
– Merge similar regions.– Repeat previous step until no more merge
operations are possible.
![Page 12: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/12.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Similarity Criteria
• Homogeneity of regions is used as the main segmentation criterion in region growing.– gray level – color, texture – shape – model – etc.
Choice of criteria affects segmentation results dramatically!
![Page 13: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/13.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Gray-Level Criteria
• Comparing to Original Seed Pixel– Very sensitive to choice of seed point.
• Comparing to Neighbor in Region– Allows gradual changes in the region.– Can cause significant drift.
• Comparing to Region Statistics– Acts as a drift dampener.
• Other possibilities!
![Page 14: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/14.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Region splitting
• Algorithm– One initial set that
includes the whole image.
– Similarity criteria.– Iteratively split regions
into sub-regions.– Stop when no more
splittings are possible.
R1
R1 R2
R3 R4
R1 R2
R3
R4
R6
R5
R7
R1R3R2
R4R6R5
R7
![Page 15: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/15.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
[Machine Vision; David Vernon]
![Page 16: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/16.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Split and Merge
• Combination of both algorithms.
• Can handle a larger variety of shapes.– Simply apply previous
algorithms consecutively.
![Page 17: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/17.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
The Watershed Transform
• Geographical inspiration.– Shed water over rugged
terrain.– Each lake corresponds to a
region.
• Characteristics– Computationally complex.– Great flexibility in
segmentation.– Risk of over-segmentation.
![Page 18: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/18.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
The Drainage Analogy
• Two points are in the same region if they drain to the same point.
Courtesy of Dr. Peter Yim at National Institutes of Health, Bethesda, MD
![Page 19: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/19.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
The Immersion Analogy
![Page 20: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/20.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
[Milan Sonka, Vaclav Hlavac, and Roger Boyle]
![Page 21: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/21.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Over-Segmentation
• Over-segmentation.– Raw watershed segmentation produces a
severely oversegmented image with hundreds or thousands of catchment basins.
• Post-Processing.– Region merging.– Edge information.– Etc.
![Page 22: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/22.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Topic: Morphological Filters
• Region-based Segmentation
• Morphological Filters
![Page 23: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/23.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Mathematical Morphology
• Provides a mathematical description of geometric structures.
• Based on sets.– Groups of pixels which
define an image region.
• What is this used for?– Binary images.– Can be used for post-
processing segmentation results!
• Core techniques– Erosion, Dilation.– Open, Close.
![Page 24: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/24.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Tumor Segmentation using Morphologic Filtering
![Page 25: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/25.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Dilation, Erosion
• Two sets:– Image– Morphological kernel.
• Dilation (D)– Union of the kernel with
the image set.– Increases resulting area.
• Erosion (E)– Intersection.– Decreases resulting area.
![Page 26: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/26.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Dilation
• Example using a 3x3 morphological kernel
![Page 27: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/27.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Erosion
• Example using a 3x3 morphological kernel
![Page 28: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/28.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Opening, Closing
• Opening– Erosion, followed by
dilation.– Less destructive than an
erosion.– Adapts image shape to
kernel shape.
• Closing– Dilation, followed by
erosion.– Less destructive than a
dilation.– Tends to close shape
irregularities.
![Page 29: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/29.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Opening
• Example using a 3x3 morphological kernel
![Page 30: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/30.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Closing
• Example using a 3x3 morphological kernel
![Page 31: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/31.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Core morphological operators
Dilation Erosion
Closing Opening
![Page 32: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/32.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Example: Opening
Tresholding
Opening
![Page 33: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/33.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Example: Closing
Closing
![Page 34: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/34.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Connected Component Analysis
• Define ‘connected’.– 4 neighbors.– 8 neighbors.
• Search the image for seed points.
• Recursively obtain all connected points of the seeded region.
![Page 35: Mestrado em Ciência de Computadores](https://reader035.vdocuments.us/reader035/viewer/2022062723/56813b44550346895da41f2f/html5/thumbnails/35.jpg)
VC 14/15 - TP9 - Region-Based Segmentation
Resources
• Gonzalez & Woods - Chapter 7 and 8