Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

Image Segmentation

 Thresholding

• Single level thresholding


Example:
if f(x,y) > T  object point
otherwise  background points
• Multilevel thresholding
if f(x,y) > T2  object1 point
T1 < f(x,y) <= T2  object2 point
f(x,y) < T1  background points
Thresholding
• T function

T = T[x,y, p(x,y), f(x,y)]


where p(x,y) can be certain local value, e.g., average of
neighborhood of (x,y)

Global threshold: T depends only on f(x,y) gray-level value


Local threshold: T depends only on f(x,y) and p(x,y)
Dynamic/Adaptive threshold: T depends on the spatial coordinates (x,y)
Thresholding (cont’d)
• Example of global single threshold algorithm:

Initial estimate for Told

(1) segment image using Told, obtain G1 and G2


(2) compute average u1 for G1, u2 for G2
(3) compute new Tnew = (u1+u2)/2

(4) if | Tnew -Told | > t0  Told = Tnew and goto (1)

Otherwise, goto END


Region growing segmentation
• Group pixels or sub-regions into large regions based on predefined
criteria

• Start with a set of “seed” points


• Criteria for region growing
(1) |fpixel – fseed| < t
(2) The pixel is 8-connected to the region

• Criteria for stopping


-- compare the pixel with the seed
-- compare the pixel with the region average
-- compare the pixel with the pixel neighbors

• Example: multi-modal histogram


Region splitting and Merging
• subdivide an image into a set of arbitrary disjointed regions
• merge and/or split the regions in an attempt to satisfy a certain
condition

R1 R2

R41 R42
R3
R43 R44
Region splitting and Merging
(cont’d)
• Procedure
-- split the image into four disjoint quadrants regions Ri when certain
condition is not satisfied
-- merge adjacent regions Rj and Rk when certain condition is
satisfied
-- stop when no further merging or splitting is possible

• Example:
-- condition:
standard deviation of region Ri < i
or 80% pixels in Ri satisfy | Zj - mi | <= 2 i
Segmentation based on
motion/deformation/Contours
• Motion subtraction

• Deformable template

• Active contour
Image representation and
Description
• External representation: shape, boundary, …
• Internal representation: region, color, texture, …

(1) Chain codes: boundary representation by a connected sequence f


straight-line segments of specified length and direction (4- or 8-
connectivity)

• definition of direction numbers: Example:


2
1 076666553321212
3 1
2 0 4 0
3 5 6 7
4-direction 8-direction
Image representation and
Description (cont’d)
(2) Polygon approximations

• Minimum perimeter polygons


-- e.g., rubber band shrinking

• Fit and Split


-- If the maximum perpendicular distance from a boundary
segment to the line (which joins its two end points) exceeds
a certain threshold, the farthest point from the line
becomes a vertex
Image representation and
Description (cont’d)
(3) Thinning (skeletonizing)

• Medial axis transformation


-- property: any point on a medial axis has more than one
closest neighbors on the boundary
Image representation and
Description (cont’d)
(5) Fourier descriptors

• Using small number of frequency components to represent


a set of coordinates, which correspond to a certain shape
• The data reconstructed from Fourier descriptors could be
different with the original data (e.g., loss of fidelity)

(6) Principal component representation


• Eigen vector representation
Image representation and
Description (cont’d)
(7) Relational descriptor

 Rewriting rule (recursive relationship)


Define two primitive elements a and b
a b

Example: a
b
a b
Image representation and
Description (cont’d)
(7) Relational descriptor (cont’d)

• Rule 1: S aA (starting symbol “S” is replaced by primitive “a” and variable


“A”)
• Rule 2: A bS (variable “A” is replaced by primitive “b” and starting symbol “S”)
• Rule 3: A b (replacing “A” with “b” terminates the procedure)

Example: a
b a b a b

Rule: (1,3) (1,2,1,3) (1,2,1,2,1,3)


Image representation and
Description (cont’d)
(7) Relational descriptor (cont’d)

• A phrase structure grammar G = (VN, VT, P, S)


VN : non-terminal vocabularies
VT : terminal vocabularies
V = VN  VT
P: production rewriting rules
S: S  VN Starting symbol

L(G) = {x | x  VT Such that S  x based on grammar G}


Image representation and
Description (cont’d)
(7) Relational descriptor (cont’d)

• Example of rewriting rule:

production rule P:
VN = {S, A}, VT= {a, b}
S aA
A aA
Ab
G = (VN, VT, P, S)

L(G) = {anb | n=1,2,…}


Image representation and
Description (cont’d)
(7) Relational descriptor (cont’d)

 String description

-- connectivity of primitives can be expressed in a head-to-tail manner

Example: head
abstracted primitive:
tail head
a b
a+b tail
a –b
ab
a*b
Image representation and
Description (cont’d)

(7) Relational descriptor (cont’d)

 String description

-- PDL (Program description language)

example primitive:
a b c e d

Example of string description: (a+b)*c

e+[[(a+b)*c]+d]
Image representation and
Description (cont’d)

(7) Relational descriptor (cont’d)

 Tree description

-- tree description using the relationship “inside of”

You might also like