Академический Документы
Профессиональный Документы
Культура Документы
Gray-level thresholding
Supervised vs. unsupervised
thresholding
Binarization using Otsus method
Locally adaptive thresholding
Maximally stable extremal regions
Color-based segmentation
Region labeling and counting
Region moments
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 1
Gray-level thresholding
How can holes be filled?
Original image
Peter f [x,y]
Thresholded
Peter m [x,y]
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 2
f x, y m x, y
Foreground
Gray level
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 3
Unsupervised thresholding
Idea: find threshold T that minimizes within-class variance of both foreground and
background (same as k-means)
2
within
T
N Fgrnd T
N
2
Fgrnd
T
N Bgrnd T
N
2
Bgrnd
T
N
N
N
N
x, y
Fgrd x , yFgrnd
N Bgrnd
N Fgrnd 2
N Bgrnd 2
N Fgrnd
N Bgrnd
2
2
2
Fgrnd
Bgrnd
Fgrnd N Bgrnd
N
N
N
N
2
T N Bgrnd T
Fgrnd
T
Fgrnd Bgrnd
N2
x , yBgrnd
f x, y Bgrnd
[Otsu, 1979]
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 4
2
between
N Fgrnd T N Bgrnd T
N2
T T
Fgrnd
Bgrnd
Fgrnd T N Fgrnd T nT T
Fgrnd T 1
N Fgrnd T 1
Bgrnd T N Bgrnd T nT T
Bgrnd T 1
N Fgrnd T 1
[Otsu, 1979]
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 5
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 6
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 7
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 8
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 9
Original image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 10
Thresholded with
Otsus Method
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 11
Non-uniform areas
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 12
Extremal region: any connected region in an image with all pixel values above (or
below) a threshold
Observations:
Nested extremal regions result when the threshold is successively raised (or lowered).
The nested extremal regions form a component tree.
Key idea: choose thresholds such that the resulting bright (or dark) extremal
regions are nearly constant when these thresholds are perturbed by +/-
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 13
MSERs: illustration
180
160
140
120
100
+
80
-60
A+
A
A-
40
20
0
A A
Local minimum of
MSER
A
[Matas, Chum, Urba, Pajdla, 2002]
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 14
f [ x, y]
Image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 15
f [fxf[,[xxy,,]yy]]
807
6
2
4
1
3
5
Level Set
A2=30
A2=21
A4=12
A4=18
A5=12
A4=14
h
A5=11
k
d
A3=9
A3=32 A3=19
A2=36
A3=18
d
A2=32
A A
A
A1=36
A3=21
A1=43
A1=67
A0=225
A4=5
l
i
A4=19
i
m
A5=10
A6=4
p
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 16
, 1,
MSERs
MSER: examples
Original image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 17
MSER: examples
Original image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 18
Supervised thresholding
pdf
Background
Foreground
error
probability
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 19
Gray level
Supervised thresholding
pdf
Background
Foreground
error
probability
Gray level
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 20
Training
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 21
Skin Samples
Original image
w f
i i
w0 0 ?
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 23
Chroma keying
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 24
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 25
after thresholding
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 26
Definition: a region is a set of pixels, where each pixel can be reached from
any other pixel in the region by a finite number of steps, with each step starting
at a pixel and ending in the neighborhood of the pixel.
4-neighborhood
8-neighborhood
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 27
Generate new
region label
Copy label
from above
Copy label
from the left
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 28
1
2
2
3
2
3
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 29
1
1
1
1
1
1
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 30
Thresholded image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 31
20 labeled regions
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 32
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 33
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 34
Region moments
M pq
Raw moments
x p yq
x,yRegion
Central moments
pq
x x y y
p
x,yRegion
M10
M 01
with x
and y
M 00
M 00
11
02
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 35
Original Image
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 36
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 37
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 38
Filtering by major
axis length
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 39
Filtering by major
axis length
Filtering by
orientation
Digital Image Processing: Bernd Girod, 2013-2014 Stanford University -- Image Segmentation 40