Image Classification
Image Classification
Prepared by
Dr. Sao Hone Pha
RS & GIS Lab
Yangon Technological University
Objective
Urban
Forest
Lake
Agriculture
2
Image Classification
The spectral pattern present within the data for each pixel
is used as the numerical basis for categorization.
Different feature types manifest different combinations of
DNs based on their inherent spectral reflectance and
emittance properties.
Urban
Forest
Lake
Agriculture
3
4
Spectral Pattern Recognition
5
Spatial Pattern Recognition
Example
Distinct spectral and spatial changes during growing season
can permit discrimination on multidate imagery that would be
impossible given any single date.
7
Temporal Pattern Recognition
10
Information Class and Spectral Class
11
Information Class
12
Spectral Class
13
Approach to Classification
Supervised Classification
Unsupervised Classification
14
Supervised Classification
Selected multispectral scanner measurements made along one scan line
sensor covers Spectral bands 1(blue),2(Green), 3(Red), 4(NIR), 5(thermal IR)
16
Supervised Classification
17
Basic Steps in Supervised Classification
Training Stage
The analyst identifies representative training areas and develops
a numerical description of the spectral attributes of each land
cover type of interest in the scene.
Classification Stage
Each pixel in the image data set is categorized into land cover
class it most closely resembles. If the pixel is insufficiently
similar to any training data set, it is usually labeled “unknown”.
The category label assigned to each pixel in this process is then
recorded in the corresponding cell of an interpreted data set
18 (an “output image”).
Basic Steps in Supervised Classification
Output Stage
After the entire data set has been categorized, the results are
presented in the output stage.
19
Supervised Classification
A cluster
• is the representative for a class
• includes a minimum number of
observations (30*n)
• is distinct
20
Basic Steps in Supervised Classification
21
Decision Rules for Supervised Classification
22
Parametric Decision Rule
23
Non-parametric Decision Rule
A non-parametric decision rule is not based on statistics;
therefore, it is independent of the properties of the data.
S
S S
S
U U U S S
C
S S C
U
U U U
U
U CC C
C Known Cover Type
U U U U CC
CC Selected from
U U U CC training Sites
Band 3 Digital Number
H H
H H H W Water
H
H H H F Forest
HHH H H
W H Hay
H H
W WW H H H F S Sand
H F F F
WWWW F F F U Urban
W W FF FF F C Corn
W FF
WW F F FF
26
Feature Space
255
28 0
0 Band x 255
Dimensionality of Data
29
Measurement Vector
The measurement vector of a pixel is the set of data file values for
one pixel in all n bands.
Although image data files are stored band-by-band, it is often
necessary to extract the measurement vectors for individual pixels.
30
Measurement Vector
i Particular band
Vi the data file value of the pixel in band i, then the measurement
vector for this pixel is
V
1
V
2
V
31 3
Mean Vector
Mean Vector µI =
32
Image Space
PIXEL A: 34,25,117
PIXEL B: 34,24,119
PIXEL C: 11,77,51
34
One Dimensional Feature Space
Input layer
35
Multi-dimensional Feature Space
Feature vectors
36
Feature Space (Scattergram)
Low frequency
High
frequency
Max y
.. .
Band y . ... .
..
(units of 5 DN)
. Min y
38
Spectral Distance
Euclidean Spectral distance is distance in n- dimensional
spectral space. It is a number that allows two measurement
vectors to be compared for similarity. The spectral distance
between two pixels can be calculated as follows:
n 2
=D ∑ di − ei
i=1
Where:
D = spectral distance
n = number of bands (dimensions)
i = a particular band
di = data file value of pixel d in band i
ei = data file value of pixel e in band i
This is the equation for Euclidean distance—in two dimensions (when n = 2), it can be
simplified to the Pythagorean Theorem (c2 = a2 + b2), or in this case:
39 D2 = (di - ei)2 + (dj - ej)2
Classifiers
Minimum Distance to Means Classifier
S
U SSS
U U U U S+ S
S C
U U S C
U U 2 C C
U U U +U 1 C +
U U U U U U CC C Known Cover Type
CC HH
U U U U H Selected from
H HH
Band 3 Digital Number
H H H training Sites
H
H H+ H
H H H HH W Water
H H F Forest
H H FF
WW F
F FF F
H Hay
WWW +
F F F FF S Sand
W +W FF F
W F FF U Urban
W W
W C Corn
WW
First, the mean (or) average spectral value in each band for
each category is determined. These values comprise the mean
vector.
Advantages
Mathematically simple and computationally efficient.
Since every pixel is spectrally closer to either one sample
mean or other, so there is no unclassified pixels
Disadvantages
It is insensitive to different degrees of variance in the spectral
response data.
H H H
H Selected from
H H+ H
H H H HH training Sites
H H
H H FF W Water
WW F
F FF F F Forest
WWW +
F F F FF
W +W
W FF F H Hay
W W F FF S Sand
W
WW U Urban
C Corn
Band 4 Digital Number
Unknown pixel 2 would be assigned by the distance-to-mean
classifier to the “sand” category, in spite of the fact that the greater • Unknown Pixels
variability in the “urban” category suggests that “urban” would be + Category Mean
44 a more appropriate class assignment.
Minimum Distance to Means Classifier
Euclidian Spectral Distance
Y
92, 153
Yd = 85-153
Distance = 111.2
180, 85
Xd = 180 -92
X
Parallelepiped Classifier
46
Parallelepiped Classifier Positive Covariance
More variable (Slant upward to the right)
(Lack of Covariance) Highly repeatable
S
U SSS
U U U UU S S
U SS C
U U 2 C CC
U
U U U 1 C C
U U U U U U CC Known Cover Type
U U CC HH Selected from
U U H
H HH
Band 3 Digital Number
H H H training Sites
H
H H H
HHH H H W Water
H H F Forest
H H FF
WW F H Hay
F FF F
WWW S Sand
W W F F F FF
W FF F
U Urban
F F F
W W
W C Corn
WW
Disadvantages
Since parallelepiped has corners, pixels that are actually
quite far, spectrally from the mean of the signature may be
classified or INSENSITITIVE TO COVARIANCE
Regions Overlap
49
Parallelepiped Classifier
Stepped Parallelepipeds
From the training set classes, the method determines the class
centres and the variability in raster values in each input band
for classes.
The probability depends upon the distance from the cell to the
class centre, and the size and shape of the class in the spectral.
After eveluating the probability in each category, the pixel would be assigned to the
most likely class (highest probability value) or be labeled “unknown” if the probability
52 values are all below a threshold set by the analyst.
Equiprobability Contours defined by MLC
Shapes of the
equiprobability
contours expresses the
sensitivity of the
likelihood
classifier to covariance
53
Gaussian Maximum Likelihood Classifier
Advantages
Most accurate of classifiers (if input sample have normal
distribution) because it takes the most variables.
Takes variability of classes into account.
Disadvantages
An extensive equation, takes long time to compute.
It is parametric.
Tends to over classify signatures with relatively large
values in the covariance matrix.
54
Training Stage
The overall objective of the training process is to assemble a
set of statistics that describe the spectral response pattern for
each land cover type to be classified an image.
56
Training Stage
57
Training Stage
Trade off
Sufficient sample size to ensure the accurate
determination of the statistical parameters used by the
classifier
Redundant spectral class
59
Training Set Refinements
patterns
60
Normal
Graphical Representation Distribution
of the Spectral Response
Patterns
Distribution is
Bimodal
Training data set chosen by the analyst
to represent “hay” is composed of 2 subclasses
with slightly different spectral characteristics
the classification accuracy will be improved
if each of the subclasses is treated as a separate Normal
category Distribution
Normal
Figure: Distribution
Sample Histogram for
data points included in Normal
the training areas for Distribution
61 cover type “hay”
Figure:
Coincident Spectral Plots
for training data obtained
in five bands for six cover
types
62
Correlation Between different bands of LISS – II
Poanta Image
Band 3
Band 2
Band 4
Band 1 Band 1 Band 1
Band 4
Band 4
Band 3
64
Band 1 Histogram Band 2 Histogram
65 Band 1
Band 3 Histogram
Band 4 Histogram
Scatter diagram of Band4 and Band 3
66 are less correlated
Band 1 Band 2
Band 3 Band 4
67
Quantitative Expressions of Category Separation
70
Jeffries-Matusita Distance
73
Unsupervised Image Classification
spectral class.
Because they are solely based on the natural groupings in
75
Unsupervised Image Classification
Clustering algorithm
User defined cluster parameters
Class mean vectors are arbitrarily
set by algorithm (iteration 0)
Class allocation of feature vectors
Compute new class mean vectors
Class allocation (iteration 2)
Re-compute class mean vectors
Iterations continue until convergence
threshold has been reached
Final class allocation
Cluster statistics reporting
76
Clustering
“K- mean” Clustering (How it works?)
K-means accepts from the analyst the number of clusters to be
located in the data. The algorithm then arbitrarily “seed,” or
locates, that the number of cluster centers in the
multidimensional measurement space. Each pixel in the image is
then assigned to the cluster whose arbitrary mean vector is closet.
After all pixels have been classified in this manner, revised mean
vectors for each of the clusters in the image data. The procedure
continues until there is no significant change in the location of
class mean vectors between successive iterations of the algorithm.
Once this point is reached, the analyst determines the land cover
78
identity of each spectral class.
Unsupervised Classification: K- means
• A large number of clustering algorithms exist
• K-means
– input number of clusters desired
80
A typical example of the k-means convergence to a local minimum. In this example, the
result of k-means clustering (the right figure) contradicts the obvious cluster structure of the
data set. The small circles are the data points, the four ray stars are the centroids (means).
The initial configuration is on the left figure. The algorithm converges after five iterations
presented on the figures, from the left to the right.
81
Iteration 3 Iteration 4 Iteration 5
ISODATA Clustering
DN DN
B2 B2
DN DN
B1 All pixels B1
assigned to a or SD of cluster a
b - update stats too large? Split a into 2,
recalculate.
Repeat….
New positions of New positions of
cluster means cluster means
DN DN
B2 B2
85
Example ISODATA
Band 2
Band 2
Band 2
Band 1 Band 1 Band 1