Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy Techniques for Image Segmentation
L´aszl´o G. Ny´ul
Department of Image Processing and Computer Graphics University of Szeged
20080712
Dealing with imperfections
Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. According to a researcher (sic) at Cambridge University, it doesn’t matter in what order the letters in a word are, the only important thing is that the ﬁrst and last letter be at the right place. The rest can be a total mess and you can still read it without problem. This is because the human mind does not read every letter by itself but the word as a whole.
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy systems
Fuzzy sets
Fuzzy image processing Fuzzy thresholding
Fuzzy clustering
Fuzzy connectedness Theory
Algorithm
Variants
Applications
Outline
Fuzzy systems
• Fuzzy systems and models are capable of representing diverse, inexact, and inaccurate information
• Fuzzy logic provides a method to formalize reasoning when dealing with vague terms. Not every decision is either true or false. Fuzzy logic allows for membership functions, or degrees of truthfulness and falsehoods.
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Membership function examples
“young person”
“cold beer”
Object characteristics in images
Graded composition
heterogeneity of intensity in the object region due to heterogeneity of object material and blurring caused by the imaging device
Hangingtogetherness
natural grouping of voxels constituting an object a human viewer readily sees in a display of the scene as a Gestalt in spite of intensity heterogeneity
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Application area for fuzzy systems
• Quality control
• Error diagnostics
• Control theory
• Pattern recognition
Let X be the universal set.
For (sub)set A of X
µ _{A} (x) =
1
0
Fuzzy set
x ∈ A
if
if x
∈ A
For crisp sets µ _{A} is called the characteristic function of A.
A fuzzy subset A of X is
A = {(x, µ _{A} (x))  x ∈ X }
where µ _{A} is the membership function of A in X
µ _{A} : X → [0, 1]
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Probablility
Probability vs. grade of membership
• is concerned with occurence of events
• represent uncertainty
• probability density functions
Compute the probability that an illknown variable x of the universal set U falls in the wellknown set A.
Fuzzy sets
• deal with graduality of concepts
• represent vagueness
• fuzzy membership functions
Compute for a wellknown variable x of the universal set U to what degree it is member of the illknown set A.
Fuzzy membership functions
triangle
gaussian
trapezoid
singleton
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Probability vs. grade of membership
Examples
• This car is between 10 and 15 years old (pure imprecision)
• This car is very big (imprecision & vagueness)
• This car was probably made in Germany (uncertainty)
• The image will probably become very dark (uncertainty & vagueness)
Height
Fuzzy set properties
height(A) = sup {µ _{A} (x) x ∈ X}
Normal fuzzy set
height(A) = 1
Subnormal fuzzy set
height(A)
= 1
Support 

supp(A) = {x ∈ X  µ _{A} (x) > 0} 

Core 

core(A) = {x ∈ X  µ _{A} (x) = 1} 

Cardinality 
A = ^{} µ _{A} (x)
x∈X
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Operations on fuzzy sets
Intersection
A ∩ B = {(x, µ _{A}_{∩}_{B} (x))  x ∈ X }
Union
A ∪ B = {(x, µ _{A}_{∪}_{B} (x))  x ∈ X }
Complement
¯
A = {(x, µ _{A} (x))  x ∈ X }
¯
¯
µ _{A}_{∩}_{B} = min(µ _{A} , µ _{B} )
µ _{A}_{∪}_{B} = max(µ _{A} , µ _{B} )
µ _{A} = 1 − µ _{A}
¯
Note: For crisp sets A ∩ A = ∅. The same is often NOT true
for fuzzy sets.
Properties of fuzzy relations
ρ is reﬂexive if
ρ is symmetric if
∀x
∈ X
µ _{ρ} (x, x) = 1
∀x, y ∈
X
µ _{ρ} (x, y) = µ _{ρ} (y, x)
ρ is transitive if
∀x, z ∈ X
µ _{ρ} (x, z) = ^{} µ _{ρ} (x, y) ∩ µ _{ρ} (y, z)
y∈X
ρ is similitude if it is reﬂexive, symmetric, and transitive
Note: this corresponds to the equivalence relation in hard sets.
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
A fuzzy relation ρ in X is
Fuzzy relation
ρ = {((x, y ), µ _{ρ} (x, y ))  x, y ∈ X }
with a membership function
µ _{ρ} : X × X → [0, 1]
Fuzzy image processing
“Fuzzy image processing is the collection of all approaches that understand, represent and process the images, their segments and features as fuzzy sets. The representation and processing depend on the selected fuzzy technique and on the problem to be solved.”
(From: Tizhoosh, Fuzzy Image Processing, Springer, 1997)
“ a pictorial object is a fuzzy set which is speciﬁed by some
membership function deﬁned on all picture points. From this point of view, each image point participates in many
memberships. Some of this uncertainty is due to degradation,
but some of it is inherent
ﬁgure/ground distinctions is equivalent to transforming from membership functions to characteristic functions.”
In fuzzy set terminology, making
(1970, J.M.B. Prewitt)
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy image processing
original CT slice
Fuzzy thresholding
Example
volume rendered image
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy thresholding
g(x) =
0
if f (x) < T _{1}
if T _{1} ≤ f (x) < T _{2}
1 if T _{2} ≤ f (x) < T _{3}
^{µ}
_{g}_{(}_{x}_{)}
µ _{g}_{(}_{x}_{)}
if T _{3} ≤ f (x) < T _{4}
0 if T _{4} ≤ f (x)
Fuzziness and threshold selection
original image
Otsu
fuzziness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
knearest neighbors (kNN)
• Training: Identify (label) two sets of voxels X _{O} in object region and X _{N}_{O} in background
• Labeling: For each voxel v in input scenes
• Find its location P in feature space
• Find k voxels closest to P from sets X _{O} and X _{N}_{O}
• If a majority of those are from X _{O} , then label v as object, otherwise as background
• Fuzziﬁcation: If m of the k nearest neighbor of v belongs
to object, then assign µ(v ) = ^{m}
k
to v as membership
kmeans clustering
Algorithm
1

