Image Segmentation - Pedro Marco Achanccaray Diaz

advertisement
Image Segmentation
Qualification Exam
Deparment of Electrical Engineering - DEE
Pedro M. Achanccaray Diaz
Advisor: Raul Queiroz Feitosa
Sumário
1. Introduction
2. Spatially blind approaches
3. Spatially guided approaches
2
Sumário
1. Introduction
2. Spatially blind approaches
3. Spatially guided approaches
3
1. Introduction
Digital Image Processing (DIP):
Digital
Image
Real scene
Acquisition
Enhancement /
Pre-Processing
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
4
1. Introduction
Digital Image Processing (DIP):
Digitalization errors
Acquisition
Image without noise
Enhancement /
Pre-Processing
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
5
1. Introduction
Digital Image Processing (DIP):
Image without noise
Acquisition
Enhancement /
Pre-Processing
Segmentation Outcome
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
6
1. Introduction
Digital Image Processing (DIP):
Segmentation Outcome
Acquisition
Enhancement /
Pre-Processing
Segmentation
Improved Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
7
1. Introduction
Digital Image Processing (DIP):
Improved Segmentation
Features
๐‘ฅ1 = ๐‘ฅ11 , ๐‘ฅ12 , … , ๐‘ฅ1๐‘‘
๐‘ฅ2 = ๐‘ฅ21 , ๐‘ฅ22 , … , ๐‘ฅ2๐‘‘
๐‘ฅ3 = ๐‘ฅ31 , ๐‘ฅ32 , … , ๐‘ฅ3๐‘‘
...
...
Area, Color, Spatial
position, Texture,...
Acquisition
Enhancement /
Pre-Processing
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
8
1. Introduction
Digital Image Processing (DIP):
Scene Understanding
Classes
Features
๐‘ฅ1 = ๐‘ฅ11 , ๐‘ฅ12 , … , ๐‘ฅ1๐‘‘
๐‘ฅ2 = ๐‘ฅ21 , ๐‘ฅ22 , … , ๐‘ฅ2๐‘‘
๐‘ฅ3 = ๐‘ฅ31 , ๐‘ฅ32 , … , ๐‘ฅ3๐‘‘
Acquisition
Enhancement /
Pre-Processing
Segmentation
Postprocessing
Feature
Extraction
...
...
...
Area, Color, Spatial
position, Texture,...
Tree
Sky
Road
Labels
Recognition
Classification
9
1. Introduction
Image Segmentation:
“Segmentation subdivides an image into its constituent regions or objects.
The level of detail to which the subdivision is carried depends on the
problem being solved” – Gonzales & Woods, 2008.
Image without noise
Acquisition
Enhancement /
Pre-Processing
Segmentation Outcome
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
10
1. Introduction
Image Segmentation:
But...why an image should be segmented?
• Provides a more meaningful representation easier to analyze.
• Reduces complexity of feature extraction and classification steps.
Image Segmentation usually leads to two typical results:
Over segmentation
Under segmentation
11
1. Introduction
Image Segmentation:
Image Segmentation partitions the region ๐‘… in ๐‘› subregions ๐‘…1 , ๐‘…2 , … , ๐‘…๐‘› where:
๐‘›
๐‘…๐‘– = ๐‘… : each pixel must be in a region.
a)
๐‘–=1
b) ๐‘…๐‘– is a connected set ∀๐‘– = 1,2, … , ๐‘›
c) ๐‘…๐‘– ∩ ๐‘…๐‘— = ∅
∀๐‘–, ๐‘—; ๐‘– ≠ ๐‘— regions must be disjoint.
d) ๐‘„ ๐‘…๐‘– =TRUE each pixel has to fulfill certain condition to belong to a segment.
e) ๐‘„ ๐‘…๐‘– ∪ ๐‘…๐‘— =FALSE according to the same condition, two regions have to be different.
12
1. Introduction
The following
presentation:
classification
was
considered
for
this
– High-level taxonomy.
– Low-level taxonomy.
Taxonomy: Classification
13
1. Introduction
High-level
taxonomy
Image Type
• Monochromatic
• Color
Human Interaction
Image
Representation
• Supervised
• Unsupervised
• Single scale
• Multiscale
Image Features
• One feature
• Multiple
features
(color,
gradient,
texture,
position, etc.)
Principle of
Operation
• Spatially blind
(color)
• Spatially guided
(spatial position)
14
1. Introduction
Low-level
taxonomy
Spatially
guided
Spatially blind
Clustering
• K-means
• Mean Shift
Histogram
thresholding
• Otsu
segmentation
Region based
• Region
Growing
Energy based
• Graph-based
Based on
Regions and
Contours
• Watersheds
15
Sumário
1. Introduction
2. Spatially blind approaches
3. Spatially guided approaches
16
2. Spatially blind approaches
Clustering : Definitions
– Cluster: Set formed by similar elements in a certain way.
– Clustering: Group data in clusters according to certain similarity criterion.
– Feature: Characteristic representative of a data set. For our case, can be
considered as features: color, area, perimeter, etc.
– Feature Space: ๐‘‘-dimensional space formed by the extracted features.
Test Image
202 × 302 × 3
17
2. Spatially blind approaches
Clustering : K-Means Segmentation
Group pixels according to the Euclidian distance between each pixel and the cluster’s
centroids.
Then, the main goal is to minimze the following target function:
๐‘˜
๐‘›
๐ฝ๐พ−๐‘š๐‘’๐‘Ž๐‘›๐‘  ๐’— =
๐‘ฅ๐‘— − ๐‘ฃ๐‘–
2
๐‘–=1 ๐‘—=1
๐’— = ๐‘Ž๐‘Ÿ๐‘”๐‘š๐‘–๐‘›{๐ฝ๐พ−๐‘š๐‘’๐‘Ž๐‘›๐‘  ๐’— }
๐’—
Where:
๐‘ฅ๐‘— : ๐‘‘-dimensional feature vector corresponding
to the pixel ๐‘—.
๐‘ฅ๐‘— = ๐‘ฅ๐‘—๐‘… , ๐‘ฅ๐‘—๐บ , ๐‘ฅ๐‘—๐ต in the case of RGB images.
๐‘ฃ๐‘– : centroid of cluster ๐‘–.
๐‘˜: number of clusters.
๐‘›: number of pixels (๐‘ค๐‘–๐‘‘๐‘กโ„Ž × โ„Ž๐‘’๐‘–๐‘”โ„Ž๐‘ก)
18
2. Spatially blind approaches
Clustering : K-Means Segmentation – Results
๐‘˜=3
๐‘˜ =5
Including spatial information:
๐‘ฅ๐‘— =
Spatial
position of
the pixel in
๐‘ฅ๐‘—๐‘… , ๐‘ฅ๐‘—๐บ , ๐‘ฅ๐‘—๐ต , ๐‘ฅ๐‘—๐‘‹ , ๐‘ฅ๐‘—๐‘Œ the image.
The clustering will be spatially guided.
๐‘˜ =10
๐‘˜ =20
19
2. Spatially blind approaches
Clustering : Fuzzy C-Means Segmentation
Group pixels according to the Euclidian distance between each pixel and the cluster’s
centroids.
Then, the main goal is to minimze the following target function:
๐‘˜
๐‘›
๐ฝ๐ถ−๐‘š๐‘’๐‘Ž๐‘›๐‘  =
๐œ‡๐‘–๐‘—
๐‘š
๐‘ฅ๐‘— − ๐‘ฃ๐‘–
๐‘–=1 ๐‘—=1
Where:
๐‘ฅ๐‘— : ๐‘‘-dimensional feature vector corresponding
to the pixel ๐‘—.
๐‘ฃ๐‘– : centroid of cluster ๐‘–.
๐‘˜: number of clusters.
๐‘›: number of pixels (๐‘ค๐‘–๐‘‘๐‘กโ„Ž × โ„Ž๐‘’๐‘–๐‘”โ„Ž๐‘ก)
๐œ‡๐‘–๐‘— : degree of membership of pixel ๐‘— in the
cluster ๐‘–.
๐‘š: fuzziness index.
2
Updating centroids:
๐œ•๐ฝ ๐œ‡๐‘–๐‘— , ๐‘ฃ๐‘˜
= 0 → ๐‘ฃ๐‘– =
๐œ•๐œ‡๐‘–๐‘—
๐‘›
๐‘š
๐‘—=1 ๐œ‡๐‘–๐‘— . ๐‘ฅ๐‘—
๐‘›
๐‘š
๐‘—=1 ๐œ‡๐‘–๐‘—
Updating degrees of membership:
๐œ•๐ฝ ๐œ‡๐‘–๐‘— , ๐‘ฃ๐‘˜
= 0 → ๐œ‡๐‘–๐‘— =
๐œ•๐‘ฃ๐‘˜
1
๐‘ฅ๐‘— − ๐‘ฃ๐‘–
๐‘˜
๐‘ =1
๐‘š
๐‘š−1
1
๐‘ฅ๐‘— − ๐‘ฃ๐‘ 
๐‘š
๐‘š−1
20
2. Spatially blind approaches
Clustering : Fuzzy C-Means Segmentation – Results
๐‘˜=3
๐‘˜ =5
๐‘˜ =10
๐‘˜ =20
21
2. Spatially blind approaches
Clustering : Mean-Shift Segmentation
Find the local extrema in the density distribution of a data set.
1. Extract features from the image (spatial position and spectral values or color).
2. Choose a search window (shape and probability density function – pdf).
3. Put a search window for each pixel in the image.
4. Compute the window’s center of mass.
5. Move the center of the window to the center of mass.
6. Repeat steps 4 and 5 until the search window stops moving or na sotpping criterion is
reached.
Centro de
Massa
Vetor
Mean shift
Centro de
Massa
nuevo
... Extração de
Atributos
Espaço de
Atributos
(exemplo 2D)
22
2. Spatially blind approaches
Clustering : Mean-Shift Segmentation
The kernel considering the two features is:
๐พ
๐’™; ๐œŽ๐‘ 2 , ๐œŽ๐‘Ÿ2
=
2๐œ‹ −๐‘‘๐‘ /2
1 ๐’™๐’” 2
exp −
2 ๐œŽ๐‘ 2
๐œŽ๐‘ 2 ๐‘‘๐‘ 
2๐œ‹ −๐‘‘๐‘Ÿ/2
1 ๐’™๐’“ 2
exp −
2 ๐œŽ๐‘Ÿ2
๐œŽ๐‘Ÿ2 ๐‘‘๐‘Ÿ
Spatial position
Color
Where:
๐’™๐’” , ๐’™๐’“ : Feature vector of dimensionalities ๐‘‘๐‘  , ๐‘‘๐‘Ÿ related to the spatial position and color respectively.
๐œŽ๐‘  , ๐œŽ๐‘Ÿ : Standard deviation for each kind of feature.
It is an exception due to the
inclusion of spatial features
23
2. Spatially blind approaches
Clustering : Mean-Shift Segmentation – Results
๐œŽ๐‘ 2 = 10, ๐œŽ๐‘Ÿ2 = 10
๐œŽ๐‘ 2 = 10, ๐œŽ๐‘Ÿ2 = 30
๐œŽ๐‘ 2
๐œŽ๐‘ 2
=
20, ๐œŽ๐‘Ÿ2
= 20
๐œŽ๐‘ 2 =240, ๐œŽ๐‘Ÿ2 = 20
= 40, ๐œŽ๐‘Ÿ = 20
๐œŽ๐‘ 2 = 10, ๐œŽ๐‘Ÿ2 = 90
๐œŽ๐‘ 2 = 90, ๐œŽ๐‘Ÿ2 = 20
24
2. Spatially blind approaches
Histogram Thresholding : Definitions
Grayscale
Sky
25
2. Spatially blind approaches
Histogram Thresholding : Otsu Segmentation
Select a threshold that minimizes the intra-group
variance.
1. Select an initial threshold ๐‘‡ = 1.
2. Threshold the image.
3. Two groups of pixels are created:
๏‚ง ๐บ1 with pixels < ๐‘‡.
๏‚ง ๐บ2 with pixels ≥ ๐‘‡.
4. Compute the proportions that represents each
group ๐‘Ÿ1 , ๐‘Ÿ2 and the variance of each group
๐œŽ12 , ๐œŽ22 .
5. Compute the intra-group variance:
2
๐œŽ๐‘Š
๐‘‡ = ๐‘Ÿ1 ๐‘‡ ๐œŽ12 ๐‘‡ + ๐‘Ÿ2 ๐‘‡ ๐œŽ22 ๐‘‡
6. Increase ๐‘‡ = ๐‘‡ + 1 and repeat steps from 2 to 5
until it is not possible to obtain two groups.
7. The optimal threshold corresponds to the
minimum intra-group variance.
T
๐‘ฎ๐Ÿ
๐‘ฎ๐Ÿ
26
2. Spatially blind approaches
Histogram Thresholding : Otsu Segmentation – Results
๐‘‡ = 169
27
Sumário
1. Introduction
2. Spatially blind approaches
3. Spatially guided approaches
28
3. Spatially guided approaches
Region based: Definitions
– Region Growing:
seeds
– Region Splitting:
– Region Merging:
29
3. Spatially guided approaches
Region based: Baatz & Schäpe Segmentation
Segmentation based on region growing and merging.
1. Initially, each pixel is considerd as one segment.
2. Later, in each step, a pair of segments is merged into one larger segment.
3. Each merge has na associated cost, a merging cost (๐‘“).
4. A merging occurs when it has a merging cost inferior to an scale parameter. This merge
will promote the lowest increase in the global heterogeneity.
5. The segmentation procedure ends when no further merging can be performed.
There are two variants based on the heuristic taken to find the best segment for merging:
Local
Best Mutual
Fitting
Best
(BF)Fitting
(LMBF)
Lowestmerging
merging
Lowest
cost(๐‘“)
(๐‘“)
cost
Lowest merging
cost (๐‘“)
30
3. Spatially guided approaches
Region based: Baatz & Schäpe Segmentation
The merging cost is calculated as follows:
๐‘“ = ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ × โ„Ž๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ + 1 − ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ × โ„Ž๐‘ โ„Ž๐‘Ž๐‘๐‘’
Color
where:
๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ : color weight.
๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ ∈ 0,1
Shape
๐ถ ∪๐ถ
๐ถ
๐ถ
1
2
๐œ”๐œ”๐ฟ๐ฟ ๐ด
๐œ”๐ถ๐‘๐‘œ๐‘š๐‘
×โ„Ž
๐œŽ๐ฟ๐‘๐‘œ๐‘š๐‘
+− 1๐ด−
×๐‘๐‘œ๐‘š๐‘
๐œŽ๐ฟ 1 +×๐ดโ„Ž๐ถ๐‘ ๐‘ข๐‘Ž๐‘ฃ
× ๐œŽ๐ฟ 2
๐ถ1 ๐œ”
1 ∪๐ถ2
2
โ„Ž๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ
=
๐‘ โ„Ž๐‘Ž๐‘๐‘’ =
๐ฟ๐ฟ
Onde:
๐‘™ ๐ถ1
๐‘™ ๐ถ1: Segments to be merged.
๐ถ
,
๐ถ
1
2
๐‘†๐‘ข๐‘Ž๐‘ฃ๐ถ1 = ๐ถ1
๐ถ๐‘œ๐‘š๐‘๐ถ1 =
๐ถ1 ∪๐ด๐ถ๐ถ21: Resulting segment
merging.
๐‘™after
๐‘Ÿ๐‘’
๐ด๐ถ1 : Area of segment ๐ถ1 .
๐œŽ : Standard deviation of pixels in segment ๐ถ .
โ„Ž๐‘๐‘œ๐‘š๐‘ = ๐ด๐ถ๐ถ11 ∪๐ถ2 × ๐ถ๐‘œ๐‘š๐‘๐ถ1 ∪๐ถ2 − ๐ด๐ถ1 × ๐ถ๐‘œ๐‘š๐‘๐ถ1 + ๐ด๐ถ21 × ๐ถ๐‘œ๐‘š๐‘๐ถ1
๐œ”๐ฟ : Weight corresponding to band ๐ฟ.
โ„Ž๐‘ ๐‘ข๐‘Ž๐‘ฃ = ๐ด๐ถ1 ∪๐ถ2 × ๐‘†๐‘ข๐‘Ž๐‘ฃ๐ถ1∪๐ถ2 − ๐ด๐ถ1 × ๐‘†๐‘ข๐‘Ž๐‘ฃ๐ถ1 + ๐ด๐ถ2 × ๐‘†๐‘ข๐‘Ž๐‘ฃ๐ถ2
๐ถWhere:
1 (blue)
, ๐ถ2 : Segments to be merged.
๐ถ๐ถ
2 1(red)
: Resulting segment after merging.
๐ถ๐ถ
1 1∪∪๐ถ๐ถ
2 2(green)
๐ด๐ถ1 : Area of segment ๐ถ1 .
๐‘™ ๐ถ1 : Length of the edge of segment ๐ถ1 .
๐ถ
๐‘™๐‘Ÿ๐‘’1 : Length of the edge of the bounding box of
the segment ๐ถ1 .
31
3. Spatially guided approaches
Region based: Baatz & Schäpe Segmentation – Results
๐‘  = 20, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.9, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.5
๐‘  = 50, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.9, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.5
๐‘  = 90, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.9, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.5
๐‘  = 50, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.1, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.9
๐‘  = 50, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.5, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.9
๐‘  = 50, ๐œ”๐‘๐‘œ๐‘™๐‘œ๐‘Ÿ = 0.9, ๐œ”๐‘๐‘œ๐‘š๐‘ = 0.9
32
3. Spatially guided approaches
Energy based: Graph-based Segmentation
An image is modeled as an undirected graph: ๐บ = ๐‘‰, ๐ธ ,
where:
๐‘‰: Vertices
๐ธ: Edges
Connectivity Matrix
Each pixel is a vertex ๐‘ฃ๐‘– ∈ ๐‘‰.
Each edge ๐‘’๐‘–๐‘— has an associated weight ๐œ”๐‘–๐‘— .
1
๐‘Š = ๐œ”๐‘–๐‘— ; ๐‘–, ๐‘— ∈ ๐‘‰
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
๐œ”๐‘–๐‘— : Similarity measure
↑ ๐œ”๐‘–๐‘— → pixels are more similar
9
33
3. Spatially guided approaches
Energy based: Graph-based Segmentation
A cut is:
๐‘จ
๐‘๐‘ข๐‘ก ๐ด, ๐ต =
๐œ” ๐‘ข, ๐‘ฃ
๐‘ข∈๐ด,๐‘ฃ∈๐ต
๐‘ฉ
Minimum Cut;
however, it is not
the best one.
Then, the image can be segmented by
looking for minimum cuts.
A normalization based on the size of the
segments is robust to penalization of big
segments.
๐‘๐‘ข๐‘ก ๐ด, ๐ต
๐‘๐‘ข๐‘ก ๐ด, ๐ต
๐‘๐‘๐‘ข๐‘ก ๐ด, ๐ต =
+
๐‘Ž๐‘ ๐‘ ๐‘œ๐‘ ๐ด, ๐‘‰
๐‘Ž๐‘ ๐‘ ๐‘œ๐‘ ๐ต, ๐‘‰
where:
๐‘Ž๐‘ ๐‘ ๐‘œ๐‘ ๐ด, ๐‘‰ =
๐œ” ๐‘ข, ๐‘ก
๐‘ข∈๐ด,๐‘ก∈๐‘‰
34
3. Spatially guided approaches
Energy based: Graph-based Segmentation
In a matricial way, a minimum cut after simplification is:
๐’š๐‘‡ ๐‘ซ − ๐‘พ ๐’š
min ๐‘๐‘๐‘ข๐‘ก ๐’™ = min
๐’™
๐’š
๐’š๐‘‡ ๐‘ซ๐’š
Where: ๐ท ๐‘–, ๐‘– =
๐‘—๐‘Š
๐‘–, ๐‘— ; ๐ท ๐‘–, ๐‘— = 0 (sum of weights of vertex ๐‘–).
The solution is given by a problem of generalized eigenvalues:
๐‘ซ − ๐‘พ ๐’š = ๐œ†๐‘ซ๐’š
Solved by conversion to a standard eigenvalue problem:
1
๐‘ซ
−2
1
−2
1
2
๐‘ซ − ๐‘พ ๐‘ซ ๐’› = ๐œ†๐’› where: ๐’› = ๐‘ซ ๐’š
The solution corresponds to the second smallest eigenvector (the first one is zero).
35
3. Spatially guided approaches
Energy based: Graph-based Segmentation – Results
๐‘๐‘ ๐‘’๐‘”๐‘š๐‘’๐‘›๐‘ก๐‘  = 5
๐‘๐‘ ๐‘’๐‘”๐‘š๐‘’๐‘›๐‘ก๐‘  = 10
๐‘๐‘ ๐‘’๐‘”๐‘š๐‘’๐‘›๐‘ก๐‘  = 50
๐‘๐‘ ๐‘’๐‘”๐‘š๐‘’๐‘›๐‘ก๐‘  = 15
๐‘๐‘ ๐‘’๐‘”๐‘š๐‘’๐‘›๐‘ก๐‘  = 20
36
3. Spatially guided approaches
Energy based: Segmentation based on Conditional Random Fields
Related to a different problem: Semantic Segmentation.
Acquisition
Enhancement /
Pre-Processing
Segmentation
Postprocessing
Feature
Extraction
Recognition
Classification
37
3. Spatially guided approaches
Energy based: Segmentation based on Conditional Random Fields
The image is modeled as an undirected graph: ๐บ = ๐‘‰, ๐ธ ,
where:
๐‘‰: Vertices
๐ธ: Edges
The goal is to maximize the following energy function:
๐ธ ๐’™ =
๐œ“๐‘– ๐‘ฅ๐‘– +
๐‘–∈๐‘‰
๐œ“๐‘–๐‘— ๐‘ฅ๐‘– , ๐‘ฅ๐‘—
๐‘–∈๐‘‰,๐‘—∈๐‘๐‘–
where:
๐’™: random variable over the pixels to be labeled.
๐‘ฅ๐‘– : feature vector of pixel ๐‘–.
๐‘๐‘– : neighbor pixels of pixel ๐‘–.
๐œ“๐‘– : Unary term for the pixel ๐‘–.
๐œ“๐‘–๐‘— : Pairwise term for the edge ๐‘–๐‘—.
38
3. Spatially guided approaches
Energy based: Segmentation based on Conditional Random Fields
Let’s analyze the energy function:
Unary term
๐ธ ๐’™ =
๐œ“๐‘– ๐‘ฅ๐‘– +
๐‘–∈๐’ฑ
Position
๐œ“๐‘–๐‘— ๐‘ฅ๐‘– , ๐‘ฅ๐‘—
๐‘–∈๐’ฑ,๐‘—∈๐‘๐‘–
Unary term
Color
Pairwise term
Norm of Difference of
intensity values
Pairwise term
Fourier basis
Histogram of
Gradients
(HoG)
๐‘ค1 ๐œ“๐‘๐‘œ๐‘™ ๐‘ฅ๐‘– + ๐‘ค2 ๐œ“๐‘๐‘œ๐‘  ๐‘ฅ๐‘– + ๐‘ค3 ๐œ“๐‘“๐‘œ๐‘ข๐‘Ÿ๐‘–๐‘’๐‘Ÿ ๐‘ฅ๐‘– + ๐‘ค4 ๐œ“โ„Ž๐‘œ๐‘” ๐‘ฅ๐‘–
39
3. Spatially guided approaches
Energy based: Segmentation based on Conditional Random Fields – Results
Result
Input Image
Reference
(Ground
Truth)
40
3. Spatially guided approaches
Based on Regions and Contours: Watershed Segmentation
Use region and contour information to segment an image.
The image is visualized as a topographic relief in 3D.
Intensity or Gradient
41
3. Spatially guided approaches
Based on Regions and Contours: Watershed Segmentation
1. Calculate the gradient module of the image (per band).
2. Consider for each pixel, the maximum value of the gradient per band.
3. A hole is punched in each regional minimum and the entire topography is flooded from
below, leaving water rise through the holes at a uniform rate.
4. A threshold ๐‘‡ can be set to uniformize the regional minimum.
42
3. Spatially guided approaches
Based on Regions and Contours: Watershed Segmentation
๐‘‡ = 0.1
๐‘‡ = 0.3
๐‘‡ = 0.5
๐‘‡ = 0.9
43
44
Image Segmentation
Qualification Exam
Deparment of Electrical Engineering - DEE
Pedro M. Achanccaray Diaz
Advisor: Raul Queiroz Feitosa
Download