1
Image Segmentation
Idar Dyrdal
Segmentation
• Image segmentation is the process of
partitioning a digital image into multiple
parts
2
Segmentation methods
3
Colour Segmentation - Example
4
Segmentation by thresholding
Number of pixels
Otsu’s method:
• Automatic clustering-based thresholding
• Minimization of intra-class variance
• Analog to Fisher’s Discriminant Analysis
Graylevel
5
Thresholding with Otsu’s method
3 thresholds
4 classes
6
Binary segmentation – foreground vs. background
Number of pixels Number of pixels
Background
Foreground
Background Foreground
Graylevel
Graylevel
7
Binary thresholding – Object detection
Global threshold selection threshold too low for detection of the object of interest
8
Manual thresholding
9
Local thresholding
10
Local thresholding using edge information
Threshold = average
graylevel along edges
11
Object detection in video sequences (visible light)
• Change detection
• Thresholding of difference
image, i.e. Otsu’s method
12
K-means (parametric) clustering
13
K-means clustering
Initial cluster centers (red, green and blue points) Samples assigned to nearest cluster center
14
K-means clustering
15
K-means clustering
16
K-means clustering using color
17
Mean shift (non-parametric) segmentation
18
Mean shift segmentation
19
Parzen method
20
Mean shift segmentation
21
Road segmentation for autonomous vehicles
Image data (graylevel, colour, local texture) from Pixels with sufficiently high probability density with
trapezoidal region is used to build a Gaussian respect to the model are assigned to the road class
model of the road surface. (marked in green).
22
Road segmentation – alternative approach
Original RGB image converted to an illumination Segmentation by region growing of the local entropy
invariant colour space (reduced variation due to image (Matlab: grayconnected) using the green dots
sunlight and shadows). From this image a local (left image) as seed pixels.
entropy image is derived (Matlab: entropyfilt).
23
Morphological operations
• Non-linear filtering
• Typically used to clean up binary images
• Erosion: replace pixel value with minimum
in local neighborhood
• Dilation: replace pixel value with maximum
in local neighborhood
• Structuring element used to define the local
neighborhood:
24
Morphological operations - Erosion
25
Morphological operations - Dilation
26
Opening = Erosion + Dilation
27
Closing = Dilation + Erosion
28
Opening - example
29
Closing - example
30
Active contours
31
Split and merge methods
Principles:
• Recursive splitting of the image based on region
statistics
• Hierarchical merging of pixels and regions
• Combined splitting and merging
Methods:
• Watershed segmentation
• Region splitting (divisive clustering)
• Region merging (agglomerative clustering)
• Graph-based segmentation
32
Agglomerative clustering
Distance measures
Distance measure
Dendrogram
33
Normalized cuts
34
Graph cuts
35
Summary
Image Segmentation:
• Thresholding techniques
• Clustering methods for segmentation
• Morphological operations
36