Consider a set of n data points (feature vectors) to be clustered. 
2

Assume the number of clusters, or classes, k , is known. 2 ≤ k < n. 
3

Randomly select k initial cluster center locations. 
4

All data points are assigned to a partition, deﬁned by the nearest cluster center. 
5

The cluster centers are moved to the geometric centroid (center of mass) of the data points in their respective partitions. 
6

Repeat from (4) until the objective function is smaller than a given tolerance, or the centers do not move to a new point. 
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
kmeans clustering
The kmeans algorithm iteratively optimizes an objective function in order to detect its minima by starting from a reasonable initialization.
• The objective function is
J =
k
n
j=1
i=1
x
(j)
i
− c _{j}
2
kmeans clustering
Issues
• How to initialize?
• What objective function to use?
• What distance to use?
• Robustness?
• What if k is not known?
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy cmeans clustering
• A partition of the observed set is represented by a c × n matrix U = [u _{i}_{k} ], where u _{i}_{k} corresponds to the membership value of the k ^{t}^{h} element (of n), to the i ^{t}^{h} cluster (of c clusters).
• Each element may belong to more than one cluster but its “overall” membership equals one.
• The objective function includes a parameter m controlling the degree of fuzziness.
• The objective function is
J =
c
n
j=1
i=1
(u _{i}_{j} ) ^{m} x
(j)
i
− c _{j}
2
Fuzzy cmeans clustering
Issues
• Computationally expensive
• Highly dependent on the initial choice of U
• If dataspeciﬁc experimental values are not available, m = 2 is the usual choice
• Extensions exist that simultaneously estimate the intensity inhomogeneity bias ﬁeld while producing the fuzzy partitioning
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
thresholding
Fuzzy clustering
Fuzzy
connectedness
Fuzzy
Techniques for
Image
Segmentation
L´aszl´o G. Ny´ul
Outline
Fuzzy systems
Fuzzy sets
Fuzzy image
processing
Fuzzy
connectedness
Theory
Algorithm
Variants
Applications
Fuzzy cmeans clustering
Algorithm
Basic idea of fuzzy connectedness
• local hangingtogetherness (aﬃnity) based on similarity in spatial location as well as in intensity(derived features)
• global hangingtogetherness (connectedness)
Fuzzy digital space
Fuzzy spel adjacency is a reﬂexive and symmetric fuzzy relation α in Z ^{n} and assigns a value to a pair of spels (c, d) based on how close they are spatially.
Example
µ _{α} (c, d) =
1
_{} _{c} _{−} _{d} _{}
0
Fuzzy digital space
if c − d < a small distance
otherwise
(Z ^{n} , α)
Scene (over a fuzzy digital space)
C = (C , f )
where C ⊂ Z ^{n} and f
: C → [L, H]
Paths between spels
A path p _{c}_{d} in C from spel c ∈ C to spel d ∈ C
c _{1} , c _{2} ,
is any sequence
, c _{m} of m ≥ 2 spels in C , where c _{1} = c and c _{m} = d.
Let P _{c}_{d} denote the set of all possible paths p _{c}_{d} from c to d. Then the set of all possible paths in C is
P _{C} =
^{}
P cd
c,d∈C
Fuzzy spel aﬃnity
Fuzzy spel aﬃnity is a reﬂexive and symmetric fuzzy relation κ in Z ^{n} and assigns a value to a pair of spels (c, d) based on how close they are spatially and intensitybasedpropertywise (local hangingtogetherness).
µ _{κ} (c, d) = h(µ _{α} (c, d), f (c), f (d), c, d)
Example
µ _{κ} (c, d) = µ _{α} (c, d) (w _{1} G _{1} (f (c) +
where G _{j} (x) = exp − ^{1}
2
(x
− m _{j} ) ^{2}
2
σ
j
f (d)) + w _{2} G _{2} (f (c) − f (d)))
Strength of connectedness
The fuzzy κnet N _{κ} of C is a fuzzy subset of P _{C} , where the membership (strength of connectedness) assigned to any path p _{c}_{d} ∈ P _{c}_{d} is the smallest spel aﬃnity along p _{c}_{d}
µ _{N} _{κ} (p _{c}_{d} ) =
min
j=1,
,m−1
µ _{κ} (c _{j} , c _{j}_{+}_{1} )
The fuzzy κconnectedness in C (K ) is a fuzzy relation in C and assigns a value to a pair of spels (c, d) that is the maximum of the strengths of connectedness assigned to all possible paths from c to d (global hangingtogetherness).
µ _{K} (c, d) = max cd µ _{N} _{κ} (p _{c}_{d} )
p _{c}_{d} ∈P
Fuzzy κ _{θ} component
Let θ ∈ [0, 1] be a given threshold
Let K _{θ} be the following binary (equivalence) relation in C
µ _{K} _{θ} (c, d) =
1 
if µ _{κ} (c, d) ≥ θ 
0 
otherwise 
Let O _{θ} (o) be the equivalence class of K _{θ} that contains o ∈ C
Let Ω _{θ} (o) be deﬁned over the fuzzy κconnectedness K as
Ω _{θ} (o) = {c ∈ C  µ _{K} (o, c) ≥ θ}
Practical computation of FC relies on the following equivalence
O _{θ} (o) = Ω _{θ} (o)
Fuzzy connectedness as a graph search problem
• Spels → graph nodes
• Spel faces → graph edges
• Fuzzy spelaﬃnity relation → edge costs
• Fuzzy connectedness → allpairs shortestpath problem
• Fuzzy connected objects → connected components
Fuzzy 

