Segmentation 1
Segmentation 1
Segmentation by Clustering
Segmentation and Grouping
• Motivation: Obtain a compact • Grouping (or clustering)
representation from an – collect together tokens that
image/motion sequence/set of “belong together”
tokens • Fitting
• Should support application – associate a model with tokens
• Broad theory is absent at present – issues
• which model?
• which token goes to which
element?
• how many elements in the
model?
• Reading: FP Chapter 14, S
Chapter 5
How do they assemble?
Muller-Lyer illusion
Some Gestalt properties
emergence reification
Figure and ground
2
(clusters, data) x j i
iclusters jelements of i - th cluster
Image Clusters on intensity Clusters on color
cut ( A, B) w
i A, jB
ij
cut ( A, B ) w
iA, jB
ij
cut ( A, B ) cut ( A, B)
Ncut ( A, B)
assoc( A,V ) assoc( B, V )
assoc( A, V ) assoc( A, A) cut ( A, B)
sum of all the weights associated with nodes in A
Affinity
Intensity
1 2
aff ( x, y ) exp 2
I ( x ) I ( y )
2 I
Distance
1 2
aff ( x, y ) exp 2
x y
2 d
Texture
1 2
aff ( x, y ) exp 2
c( x) c( y )
2 c
Scale affects affinity
T T
wn Awn ( wn wn 1)
Example eigenvector
points
eigenvector
matrix
Clustering with eigenvectors
yT (D W ) y y T Ly
min y T
min y T
y Dy y Dy
• and we have a constraint
L D W
y T D1 0
Normalized cuts and spectral graph theory
max y ( y T ( D W ) y ) max y y T Ly
s.t. y T Dy 1
• which gives
( D W ) y Dy
Ly Dy
• Now look for a quantization threshold that maximizes the criterion --- i.e
all components of y above that threshold go to one, all below go to -b
Using affinity based on texture and intensity.
Figure from “Image and video segmentation: the normalized cut framework”,
by Shi and Malik, copyright IEEE, 1998
Using spatio-temoral affinity metric.
Figure from “Normalized cuts and image segmentation,” Shi and Malik, copyright IEEE, 2000
Spectral clustering
Dii Wij
j
graph Laplacian : D W
normalized graph Laplacian : L D 1/ 2 ( D W ) D 1/ 2 I D 1/ 2WD 1/ 2
Ly Dy
generalized eigenvalue problem