Escolar Documentos
Profissional Documentos
Cultura Documentos
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
M. Emre Celebi
Table of Contents
1 Introduction
2 Color Spaces
CIP: Motivation
CIP: Motivation
CIP: Motivation
CIP: Motivation
CIP: Motivation
Table of Contents
1 Introduction
2 Color Spaces
Color Spaces
Color Spaces
Color Spaces
Color Spaces
Color Spaces
(a) RGB color cube (wire) (b) RGB color cube (solid)
Properties of RGB
Properties of RGB
Properties of RGB
Properties of RGB
Properties of RGB
Gamma Correction
r = R+GR +B
G
g = R+G +B
B
b = R+G +B = 1 (r + g )
Properties of rgb
Properties of rgb
Properties of rgb
Properties of rgb
Properties of rgb
Properties of XYZ
Device independent
Properties of XYZ
Device independent
Not perceptually uniform
Properties of XYZ
Device independent
Not perceptually uniform
Linear
Properties of XYZ
Device independent
Not perceptually uniform
Linear
Not intuitive
Properties of XYZ
Device independent
Not perceptually uniform
Linear
Not intuitive
Not invariant
min (R, G , B)
S =13
R +G +B
Intensity:
R +G +B
I =
3
M. Emre Celebi Fundamentals of Color Image Processing
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Properties of HSI
Properties of HSI
Properties of HSI
Properties of HSI
Properties of HSI
Properties of HSI
Properties of HSI
They are more intuitive than most other color spaces (manual
color selection).
They are more intuitive than most other color spaces (manual
color selection).
They decouple luminance from color information
(segmentation can be done on Hue and Saturation only).
They are more intuitive than most other color spaces (manual
color selection).
They decouple luminance from color information
(segmentation can be done on Hue and Saturation only).
Hue is invariant to viewpoint, object shape, highlights, and
illuminant intensity.
They are more intuitive than most other color spaces (manual
color selection).
They decouple luminance from color information
(segmentation can be done on Hue and Saturation only).
Hue is invariant to viewpoint, object shape, highlights, and
illuminant intensity.
Computationally efficient transformations exist between RGB
and these spaces.
Reference: Y.I. Ohta, T. Kanade, and T. Sakai, Color Information for Region Segmentation, Computer Graphics
I1 = R+G3 +B
I2 = R B
I3 = 2G RB
2
Reference: Y.I. Ohta, T. Kanade, and T. Sakai, Color Information for Region Segmentation, Computer Graphics
I1 = R+G3 +B
I2 = R B
I3 = 2G RB
2
Properties of I1I2 I3
Properties of I1I2 I3
Properties of I1I2 I3
Properties of I1I2 I3
Properties of I1I2 I3
L = 116f (Y /Y0 ) 16
a = 500 [f (X /X0 ) f (Y /Y0 )]
b = 200 [f (Y /Y0 ) f (Z /Z0 )]
(
t 1/3 t > 0.008856
f (t) =
7.787t + 16/116 t 0.008856
where X0 , Y0 , and Z0 are the tristimulus values of the reference
white, e.g. for D65: X0 = 0.950456, Y0 = 1.0, and Z0 = 1.089058.
Properties of CIELAB
Device independent
Properties of CIELAB
Device independent
Approximately perceptually uniform (Euclidean distance
correlates well with perceived color differences)
Properties of CIELAB
Device independent
Approximately perceptually uniform (Euclidean distance
correlates well with perceived color differences)
Not linear
Properties of CIELAB
Device independent
Approximately perceptually uniform (Euclidean distance
correlates well with perceived color differences)
Not linear
Not intuitive
Properties of CIELAB
Device independent
Approximately perceptually uniform (Euclidean distance
correlates well with perceived color differences)
Not linear
Not intuitive
Not invariant
Table of Contents
1 Introduction
2 Color Spaces
Classification of CQ Methods
Anatomy of a CQ Method
Anatomy of a CQ Method
Anatomy of a CQ Method
Image-Independent CQ Methods
Image-Independent CQ Methods
Image-Independent CQ Methods
Disadvantages
Performs poorly on images with a wide range of colors.
Popularity: Simplest Context-Free CQ Method
Disadvantages
Performs poorly on images with a wide range of colors.
Disregards colors in sparse regions of the color space.
Popularity: Simplest Context-Free CQ Method
Disadvantages
Performs poorly on images with a wide range of colors.
Disregards colors in sparse regions of the color space.
Performs poorly when K is small.
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Disadvantages
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Time efficient: O(NK ) per iteration
Disadvantages
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Time efficient: O(NK ) per iteration
Guaranteed to terminate (quadratic convergence rate)
Disadvantages
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Time efficient: O(NK ) per iteration
Guaranteed to terminate (quadratic convergence rate)
Disadvantages
Easily gets stuck in local minima
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Time efficient: O(NK ) per iteration
Guaranteed to terminate (quadratic convergence rate)
Disadvantages
Easily gets stuck in local minima
Highly sensitive to initialization
Advantages/Disadvantages of K-Means
Advantages
Simple, versatile, easy to implement
Time efficient: O(NK ) per iteration
Guaranteed to terminate (quadratic convergence rate)
Disadvantages
Easily gets stuck in local minima
Highly sensitive to initialization
Computationally expensive due to iterative nature, O(NKT )
Adapting K-Means to CQ
Adapting K-Means to CQ
Adapting K-Means to CQ
Adapting K-Means to CQ
Table of Contents
1 Introduction
2 Color Spaces
(a) Adequate light, short exposure (b) Low light, long exposure
Examples of Noisy Images 4
ok with probability 1 ,
xk =
rk with probability
Symbols
o = {o1 , o2 , o3 }: original color vector
x = {x1 , x2 , x3 }: noisy color vector
r1 , r2 , r3 : random, uncorrelated variables
: channel corruption probability
Correlated Impulsive Noise Model
o with probability 1 ,
{r1 , o2 , o3 } with probability 1 ,
x= {o1 , r2 , o3 } with probability 2 ,
{o1 , o2 , r3 } with probability 3 ,
{r1 , r2 , r3 } with probability (1 (1 + 2 + 3 ))
Symbols
o = {o1 , o2 , o3 }: original color vector
x = {x1 , x2 , x3 }: noisy color vector
r = {r1 , r2 , r3 }: random noise vector
: sample corruption probability
1 , 2 , 3 : corruption probabilities for R, G, B, respectively
Marginal vs. Vector Processing
(a) Input (37, 552 colors) (b) 30% noisy (57, 434 col-
ors)
(a) Marginal median filter output (b) Vector median filter output
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
M N
1 XX
MAE (A, B) = d1 (A(r , c), B(r , c))
3MN
r =1 c=1
M X N
1 X
MSE (A, B) = d22 (A(r , c), B(r , c))
3MN
r =1 c=1
Symbols
A and B: M N color images being compared
d1 : L1 (City-Block) distance
d2 : L2 (Euclidean) distance
x1 x2 x3
x x6
4
x5
x 7 x8 x 9
x1 x2 x3
x x6
4
x5
x 7 x8 x 9
x1 x2 x3
x x6
4
x5
x 7 x8 x 9
3
K
Y min(xik , xjk ) + K
sfms (xi , xj ) =
max(xik , xjk ) + K
k=1
Using Fuzzy Metrics, Real-Time Imaging, vol. 11, no. 5/6, pp. 417428, 2005.
C ,t C t
scfs (xi , xj ) =
C + d2 (xi , xj ) t + max (|ri rj | , |ci cj |)
3
P
xik xjk
k=1
dcos (xi , xj ) = = arccos
kxi k kxj k
3
P
xik xjk
k=1
dcos (xi , xj ) = = arccos
kxi k kxj k
3
P
xik xjk
k=1
dcos (xi , xj ) = = arccos
kxi k kxj k
(a) Input (b) 10% noisy (MAE=6, (c) dcos (MAE=5, MSE=83)
MSE=1041)
(d) d1 (MAE=4, MSE=41) (e) sfms (MAE=4, MSE=41) (f) scfs (MAE=1, MSE=14)
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
VMF and its variants tend to modify pixels that are not
corrupted by noise.
VMF and its variants tend to modify pixels that are not
corrupted by noise.
Switching filters employ noise detectors to avoid replacing
noise-free pixels.
VMF and its variants tend to modify pixels that are not
corrupted by noise.
Switching filters employ noise detectors to avoid replacing
noise-free pixels.
These filters are often quite efficient since the filtering
operation is performed only on the noisy pixels.
Adapted from B. Smolka
M. Emre Celebi Fundamentals of Color Image Processing
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
xvmf if |{xi 6=C W s.t. kxC xi k T }| < m
y=
xC otherwise
n n
(x , x ) < (x , x )
P P
xk
if sfms C i sfms k i
y= i =1 i =1
i 6=C
xC
otherwise
n
(x , x )
P
xk = arg max sfms k i
xk W i =1
i 6=C
Reference: S. Morillas, V. Gregori, G. Peris-Fajarnes, and P. Latorre, A Fast Impulsive Noise Color Image Filter
Using Fuzzy Metrics, Real-Time Imaging, vol. 11, no. 5/6, pp. 417428, 2005.
(c) VMF (MAE=3, MSE=36) (d) FFNRF (MAE=1, (e) FPGF (MAE=1, MSE=25)
MSE=33)
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Table of Contents
1 Introduction
2 Color Spaces
include
Uniquely identifies the image/region
include
Uniquely identifies the image/region
Cheap to compute
include
Uniquely identifies the image/region
Cheap to compute
Low in dimensionality
include
Uniquely identifies the image/region
Cheap to compute
Low in dimensionality
Invariant to occlusion
include
Uniquely identifies the image/region
Cheap to compute
Low in dimensionality
Invariant to occlusion
Invariant to various geometric transformations
include
Uniquely identifies the image/region
Cheap to compute
Low in dimensionality
Invariant to occlusion
Invariant to various geometric transformations
Invariant to lighting
Color Histograms
Color Histograms
n
1 X
1 Dhi (A, B) = |Ai Bi |
2N
i =1
Advantages
Cheap to compute
Disadvantages
Advantages
Cheap to compute
Invariant to rotation and translation
Disadvantages
Advantages
Cheap to compute
Invariant to rotation and translation
Disadvantages
Spatial information is discarded
Advantages
Cheap to compute
Invariant to rotation and translation
Disadvantages
Spatial information is discarded
Moderate-to-high dimensionality
Advantages
Cheap to compute
Invariant to rotation and translation
Disadvantages
Spatial information is discarded
Moderate-to-high dimensionality
Sensitive to lighting
Reference: J. Hafner, H.S. Sawhney, W. Equitz, M. Flickner, and W. Niblack, Efficient Color Histogram Indexing
for Quadratic Form Distance Functions, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 17,
Reference: J. Hafner, H.S. Sawhney, W. Equitz, M. Flickner, and W. Niblack, Efficient Color Histogram Indexing
for Quadratic Form Distance Functions, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 17,
for Quadratic Form Distance Functions, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 17,
kci cj k
sij = 1
max (kca cb k)
a,b{1,2,...,n}
Reference: M. Stricker and M. Orengo, Similarity of Color Images, Proc. of SPIE 2420, pp. 381392, 1995.
Color Moments
Reference: M. Stricker and M. Orengo, Similarity of Color Images, Proc. of SPIE 2420, pp. 381392, 1995.
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Advantages
Cheap to compute
Disadvantages
Advantages
Cheap to compute
Very low in dimensionality
Disadvantages
Advantages
Cheap to compute
Very low in dimensionality
Disadvantages
Spatial information is discarded
Advantages
Cheap to compute
Very low in dimensionality
Disadvantages
Spatial information is discarded
Sensitive to lighting
Advantages
Cheap to compute
Very low in dimensionality
Disadvantages
Spatial information is discarded
Sensitive to lighting
Choice of wkj is not trivial
Advantages
Cheap to compute
Very low in dimensionality
Disadvantages
Spatial information is discarded
Sensitive to lighting
Choice of wkj is not trivial
Color distribution is treated as three independent 1-D
distributions rather than a true 3-D distribution
Reference: G. Pass, R. Zabih, J. Miller, Comparing Images Using Color Coherence Vectors, Proc. of the 4th
Reference: G. Pass, R. Zabih, J. Miller, Comparing Images Using Color Coherence Vectors, Proc. of the 4th
Reference: G. Pass, R. Zabih, J. Miller, Comparing Images Using Color Coherence Vectors, Proc. of the 4th
An Example CCV ( = 4)
(k)
ci ,cj (I) = Pr x2 Icj |max {|r1 r2 | , |c1 c2 |} = k
x1 Ici ,
x2 I
Reference: J. Huang, S.R. Kumar, M. Mitra, W.J. Zhu, and R. Zabih, Spatial Color Indexing and Applications,
International Journal of Computer Vision, vol. 35, no. 3, pp. 245268, 1999.
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Autocorrelogram
Autocorrelogram
Autocorrelogram
Autocorrelogram
(k) (k)
X ci ,cj (I) ci ,cj (I )
D (I, I ) = (k) (k)
i,j{1,2,...,n}, 1 + ci ,cj (I) + ci ,cj (I )
k{d}
Table of Contents
1 Introduction
2 Color Spaces
Thresholding
Thresholding
Clustering
Thresholding
Clustering
Edge detection
Thresholding
Clustering
Edge detection
Region-based (shrinking/growing and/or splitting/merging)
Thresholding
Clustering
Edge detection
Region-based (shrinking/growing and/or splitting/merging)
Morphological (watersheds)
Thresholding
Clustering
Edge detection
Region-based (shrinking/growing and/or splitting/merging)
Morphological (watersheds)
Active contours
Thresholding
Clustering
Edge detection
Region-based (shrinking/growing and/or splitting/merging)
Morphological (watersheds)
Active contours
Soft-computing (neural networks, fuzzy logic, evolutionary
computing, etc.)
Graph Cuts
Graph Cuts
Graph Cuts
Graph Cuts
assoc(A, A) assoc(B, B)
Nassoc(A, B) = +
assoc(A, V) assoc(B, V)
This criterion measures how tightly on average nodes within the
group are connected to each other. Since,
Ncut(A, B) = 2 Nassoc(A, B)
Symbols
W: |V| |V| symmetric matrix with W(i , j) = wij
D = diag(d1 , d2 , . . . , d|V| )
P
di = j wij : degree of a node i
Symbols
W: |V| |V| symmetric matrix with W(i , j) = wij
D = diag(d1 , d2 , . . . , d|V| )
P
di = j wij : degree of a node i
for pixels within a radius kxi xj k < r , where Fi and xi are pixel
i s feature vector and spatial location, respectively.
Advantages
Flexibility (definition of W)
Disadvantages
Advantages
Flexibility (definition of W)
Good performance
Disadvantages
Advantages
Flexibility (definition of W)
Good performance
Disadvantages
O(N 3 ) time complexity (N: # data points)
Advantages
Flexibility (definition of W)
Good performance
Disadvantages
O(N 3 ) time complexity (N: # data points)
Max. number of regions, K , should be specified a priori
Advantages
Flexibility (definition of W)
Good performance
Disadvantages
O(N 3 ) time complexity (N: # data points)
Max. number of regions, K , should be specified a priori
Numerous other parameters
Definition
Feature Space: An D-dimensional abstract space where each
point corresponds to a parametric representation of a pixel or a set
of pixels.
Definition
Feature Space: An D-dimensional abstract space where each
point corresponds to a parametric representation of a pixel or a set
of pixels.
Definition
Feature Space: An D-dimensional abstract space where each
point corresponds to a parametric representation of a pixel or a set
of pixels.
Two histograms with the same binwidth, but different end points
Adapted from T. Duong
Drawbacks of Histograms
They are not smooth
They depend on end points of the bins
Two histograms with the same binwidth, but different end points
Adapted from T. Duong
Drawbacks of Histograms
They are not smooth
They depend on end points of the bins
They depend on width of the bins
Two histograms with the same binwidth, but different end points
Adapted from T. Duong
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Properties of MS
Properties of MS
Properties of MS
Properties of MS
Properties of MS
Reference: D. Comaniciu and P. Meer, Mean Shift: A Robust Approach Toward Feature Space Analysis, IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Reference: D. Comaniciu and P. Meer, Mean Shift: A Robust Approach Toward Feature Space Analysis, IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Reference: D. Comaniciu and P. Meer, Mean Shift: A Robust Approach Toward Feature Space Analysis, IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Reference: D. Comaniciu and P. Meer, Mean Shift: A Robust Approach Toward Feature Space Analysis, IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Reference: D. Comaniciu and P. Meer, Mean Shift: A Robust Approach Toward Feature Space Analysis, IEEE
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603619, 2002.
Advantages/Disadvantages of MS
Advantages
Generality
Disadvantages
Advantages/Disadvantages of MS
Advantages
Generality
Noise robustness
Disadvantages
Advantages/Disadvantages of MS
Advantages
Generality
Noise robustness
Ability to handle arbitrary clusters shapes/feature spaces
Disadvantages
Advantages/Disadvantages of MS
Advantages
Generality
Noise robustness
Ability to handle arbitrary clusters shapes/feature spaces
Only one (intuitive) parameter: bandwidth
Disadvantages
Advantages/Disadvantages of MS
Advantages
Generality
Noise robustness
Ability to handle arbitrary clusters shapes/feature spaces
Only one (intuitive) parameter: bandwidth
Disadvantages
O(N 2 ) time complexity (N: # data points)
Advantages/Disadvantages of MS
Advantages
Generality
Noise robustness
Ability to handle arbitrary clusters shapes/feature spaces
Only one (intuitive) parameter: bandwidth
Disadvantages
O(N 2 ) time complexity (N: # data points)
Choice of kernel bandwidth is not trivial
Reference: R. Nock and F. Nielsen, Statistical Region Merging, IEEE Transactions on Pattern Analysis and
Reference: R. Nock and F. Nielsen, Statistical Region Merging, IEEE Transactions on Pattern Analysis and
Reference: R. Nock and F. Nielsen, Statistical Region Merging, IEEE Transactions on Pattern Analysis and
Reference: R. Nock and F. Nielsen, Statistical Region Merging, IEEE Transactions on Pattern Analysis and
where s
ln(6 |I |2 R|R| )
b(R) = g
2Q |R|
Symbols
I : Input image with |I | pixels
g : Number of gray levels (g = 256 for 8-bit images)
R and R : The two regions being tested
Ra : Average for color channel a in region R
Rp : Set of regions with p pixels
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
SRM Algorithm
Symbols
SI : Set of all pairs of adjacent pixels
R(p): Region to which pixel p belongs at any given time
input : Image I
output: A segmentation of I
SI = counting sort(SI , f );
for (i = 0; i < |SI | ; i = i + 1) do
(pi , pi ) is the i -th pair of adjacent pixels in SI ;
if R(pi ) 6= R(pi ) and P(R(pi ), R(pi )) = true then
merge(R(pi ), R(pi ));
end
end
M. Emre Celebi Fundamentals of Color Image Processing
Introduction
Color Spaces
Color Image Quantization
Color Image Filtering
Color Feature Extraction
Color Image Segmentation
Choice of f (., .)
Choice of f (., .)
where
fa (p, p ) = pa pa
Acknowledgments