Professional Documents
Culture Documents
Made by:
Rahul Mishra
2012ecs01
Introduction
Thresholding
Edge-based segmentation
Region-based segmentation
conclusion
1. Introduction
What is segmentation?
Thresholding
Finding histogram of gray level intensity.
Edge-based segmentation
Using mask to detect edge in image by convolution.
Region-based segmentation
Finding region, but not finding edge.
Region Growing
Data Clustering (Hierarchical clustering)
Partitional clustering
Cheng-Jin Kuo`s method
6
2.
Thresholding
Basic Global Thresholding
1) Select an initial To
2) Segment image use:
g ( x, y ) 01
m1
and
mfor
2 the pixels in and .
if f(x,y) T
if f(x,y) T
1
(m 1 m 2 )
2
arameter.
Otsus Method
{0,1,2,,L-1} , L means gray level intensity
MN n 0 n 1 n 2 ... n L 1
, it is global variance.
1
2
G
i 0
L1
i 0
L 1
i k 1
(k ) P 1 P 2 ( m1 m 2 )
2
B
( m G P 1 ( k ) m(k )) 2
P 1 (k )(1 P 1 (k ))
it is 2between-class variance
(k )
= B 2
, 0 ( k *) 1
G
it is a measure of separability between class.
B2 (k ) max B2 (k )
o k L 1
k*
g ( x, y ) 10 ifif f(x,y)
f(x,y) k*
Multiple Threshold
As Otsus method, it takes more area and k*
B2 P 1 (m 1 m G )2 P 2 (m 2 m G )2 P 3 (m 3 m G ) 2
P 1m1P 2 m 2 P 3 m 3 m G
P 1 + P 2 +P 3 =1
B2 (k1* , k2* ) max B2 (k 1 , k 2 )
o k 1 k 2 L 1
2
*
*
(
k
,
k
(k , k ) B 12 2 )
G
*
1
*
2
10
Variable Thresholding
1) Image partitioning
11
operties
) Let xy and m xy denote the standard deviation an
d mean value of the set of pixels contained in a ne
ighborhood, S xy.
)
g ( x, y )
) Q (
xy , m xy )
true if f ( x , y ) a
false otherwise
xy
ANDf ( x , y ) bm xy
12
) m(k 1) z i m(k ) ( z k 1 z k n )
n i k 2 n
n
) z k 1 denote the intensity of the point at step k+1.
13
3. Edge-based segmentation
Basic Edge Detection
image
intensity
first-order deviation
second-order deviation
First-order
deviation
produce
thicker
edges
Second-order
deviation
stronger
response to
fine detail
double-edge
response
Determine
edge is from
light to dark
or dark to
light
14
1) Gradient
)The image gradient is to find edge strength and direction
f
x
g x
f grad( f )
f
g y
y
mag(f ) g x g y
1
( x, y ) tan
g x
15
Prewitt operator:
Sobel operator:
G ( x, y )
1
0
if R ( x , y ) T
otherwise
16
g ( x, y ) 2 [G ( x, y ) f ( x, y )]
g ( x, y ) [ 2G ( x, y )] f ( x, y )
Filter the input image with an n*n Gaussian lowpas
17
18
2) SRHLT
) g H hb x g x , where hb x b csch( bx)
) GH ( f ) H b ( f )G ( f ) where GH ( f ) FT [ g H ( )],
G ( f ) FT [ g ( )],
H b ( f ) j tanh( f / b).
Lower b
Higher b
Impulse
response
Longer
Shorter
Noise
robustness
Good
Bad
Type of edge
Ramp
Step
19
Simulation result
20
Watersheds
Algorithm:
T [n] {( s, t ) | g ( s, t ) n}
, g(s,t) is intensity.
n= min+1 to n = max +1. And let T[n]=0, others 1.
R
C[n] UC n ( M i ) C, n ( M i ) is minimum point beneath
i 1
n.
21
Markers
External markers:
Points along the watershed
Internal markers:
4.
Region-based segmentation
Region Growing
Algorithm:
a. Choose a random pixels
b. Use 8-connected and threshold to determine
c. Repeat a and b until almost points are classified.
23
24
Data Clustering
Using centroid to represent the huge numbers of c
lusters
Hierarchical clustering
1) Algorithm of hierarchical agglomeration(built)
Ci
A. See every single data as a cluster
B. Find out
Ci
Cj
d (a, b)
) DiameterDof
(Ci )cluster
max(d (a,b)) , for a Ci , b Ci
27
28
Partitional clustering
Decide the numbers of the cluster(k-means)
Problem:
Initial problem
29
Vadility=
inter
1
intra-cluster distance=
N
2
P
x
z
P
i
i 1 xCi
30
Simulation of k-means
31
1.Concept is
simple
2. Result is
reliable.
disadvantage
It is consuming,
so is not
suitable for a
large database.
Partitional
algorithms
1.Computing
speed is fast.
2.Numbers of
cluster is fixed,
so the concept
is also simple.
1. Determine
the number
of clusters.
2. Initial
problem
3. .
32
33
e and frequency
35
d.
(4,1)
High frequency, low variance. Set second high thres
hold.
(4,2)
Low frequency, high variance. Set third high thresh
old.
(1,4)
Low frequency, low variance. Set the lowest thresho
ld.
36
(1,1)
Speed
bad
intact
Shape
connecti
vity
Shape Good(better Good(equal
match than C.J.Ks C.J.Ks
method)
method)
bad
Good
37
Conclusion
Speed
Connectivity
System reliability
38
Reference
1. R. C. Gonzalez, R. E. Woods, Digital Image Processi
39