Image Classification Methods in Remote Sensing
Image Classification Methods in Remote Sensing
************
FACULTY OF SCIENCES
************
FIELD: SCIENCES AND TECHNOLOGIES
************
GEOSCIENCES
*********
MASTER
*********
LEVEL M1/ S7
TELEDECTION
METHODS OF IMAGE CLASSIFICATION
Required by:
Doctor Tsiorisoa HAREMPAHASOAVANA
As part of the module entitled:
Remote sensing
1. INTRODUCTION
4. RESUME.22
1. INTRODUCTION
For example, if you want to know where all the urban areas are located.
image
a) it will take a lot of time, even for an experienced image analyst,
to examine an entire image and determine which pixels are 'urban' and
which are not, and
b) the map of urban areas that results will necessarily be somewhat
somewhat subjective, as it is based on the individual analyst's interpretation of
what 'urban' means and how it is likely to appear on
the image.
1
In the pixel classification category, two approaches
different ones are available:
2
Figure 1-Composite in true colors showing a part of a Landsat image of California. An area
Urban area with murky water is visible in the upper right corner, bordered by a mix of areas.
of vegetation and barren areas and a lake with clear water. A largely mountainous area
The wooded area is visible in the lower left part of the image, with some light areas near the
center left. By Anders Knudby,CC BY 4.0, based on a Landsat 5 image (USGS).
In figure 02, such a data set has been provided in the form of three
polygons :
3
Figure 2-The same image as in Figure01, with three overlapping polygons. The red polygon
represents an area known by the image analyst as 'urban', the blue polygon is
"water", and the green polygon is "vegetation". By Anders Knudby,CC BY 4.0.
Note:
Note that the example in figure 02 is not a good practice example—
It is better to have more numerous and smaller polygons for each.
class, distributed across the entire image, as it allows polygons to
cover only the pixels of the desired class, and also to integrate the variations
spatial, for example, the density of vegetation, the quality of water, etc.
Basically, the polygons tell the computer, 'look at the pixels under the polygon.'
red - this is what 'urban' pixels look like, and the computer can
So find all the other pixels in the image that also look like this, and the
label 'urban'. And so on for the other classes.
4
However, some pixels may resemble a bit like 'urban' and
a bit like 'vegetation', we need to find a mathematical way to
determine which class each pixel resembles the most. We need
of a classification algorithm.
If we take all the values of all the pixels from bands 3 and 4 of Landsat
and if we show them on a scatter plot, we get something like
Figure 03. This image has a radiometric resolution of 8 bits, so the
the values of each band theoretically range from 0 to 255, we observe that
the smallest values of the image are greater than 0. The values of band 3
are represented on the x-axis, and those of band 4 on the y-axis.
Figure 3-Scatter
plot showing all pixel values in bands 3 and 4 for the image
Figure01. Point cloud created using ENVI software. By Anders Knudby,CC BY 4.0.
Now, if we color all the points that come from the pixels
under the red polygon (that is to say the pixels that we "know" to be
"Urbains"), and that we do the same with the pixels under the polygons
blues and greens, we get something like figure 04.
There are a few important elements to note in figure 04:
All the blue points ('Water') are located in the bottom corner.
left of the figure, under the yellow circle, with low values in band 3
and low values in band 4. This is indeed typical of water, as water
absorbs very efficiently the incoming radiation in the wavelengths of
red (band 3) and near infrared (band 4), so that very few are
reflect to be detected by the sensor.
5
The green points ('vegetation') form a long area on the side.
left of the figure, with low values in band 3 and values
moderate to high in the 4 band. Again, this seems reasonable, as the
vegetation effectively absorbs incoming radiation in the red band (in
using it for photosynthesis) while reflecting incoming radiation
in the near-infrared band.
The red points (“Urbain”) form a larger area near the
center of the figure, and cover a much wider range of values than
the other two classes. If their values are similar to those of "Vegetation"
In band 4, they are generally higher than in band 3.
Figure 4-Like
Figure 03, but with each point colored by the polygon under which it is located.
Point cloud created using ENVI software. By Anders Knudby,CC BY 4.0.
6
Note:
The classification algorithm can use all the bands of the Landsat image,
as well as any other information we provide for the whole of
the image (like a digital elevation model), but as it is easier
to continue to represent this image in two dimensions using
only bands 3 and 4, we will continue to do it. Keep in mind
that the point cloud is actually a graph in n dimensions, where n is equal
in the number of bands (and other data layers) that we want to use
in the classification.
Table 1-Theaverage values in bands 3 and 4 for the classes "Urban", "Vegetation" and
"Water" is presented in Figure 06
7
Let's say that a pixel indicated by the yellow point in figure05 has a value
of 55 in band 3, and of 61 in band 4.
We can then calculate the Euclidean distance between this point and the value
average of each class:
Distance to the average red: (100-55)2+(105-61)2= 62.9
Distance to the green average: (40-55)2+(135-61)2= 75.5
Distance to the blue average: (35-55)2+(20-61)2= 45.6
Minimal will affect this particular point in the class 'blue'.
Figure 5-The minimum distance classifier assigns the class whose center is the closest.
close (in the feature space) to each pixel. The average value of all
red points, in bands 3 and 4, are indicated by the large red dot, as well as for
the green and blue points. The yellow point indicates a pixel that we want to assign to one
of the three classes. Scatter plot created using ENVI software. By Anders
Knudby,CC BY 4.0.
8
Although the minimum distance classifier is very simple and fast
And although it often gives good results, this example illustrates a weakness.
important:
In our example, the distribution of values for the class "Water" is very
weak—water is generally always dark and blue-green, and even murky water
Water containing a lot of algae always looks dark and blue-green.
The distribution of values for the class 'Vegetation' is much more
important, especially in band 4, because some vegetation is dense
and others are not, some vegetation is healthy and others are not
no, some vegetation can be mixed with dark soils, some
clear skies, or even urban elements like a road. The same goes for
for the class 'urban', which shows a wide distribution of values in the
bands 3 and 4.
In reality, the yellow point in figure 05 is probably not water, because water
Someone with such high values in bands 3 and 4 does not exist. It is much
more likely that it is an unusual type of vegetation, an urban area
unusual or (more likely) a mixture of these two classes.
9
Instead of calculating the distance to the center of each class (in the space of
characteristics) and thus find the closest class, we will calculate
the probability that the pixel belongs to each class, and thus find
the most likely class.
10
In figure 06, the x-axis represents the values in an image band, and
The y-axis shows the number of pixels in each class that has a value
data in this strip.
In figure 06, the two classes have the same standard deviation (the 'bells' have the
even 'width'), and because the point is located a little closer to the average
for class B than for class A, his z score would be the lowest for class B
and he would be assigned to this class.
11
The standard deviations of band 4 (x-axis) and band 3 (y-axis) are
represented as contours of equiprobability.
For example, see that the boundaries of classes A and B overlap, and that
the standard deviations of class A are greater than those of class B.
consequently, the red point is closer (in the feature space)
from the center of class B than from the center of class A.
The minimum distance classifier would classify this point into 'Class B'
the basis of the shortest Euclidean distance, while the classifier of
maximum likelihood would classify it in the 'class A' due to its higher
high probability of belonging to this class (according to the assumptions used).
13
A small illustration: let's say we have 7 data points (you do not
you should never have only seven data points when you calibrate a
classifier, this small number is used only for illustration purposes!)
14
As we can see, this leaves us with a single point " A " in a
node (X), and two points 'A' and four points 'B' in the other node (Y).
To see if we can do better, we can try using the value
12 instead of 11 (which gives us the same result), 13 (still the same),
and so on, and when we tested all the values of band 1,
we continue with all the values of band 2.
Table 4Points cracked according to the threshold value of 31 in band 1. By Anders Knudby,CC BY
4.0.
It’s almost perfect, except that we have only one ' B ' in node X. But
Well, it's pretty good for a first share.
Figure 8-The 'tree-like' structure that emerges from the division of data on value
threshold 31 in band 1. Each set of data points is called a node. The
"root node" contains all data points. The "leaf nodes", also
called "end nodes", are the endpoints. By Anders Knudby,CC BY 4.0.
15
The node with data points 5, 6, and 7 (which all have bandwidth values
1 greater than 31) is now what is called a "pure node"—it is
composed of data points from a single class, we no longer have
need to divide it.
The nodes that are terminal points are also called "leaves".
node with data points 1, 2, 3, and 4 is not "pure" because it contains a
mix of class A and class B points.
We are therefore starting to test all the different possible values that
we can use as a threshold to split this node (and only this node),
in both bands.
The point of class B in this node has a value within the band.
2 which is higher than all other points, hence a separation value
The 45 works well, and we can update the tree like this:
Figure 9-The final 'tree-like' structure. All the nodes (final parts of the set)
Data) are now pure. By Anders Knudby,CC BY 4.0.
16
Once the "tree" is in place, we can now take all
the other pixels of the image and make them "fall" into the tree to see in
which leaf they land on.
17
3. UNSUPERVISED CLASSIFICATION BY PIXEL
18
Figure 10-Classification K-Means step 1. A certain number of "initial points" (points
colored) are randomly distributed in the feature space. The gray points
represent the pixels to be grouped here. Modified fromK Means Example Step 1by
[Link], Wikimedia Commons,CC BY-SA
Figure 11-A cluster is formed around each seed by assigning all the points to the
closest seed. Modified fromK Means Example Step 2by [Link]
Wikimedia CommonsCC BY-SA 3.0.
Figure 12-The seeds are moved towards the centroid of each cluster. The centroid is
calculated as the geographic center of each cluster, that is to say it is located at the
average x value of all points in the cluster, and to the average y value of all the
cluster points. Modified fromK Means Example Step 3by [Link],
Wikimedia Commons,CC BY-SA 3.0.
19
d) Repeat steps "b" and "c" until the stopping criterion.
The stopping criterion can be that no point moves to another cluster.
or that the centroid of each cluster moves by less than a distance
prespecified, or that a certain number of iterations have been completed.
For example, the image below shows the original image in the background, and
the central pixels colored according to the product of an unsupervised classification. It
it is clear that the 'blue' zone corresponds to the pixels covered by water, and that the
The green zone largely corresponds to the vegetation. A more detailed analysis
The image would be necessary to label each area, especially the areas
reds and grays, appropriately.
20
Figure 13-Example of correspondence between the original image and the clusters formed in a
unsupervised classification process. By Anders Knudby,CC BY 4.0.
This is where a technique called object-based image analysis comes into play.
Object-Based Image Analysis (OBIA), which takes into account the context
when it generates image classifications. This advantage often allows it
to surpass more traditional methods of classification, pixel by pixel.
21
4. RESUME
a. Supervised classification
Use homogeneous and representative samples (training areas) of
different types of surfaces (the polygons of figure 02).
The selection of these areas is based on knowledge and familiarity of
the analyst with the studied regions.
Then, a specific software is used to define classes corresponding to
to the training zones according to the digital information for each pixel.
A special program (algorithm) determines the numerical properties of
each of the classes.
Finally, these classes are applied to the entire studied area according to their
similar properties.
The training areas must be as homogeneous as possible.
Field verification must be carried out on the day of the satellite pass.
22
b. Unsupervised classification
Based solely on the digital information, no class is established at
The analyst simply specifies the desired number of classes. Then according to an algorithm
specifically, an automatic classification process groups individuals who
have similar properties to define what are called spectral classes.
The latter are then associated with useful classes corresponding to the
real objects on site.
If the classification is not satisfactory, the analyst may need to reapply.
the classification algorithm by changing the number of classes in order to
to combine or further separate spectral classes.
23