Image Segmentation: Professor Dr. Rafiqul Islam Dept of CSE
Image Segmentation: Professor Dr. Rafiqul Islam Dept of CSE
{1, 𝑓(𝑥, 𝑦) ≥ 𝑇
0, 𝑓(𝑥, 𝑦) < 𝑇
𝑔(𝑥, 𝑦) =
• Where T is the threshold value.
Grey-Level Segmentation
• Thresholding with a pair threshold
• Grey-level thresholding using a pair of threshold value
applies to every pixel by the rule:
𝑓(𝑥, 𝑦) < 𝑇1
0
{0
𝑔(𝑥, 𝑦) = 1 𝑇1 ≤ 𝑓(𝑥, 𝑦) ≤ 𝑇2
𝑓(𝑥, 𝑦) > 𝑇2
• Where 𝑇1 and 𝑇2 are two threshold value that defines
a range of acceptable grey levels.
Grey-Level Segmentation
• Optimal Thresholding (Iterative threshold determination)
1. Compute μ1, the mean grey level of the corner pixels
2. Compute μ2, the mean grey level of all other pixels
3. Told = 0
4. Tnew = (μ1 + μ2)/2
5. While Tnew ≠ Told do
i. μ1 = mean grey level of pixels for which f(x, y) < Tnew
ii. μ2 = mean grey level of pixels for which f(x, y) ≥ Tnew
iii. Told = Tnew
iv. Tnew = (μ1 + μ2)/2
6. End while
Otsu Segmentation
• Otsu method is a clustering based image thresholding.It works
when the histogram is bimodal.
• The method basically tries to minimize the within class variance
and at the same time it maximizes the between class variance.
• Compute variance:
• Compute within class variance: number of pixels in class/
Otsu Segmentation
Otsu Segmentation
Otsu Segmentation
Otsu Segmentation
• Histogram of a 3-bit image is shown in
• Gray level : 0 1 2 3 4 5 6 7
• Number of pixels: 2 3 2 1 2 3 2 1
18
Edge-based segmentation
• Point/edge detection
• Line detection
22
Region-based segmentation
SRG
• Advantage:
– With good connectivity
• Disadvantage:
– Initial seed-points:
• different sets of initial seed-point cause different
segmented result
– Time-consuming problem
23
Region-based segmentation
USRG
24
Region-based segmentation
USRG
• Advantage:
– easy to use
– can readily incorporate high level knowledge of the
image composition through region threshold
• Disadvantage:
– slow speed
25
Region-based segmentation
fast scanning
• Fast scanning Algorithm:
– The fast scanning algorithm
somewhat resembles unseeded
region growing
– the number of clusters of both
two algorithm would not be
decided before image passing
through them.
26
Region-based segmentation
fast scanning
27
Region-based segmentation
fast scanning
• Last step:
28
Region-based segmentation
fast scanning
• Advantage:
– The speed is very fast
– The result of segmentation will be intact with good
connectivity
• Disadvantage:
– The matching of physical object is not good
• It can be improved by morphology and geometric
mathematics
29
Recent Methods
• Deep Learning based segmentation
• Feature extraction based segmentation
• Cluster based segmentation
30