Principal Components of GLCM Texture Measures:

Principal Components of
GLCM Texture Measures:
What can they tell us
and are they useful?
Mryka Hall-Beyer and Archana Srivastava
Hall-Beyer & Srivastava IGARSS August 2006
1
Outline
• Background
– Why texture
– What is texture and how it is measured
– Usefulness and practical problems of texture
measures
• Correlation among the texture measures
– PCA as decorrelation
• Results of PCA of 8 GLCM textures
– Three window sizes
• Practical results
• Conclusions
Hall-Beyer & Srivastava IGARSS August 2006
2
Why texture?
• Important after spectral reflectance in
identifying and characterising objects
• Independent information from spectral
data
• Classification: Including a quantitative
measure of texture should and does
improve class identification
Hall-Beyer & Srivastava IGARSS August 2006
3
Defining texture
• Three variables constitute texture:
– Difference in grey level (GL) values
– Coarseness: scale of GL differences
– Directionality or regular pattern or lack of it
Hall-Beyer & Srivastava IGARSS August 2006
4
Quantifying texture
• GLCM most commonly used method
• Takes into account all three aspects of
texture
• Uses a neighbourhood operation within
moving window image areas
• GLCM COR measure contains information
in Moran’s I and Geary’s C statistics
(clustering)
Hall-Beyer & Srivastava IGARSS August 2006
5
“Texture Measures”
• Grey Level Co-Occurrence Matrix (GLCM)
records
– what GL values occur next to what others
– how often they occur
• Calculations based on the GLCM yield
numbers whose relative value interprets a
particular kind of texture
– These are called “measures” from here on
Tutorial: http://fp.ucalgary.ca/mhallbey
Hall-Beyer & Srivastava IGARSS August 2006
6
Simple Example
• Suppose a texture with a large GL difference
between adjacent pixels
– Qualitatively, we would describe this as “contrasty”
– Call this measure “Contrast” (CON)
• CON would yield a relatively high number within
a window where there is a large GL difference
between adjacent pixels
• CON would yield a low number where there is
little GL difference
Higher
contrast
Hall-Beyer & Srivastava IGARSS August 2006
Lower
contrast
7
The measures we considered
•
•
•
•
•
•
•
•
HOM: homogeneity
CON: contrast
DIS: dissimilarity
MEAN: GLCM mean
STD: GLCM standard deviation
ENT: entropy
ASM: angular second moment (energy)
COR: GLCM correlation
Hall-Beyer & Srivastava IGARSS August 2006
8
The practical problem
• There are too many measures
– Can one work for all image objects?
– If so, which one?
– If not, how many do you need?
• And which ones?
– Measures are usually correlated with one
another
• Classification requires maximally
uncorrelated data inputs
Hall-Beyer & Srivastava IGARSS August 2006
9
Often, one or two measures are
selected based on intuition,
experience, software defaults or
sheer guesswork.
There must be a better way!
Haralick in 1973 suggested PCA.
Hall-Beyer & Srivastava IGARSS August 2006
10
Image used
• Landsat image of southern Alberta,
Canada, band 4 (nir)
• Landscape of square and round fields,
grasslands, watercourses, and erosion
patterns
– A variety of textures
Hall-Beyer & Srivastava IGARSS August 2006
11
Hall-Beyer & Srivastava IGARSS August 2006
12
Principal Components (PC)
• Generally used to extract the most meaningful
uncorrelated information from a dataset
– Practical: Can we therefore put all texture measures
into the PC pot and extract the useful information from
all of them into 1 or 2 components?
– “Loadings” (correlations between each component
and the input data bands) may allow interpretation of
what each component means
• Theoretical: PC components may allow us to
understand what kinds of texture exist in an
image and in general.
Hall-Beyer & Srivastava IGARSS August 2006
13
Prediction
• PC components will combine the
information from the known correlated
texture measures into individual channels
• We can reduce the useful information in 8
texture measures to 2 or 3 PC channels
– “Useful” is operationally defined as >85% of
total dataset variance
Hall-Beyer & Srivastava IGARSS August 2006
14
Expectations
• The equations lead us to expect high
correlation between:
– HOM and DIS (negative correlation)
– CON and DIS (positive)
– ENT and DIS (positive)
– ENT and HOM (negative)
– ENT and ASM (negative)
Hall-Beyer & Srivastava IGARSS August 2006
15
Correlation matrix of texture measures
25x25 pixel window
HOM
CON
DIS
MEAN
STD
ENT
ASM
COR
HOM
1
-0.45
-0.80
0.28
-0.28 -0.94
0.72
0.14
CON
-0.45
1
0.88
-0.14
0.72
0.49
-0.16
-0.05
DIS
-0.80
0.88
1
-0.25
0.62
0.79
-0.42
-0.11
MEAN
0.28
-0.14
-0.25
1
0.02 -0.12
-0.11
0.35
STD
-0.28
0.72
0.62
0.02
1
0.46
-0.18
0.50
ENT
-0.94
0.49
0.79
-0.12
0.46
1
-0.80
0.10
ASM
0.72
-0.16
-0.42
-0.11
-0.18 -0.80
1
-0.17
COR
0.14
-0.05
-0.11
0.35
-0.17
1
0.50
0.10
Green: expected positive correlation
Red: expected negative correlation
Yellow: high correlation not predicted from calculation method
Hall-Beyer & Srivastava IGARSS August 2006
16
ENT
STD
MEAN
DIS
CON
HOM
-1
-0.5
-0.5
0
0.5
1
PC3: 16.90% of total variance
COR
ASM
ENT
STD
MEAN
DIS
CON
0
Hall-Beyer & Srivastava IGARSS August 2006
HOM
0.5
1
Cumulative variance 70.72%
COR
ASM
PC2: 20.85% of total variance
COR
ENT
ASM
STD
MEAN
DIS
-0.6
Cumulative variance 96.15%
PC1: 50.13% of total vairance
Cumulative variance 87.62%
Cumulative variance 50.13%
PC – texture measure loadings
-1
CON
-0.4
-0.2
HOM
0
0.2
0.4
0.6
PC4: 8.53% of total variance
COR
CON
-0.5
ASM
ENT
STD
DIS
MEAN
HOM
0
0.5
1
17
PC1: “Connectivity”?
• 50.13% of total dataset
variance included
• Represents contrast between
COR and remaining measures
PC1
– ENT and MEAN not important
here
low
high
• Bright pixels: pixels having
both high COR and low others
• COR provides same info as
Moran’s I or Geary’s C
• Geographical feature
emphasized: linear features
PC1: 50.13% of total vairance
COR
ASM
STD
HOM
Hall-Beyer & Srivastava IGARSS August 2006
-1
ENT
MEAN
DIS
CON
-0.5
0
Original image
0.5
1
18
PC2:
“Interior” textures?
• 20.85% of total dataset
variance
• Contrast between HOM
and MEAN, and all other
measures
• Captures expected
contrast between HOM
and DIS, also HOM and
ENT
• Captures land cover
differences, no linear
features
PC2
PC1
low
high
PC2: 20.85% of total variance
COR
ENT
ASM
STD
DIS
-0.6
Hall-Beyer & Srivastava IGARSS August 2006
MEAN
CON
-0.4
-0.2
HOM
0
0.2
0.4
0.6
Original image
19
PC3:
Connectivity again?
• 16.9% of total dataset
variance
• High COR and HOM
together
• Mirror image (almost)
of PC1
PC2
PC1
low
high
– Edges have low values
• Most texture variability
occurs in edges.
PC3: 16.90% of total variance
STD
MEAN
DIS
-0.5
Hall-Beyer & Srivastava IGARSS August 2006
COR
ASM
ENT
CON
0
HOM
0.5
1
Original image
20
PC4:
• 8.5% of total dataset
variance included
• Contrast of MEAN with
CON
• Bright pixels have both
high MEAN and low
CON
• Similar land cover
information to PC2
PC2
PC1
PC4
low
high
PC4: 8.53% of total variance
COR
CON
-1
Hall-Beyer & Srivastava IGARSS August 2006
-0.5
ASM
ENT
STD
DIS
MEAN
HOM
0
0.5
1
Original image
21
What can we conclude?
• A majority of dataset variance is captured by
components that are “connected” (PC1 and
PC3): 67%
• PC2 does NOT capture edges but distinguishes
among land covers having different “interior”
textures: 21%
• PCA of these 8 textures finds two “fundamental”
textures:
– connected/linear features
– object “interior” textures
Hall-Beyer & Srivastava IGARSS August 2006
22
Superposition of one connectivity component, one
interior texture component, and original image, 25x25
windows
r=PC1
(edges)
g=original
band 4
image
b= PC2
(interior)
Hall-Beyer & Srivastava IGARSS August 2006
23
What about other window sizes?
We tested PCA of these 8 textures for other
window sizes. Similar trends were noted.
Hall-Beyer & Srivastava IGARSS August 2006
24
5x5 window size
• first 4 PCs each > 10% total variance
• PC1 and 2 connectivity, PC4 interior
• Connectivity PCs are again heavily loaded with
COR and HOM
• Interior PCs are heavily loaded with MEAN
• PC1 mainly contrast between COR and HOM
• With 5x5 window, connectivity components
account for 85% of variance, interior
components for 12%
Hall-Beyer & Srivastava IGARSS August 2006
25
Superposition of one connectivity component, one
interior texture component, and original image, 5x5
window
r=PC1
(edges)
g=original
band 4 image
b= PC4
(interior)
Hall-Beyer & Srivastava IGARSS August 2006
26
Other window sizes part 2: 13x13
• First 4 PCs each contain >10% total
variance
• PC 1 and 2 connectivity
• PC3 and 4 interior
• With 13X13 window, connectivity PCs
account for 83% of variance, interior PCs
for 12%
Hall-Beyer & Srivastava IGARSS August 2006
27
Superposition of one connectivity component, one
interior texture component, and original image, 13x13
window
r=PC1 (edges)
g=original band 4
image
b= PC4 (interior)
Hall-Beyer & Srivastava IGARSS August 2006
28
Conclusions
• Theoretical: at least in this image, for all
tested window sizes there seem to be two
fundamental textures, characterised as
“connectivity” and “interior textures”
• “Connectivity” textures rely on COR in
combination with other measures,
especially HOM
• “Interior” textures rely on MEAN, in
combination
Hall-Beyer & Srivastava IGARSS August 2006
29
• Practical: 2 or 3 components capture
these two fundamental textures.
Hall-Beyer & Srivastava IGARSS August 2006
30
Unexpected!
• Against predictions, the expected
correlations (HOM and CON, e.g.) did not
cluster in early components.
Hall-Beyer & Srivastava IGARSS August 2006
31
Remaining questions
• Does this pattern hold true for very
different scene components?
• Could COR and MEAN be used alone as
the two texture measures, or is it important
to capture their relationship to the other
measures?
Hall-Beyer & Srivastava IGARSS August 2006
32