Techniques for 

Image 

Segmentation 

L´aszl´o G. Ny´ul 

Outline 

Fuzzy systems 

Fuzzy sets 

Fuzzy image 

processing 

Fuzzy 

connectedness 

Theory 
that 
Algorithm 

Variants 

Applications 
Fuzzy connected object
The fuzzy κ _{θ} object O _{θ} (o) of C containing o is
is
_{µ} O θ (o) _{(}_{c}_{)} _{=} ^{} η(c)
0
_{µ} O θ (o) _{(}_{c}_{)} _{=} ^{} η(c)
0
if c ∈ O _{θ} (o)
otherwise
if c ∈ Ω _{θ} (o)
otherwise
where η assigns an objectness value to each spel perhaps based on f (c) and µ _{K} (o, c).
Fuzzy connected objects are robust to the selection of seeds.
Computing fuzzy connectedness
Dynamic programming
Algorithm
Input: C, o ∈ C , κ Output: A Kconnectivity scene C _{o} = (C _{o} , f _{o} ) of C Auxiliary data: a queue Q of spels
begin set all elements of C _{o} to 0 except o which is set to 1 push all spels c ∈ C _{o} such that µ _{κ} (o, c) > 0 to Q
while Q
= ∅ do
remove a spel c from Q f _{v}_{a}_{l} ← max _{d}_{∈}_{C} _{o} [min(f _{o} (d), µ _{κ} (c, d))] if f _{v}_{a}_{l} > f _{o} (c) then f _{o} (c) ← f _{v}_{a}_{l} push all spels e such that µ _{κ} (c, e) > 0 f _{v}_{a}_{l} > f _{o} (e) f _{v}_{a}_{l} > f _{o} (e) endif endwhile end
and
µ _{κ} (c, e) > f _{o} (
Computing fuzzy connectedness
Dijkstra’slike
Algorithm
Input: C, o ∈ C , κ Output: A Kconnectivity scene C _{o} = (C _{o} , f _{o} ) of C Auxiliary data: a priority queue Q of spels
begin
set all elements of C _{o} to 0 except o which is set to 1 push o to Q
while Q
= ∅ do
remove a spel c from Q for which f _{o} (c) is maximal for each spel e such that µ _{κ} (c, e) > 0 do f _{v}_{a}_{l} ← min(f _{o} (c), µ _{κ} (c, e))
if f _{v}_{a}_{l} > f _{o} (e) then f _{o} (e) ← f _{v}_{a}_{l} update e in Q (or push if not yet in) endif endfor endwhile end
FC with threshold
MRI
Brain tissue segmentation
FSE
FC with threshold
CT and MRA
Fuzzy 

Techniques for 

Image 
Fuzzy connectedness variants 
Segmentation 

L´aszl´o G. Ny´ul 

Outline 

Fuzzy systems 

Fuzzy sets 
• Multiple seeds per object 
Fuzzy image 

processing 

Fuzzy 
• Scalebased fuzzy aﬃnity 
connectedness 

Theory 
• Vectorial fuzzy aﬃnity 
Algorithm 

Variants 

Applications 

• Absolute fuzzy connectedness 

• Relative fuzzy connectedness 

• Iterative relative fuzzy connectedness 
Object scale
Object scale in C at any spel c ∈ C
largest hyperball centered at c which lies entirely within the same object region
is the radius r (c) of the
The scale value can be simply and eﬀectively estimated without explicit object segmentation
Scalebased aﬃnity
Considers the following aspects
• spatial adjacency
• homogeneity (local and global)
• object feature (expected intensity properties)
• object scale
Computing object scale
Algorithm
Input: C, c ∈ C , W _{ψ} , τ ∈ [0, 1] Output: r (c)
begin k ← 1 while FO _{k} (c) ≥ τ do k ← k + 1 endwhile r(c) ← k end
Fraction of the ball boundary homogeneous with the center spel
FO _{k} (c) =
d∈B _{k} (c)
W _{ψ} _{s} (f (c) − f (d))
B _{k} (c) − B _{k}_{−}_{1} (c)
Relative fuzzy connectedness
• always at least two objects
• automatic/adaptive thresholds on the object boundaries
• objects (object seeds) “compete” for spels and the one with stronger connectedness wins
kNN vs. VSRFC
Relative fuzzy connectedness
Algorithm
Let O _{1} , O _{2} , S = {o _{1} , o _{2}
b(o _{j} ) = S \ {o _{j} } denote the ‘background’ seeds w.r.t. seed o _{j} .
, O _{m} , a given set of objects (m ≥ 2), , o _{m} } a set of corresponding seeds, and let
1

deﬁne aﬃnity for each object ⇒ κ _{1} , κ _{2} , 
, κ _{m} 
2

combine them into a single aﬃnity ⇒ κ = ^{} _{j} κ _{j} 

3

compute fuzzy connectedness using κ ⇒ K 

4

determine the fuzzy connected objects ⇒ 
O _{o}_{b} (o) = {c ∈ C ∀o ^{} ∈ b(o) µ _{K} (o, c) > µ _{K} (o ^{} , c)}
_{µ} O ob _{(}_{c}_{)} _{=} ^{} η(c)
0
if c ∈ O _{o}_{b} (o) otherwise
Image segmentation using FC
• MR
• brain tissue, tumor, MS lesion segmentation
• MRA
• vessel segmentation and arteryvein separation
• CT bone segmentation
• kinematics studies
• measuring bone density
• stressandstrain modeling
• CT soft tissue segmentation
• cancer, cyst, polyp detection and quantiﬁcation
• stenosis and aneurism detection and quantiﬁcation
• Digitized mammography
• detecting microcalciﬁcations
• Craniofacial 3D imaging
• visualization and surgical planning
Protocols for brain MRI
Brain tissue segmentation
SPGR
FC segmentation of brain tissues
1

Correct for RF ﬁeld inhomogeneity 
2

Standardize MR image intensities 
3

Compute fuzzy aﬃnity for GM, WM, CSF 
4

Specify seeds and VOI (interaction) 
5

Compute relative FC for GM, WM, CSF 
6

Create brain intracranial mask 
7

Correct brain mask (interaction) 
8

Create masks for FC objects 
9

Detect potential lesion sites 
10

Compute relative FC for GM, WM, CSF, LS 
11

Verify the segmented lesions (interaction) 
MS lesion quantiﬁcation
FSE
Brain tumor quantiﬁcation
MRA slice and MIP rendering
Skull object from CT
MRA vessel segmentation and artery/vein separation
Mult mai mult decât documente.
Descoperiți tot ce are Scribd de oferit, inclusiv cărți și cărți audio de la editori majori.
Anulați oricând.