COMP5111 W06 Imagetransforms
COMP5111 W06 Imagetransforms
1
Image Transforms
6.1 Introduction
6.2 Arithmetic Operations
6.3 Empirically Based Image Transforms
6.4 Principal Components Analysis
6.5 Hue-Saturation-Intensity (HSI) Transform
2
Introduction
3
6.1 Introduction
5
Section 6.4 “Principle Components Analysis” provides an introduction to the
widely used technique of principal components analysis (PCA), which is a method
of re-expressing the information content of a multispectral set of m images in
terms of a set of m principal components, which have two particular properties:
zero correlation between the m principal components, and maximum variance.
6
6.2 Arithmetic Operations
The operations of addition, subtraction, multiplication and division are performed
on two or more coregistered images of the same geographical area (Section 4.3).
These images may be separate spectral bands from a single multispectral data set
or they may be individual bands from image data sets that have been collected at
different dates.
Addition of images is really a form of averaging for, if the dynamic range of the
output image is to be kept equal to that of the input images, rescaling is needed.
Averaging can be carried out on multiple images of the same area in order to
reduce the noise component.
7
Multiplication of images is rather different from the other arithmetic operations for
it normally involves the use of a single ‘real’ image and a binary image made up of
ones and zeros. The binary image is used as a mask, for those image pixels in the
real image that are multiplied by zero also become zero, while those that are
multiplied by one remain the same.
8
6.2.1 Image Addition
If multiple, coregistered, images of a given region are available for the same time
and date of imaging then addition (averaging) of the multiple images can be used
as a means of reducing the overall noise contribution.
where G(x, y) is the recorded image, F(x,y) the true image and N(x,y) the random
noise component.
Therefore, addition of two separate images of the same area taken at the same
time might be expected to lead to the cancellation of the N(x,y) term for, at any
particular pixel position (x,y), the value N(x,y) is as likely to be positive as to be
negative. 9
Image addition, as noted already, is really an averaging process.
If two images G1(i,j) and G2(i,j) are added and if each has a dynamic range of
0–255 then the resulting image Gsum(i, j) will have a dynamic range of 0–510.
This is not a practicable proposition if the image display system has a fixed, 8-bit,
resolution.
Hence it is common practice to divide the sum of the two images by two to reduce
the dynamic range to 0–255.
10
6.2.2 Image Subtraction
The subtraction operation is often carried out on a pair of co-registered images of
the same area taken at different times. The purpose is to assess the degree of
change that has taken place between the dates of imaging.
The problem of scaling the result of the image subtraction operation onto a 0–255
range must be considered.
11
Formally, the image subtraction process can be written as:
If interest is centred on the magnitude rather than the direction of change then the
following method could be used:
The vertical bars |.| denote the absolute value (regardless of sign).
12
A difference image Gdiff(i,j) tends to have a histogram that is Normal (Gaussian) in
shape with the peak at a count of 127, tailing off rapidly in both directions. The
peak at a count of 127 represents pixels that have not changed while the pixels in
the histogram tails have changed substantially.
The image Gabsdiff(i,j) has a histogram with a peak at or near 0 and a long tail
extending towards the higher values.
13
Figures 6.2a, b show respectively the TM band 4, 3, 2 false-colour composite for
1984 and the ETM+ band 4, 3, 2 false-colour composite for 1993.
The bright areas of the false-colour composite images are desert while the red
areas are vegetation.
14
(a) 1984 (b) 1993
Figure 6.2
(a) Landsat TM false colour composite (bands
4, 3 and 2) of a (1984) sub-image of
Alexandria, Egypt, after a linear contrast
stretch.
(b) Corresponding ETM+ image for 1993.
(c) Density sliced difference image based on
band 2 images.
(d) Colour wedge for difference image.
(c) 15
(d)
Areas of red in Figure 6.2c are those where the 1984 band 2 pixel values are lower
than the corresponding pixel values in the 1993 image.
These negative change areas represent vegetation present in 1993 but not in 1984
at the bottom of the difference image, and also a change from brackish lagoon to
deeper clearer water in the top left corner of the same image.
Areas of brown, dark green, light green and blue show least change (the areas
have remained desert over the period 1984–1993).
But yellow areas are those where the pixel values in band 2 for 1993 are greater
than those for 1984. These scattered yellow areas are located in the area covered
by vegetation in 1984 and may represent ploughed fields or land that has been
allowed to revert to desert.
16
17
6.2.3 Image Multiplication
18
Figure 6.3
Illustrating of image
multiplication in
creating a land/sea
mask that enables to
represent variations in
green light
penetration depth in a
region of the
(a) (b)
Tanzanian coast, south
of Dar-es Salaam.
(a) Landsat MSS
Band 4 (green),
(b) Landsat MSS
Band 7 (NIR),
(c) Land/sea mask
created from NIR
(d) Masked and
density sliced green
band (a).
(c) (d) 19
Figure 6.3a shows a Landsat-2 MSS band 4 (green) image of part of the Tanzanian
coast south of Dares-Salaam.
Variations in reflectance over the land area distract the eye from the more subtle
variations in the radiance upwelling from the upper layers of the ocean. The
masking operation can eliminate variations over the distracting land region.
The first step is the preparation of the mask that best separates land and water,
using the NIR band (Figure 6.3b) since reflection from water bodies in the NIR
spectral band is very low, while reflection from vegetated land areas is high.
A suitable threshold is chosen by visual inspection of the image histogram of the
NIR pixel values.
A binary mask image is then generated from the NIR image by labelling with ‘0’
those pixels that have values above the threshold (Figure 6.3c). Pixels whose values
are below the threshold are labelled ‘1’, so the mask image displays as a black-and-
white image with the masked area appearing white.
20
The second stage is the multiplication of the image shown in Figure 6.3a and the
mask image (Figure 6.3c).
Multiplication by ‘1’ is equivalent to doing nothing, whereas multiplication by ‘0’
sets the corresponding pixel in the masked image to 0.
Using the above procedure, the pixels in the Tanzanian coast band 4 image that
represent land are replaced by zero values, while ‘ocean’ pixels are unaltered.
Application of the density slice procedure produces the image shown in Figure 6.3d.
X 1 =
21
6.2.4 Image Division and Vegetation Indices
The process of dividing the pixel values in one image by the corresponding pixel
values in a second image is known as ratioing.
- The second is that undesirable effects on the recorded radiances, such as that
resulting from variable illumination (and consequently changes in apparent
upwelling radiance) caused by variations in topography can be reduced.
22
Figure 6.4
The ratio of a pixel value at near-infrared wavelengths (around 1.0 μm) to the corresponding
pixel value in the red region of the spectrum (0.6–0.7 μm) will be large if the area
represented by the pixel is covered by vigorous vegetation (solid curve).
It will be around 1.0 for a soil pixel, but less than 1.0 for a water pixel.
In effect, the IR/R ratio is measuring the slope of the spectral reflectance curve between
the infrared and red wavelengths. Inspection of the curves shown in this figure shows that
the curve for vegetation has a very significant slope in this region. 23
Figure 6.4 shows the spectral reflectance curves for three cover types.
The differences between the curves can be emphasized by looking at the gradient
or slope between the red and the NIR bands, for example bands 3 (red) and 4
(NIR) in a Landsat ETM+ image.
The shape of the spectral reflectance curve for water shows a decline between
these two points, while that for vegetation shows a substantial increase.
The spectral reflectance curve for soil increases gradually between the two bands.
If a pixel value in the NIR band is divided by the equivalent value in the red band
then the result will be a positive real number that exceeds 1.0 in magnitude (for
vegetation).
The same operation carried out on the curve for water gives a result that is less
than 1.0, while the soil curve gives a value somewhat higher than 1.0.
24
B A
25
Figure 6.5 shows a hypothetical situation in which the irradiance at point B on the
ground surface is only 50% of that at A due to the fact that one side of the slope is
directly illuminated by the Sun.
Subtraction of the values in the two bands at point A gives a result that is double
that which would be achieved at point B even if both points are located on the
same ground-cover type.
However, the ratios of the two bands at A and B are the same because the
topographic effect has been largely cancelled out in this instance.
26
More complex ratios involve sums of and differences between spectral bands.
For example, the Normalized Difference Vegetation Index (NDVI), defined in terms
of the NIR and red (R) bands as:
is preferred to the simple R : NIR ratio by many workers because the ratio value is
not affected by the absolute pixel values in the NIR and R bands.
27
Figure 6.6b - d show the NDVI and NIR/R images for the (false colour) image of the
Nottingham area (Figure 6.6a).
On the basis of visual evidence, the difference between the simple ratio (NIR/R)
and the NDVI is not great.
However, the fact that sums and differences of bands are used in the NDVI rather
than absolute values may make the NDVI more appropriate for use in studies
where comparisons over time for a single area are involved, since the NDVI
might be expected to be influenced to a lesser extent by variations in atmospheric
conditions.
28
(a) (b) (c)
Figure 6.6
(d) (e)29
A class of indices called soil adjusted vegetation indices (SAVIs) has been developed
30
Vegetation indices are
powerful tools in remote
sensing, offering insights into
vegetation health, density, and
distribution.
Here's an infographic
comparing the main indices —
NDVI, EVI and the SAVI.
31
6.3 Empirically Based Image Transforms
Experience gained during the 1970s with the use of Landsat MSS data (4-bands) for
identifying agricultural crops showed that
(i) agricultural crops occupy a definable region of the 4-dimensional space based
on the Landsat MSS bands and
(ii) within this 4-dimensional space the region occupied by pixels that could be
labelled as ‘soil’ is a narrow, elongated ellipsoid.
Pair-wise plots of Landsat MSS bands fail to reveal these structures fully.
Two empirical transformations were used to give a more clear view of this
structure:
- Perpendicular vegetation index (PVI)
- Tasselled Cap (Kauth – Thomas) Transformation
32
6.3.1 Perpendicular Vegetation Index
A plot of radiance measured in the visible red band against radiance in the NIR for a
partly vegetated area will result in a plot that looks something like Figure 6.7.
Bare soil pixels lie along the line S1–S2. Vegetation pixels will lie below and to the
right of the soil line.
The perpendicular distance to the soil line (so called the perpendicular vegetation
index) was suggested by Richardson and Wiegand (1977).
Figure 6.7
The ‘soil line’ S1–S2 joins the position of the
expected red and NIR reflectance for wet soils
(S1) with that for dry soils (S2). Vigorous
vegetation shows high reflectance in the NIR
(horizontal axis) and low reflectance at visible
red wavelengths.
where
MSS5 : MSS band-5 (visible red) value,
MSS6 : MSS band-6 (NIR) value,
MSS7 : MSS band-7 (NIR) value.
34
35
6.3.2 Tasselled Cap (Kauth–Thomas)
Transformation
The PVI uses spectral variations in 2 of the 4 Landsat MSS bands, and relates
distance from a soil line in the 2-dimensional space defined by these two bands.
Kauth and Thomas (1976) use a similar idea except their model uses all 4 Landsat
MSS bands. Their procedure has subsequently been extended to higher-
dimensional data such as that collected by the Landsat TM and ETM+ instruments.
36
In the 4-dimensional feature space defined by the Landsat MSS bands, Kauth and
Thomas (1976) suggest that pixels representing soils fall along an axis that is
oblique with respect to each pair of the four MSS axes.
37
The brightness axis is associated with variations in the soil background
reflectance.
The greenness axis is correlated with variations in the vigour of green vegetation
while the yellowness axis is related to variations in the yellowing of senescent
vegetation.
38
They are statistically uncorrelated, so that they can be represented in the 4-
dimensional space defined by the 4 Landsat MSS bands by 4 orthogonal lines.
However, the yellowness and nonesuch functions have not been widely used and
the Tasselled Cap transformation has often been used to reduce the 4-band MSS
data to 2 functions, brightness and greenness.
39
Landsat 1-3 MSS bands:
The coefficients are simply multiplied by the individual pixel band values.
40
Crist (1983) and Crist and Cicone (1984a, 1984b) extend the Tasselled Cap
transformation to data from the 6 reflective bands of Landsat TM datasets.
Data from the Landsat TM thermal infrared channel (conventionally labelled band 6)
are excluded.
Landsat TM Bands
Brightness = 0.3037 (band 1) + 0.2793 (band 2) + 0.4743 (band 3) + 0.5585 (band 4) + 0.5082 (band 5) + 0.1863 (band 7)
Greenness = −0.2848 (band 1) − 0.2435 (band 2) − 0.5436 (band 3) + 0.7243 (band 4) + 0.0840 (band 5) − 0.1800 (band 7)
Wetness = 0.1509 (band 1) + 0.1973 (band 2) + 0.3279 (band 3) + 0.3406 (band 4) − 0.7112 (band 5) − 0.4572 (band 7)
41
The brightness function is simply a weighted average of the six TM bands,
while greenness is a visible/NIR contrast, with very little contribution from bands
5 and 7.
42
The plane defined by the greenness and brightness functions is termed by Crist
and Cicone (1984a) the ‘plane of vegetation’
while the functions brightness and wetness
define the ‘plane of soils’ (Figure 6.8).
43
Figure 6.9
Brightness = 0.3037 (band 2) + 0.2793 (band 3) + 0.4743 (band 4) + 0.5585 (band 5) + 0.5082 (band 6) + 0.1863 (band 7)
Greenness = −0.2941 (band 2) − 0.243 (band 3) − 0.5424 (band 4) + 0.7276 (band 5) + 0.0713 (band 6) − 0.1608 (band 7)
Wetness = 0.1511 (band 2) + 0.1973 (band 3) + 0.3283 (band 4) + 0.3407 (band 5) − 0.7117 (band 6) − 0.4559 (band 7)
45
6.4 Principal Components Analysis
46
The presence of correlations among the bands of a multispectral image implies
that there is redundancy in the data. Some information is being repeated.
Even if x and y are not perfectly correlated there may be a dominant direction of
scatter or variability, as in Figure 6.10b.
If this dominant direction of variability (AB) is chosen as the major axis then a
second, minor axis (CD) could be drawn at right-angles to it.
47
Figure 6.10
(a) Plot of two variables, x and y, which are perfectly correlated (r =1.0). The (x, y) points lie
on a straight line between A and B. Although this is a two-dimensional plot, all the points lie
on a one-dimensional line. One dimension is therefore redundant.
(b) In contrast to the plot shown in (a), this distribution of (x, y) points does not lie along a
single straight line between A and B. There is some scatter in a second, orthogonal, direction
CD. The distance relationships between the points would be the same if we used AB as the
x-axis and CD as the y-axis, though the numerical coordinates of the points would change.
48
The purpose of principal components analysis is
- to define the number of main dimensions that are present in a data set and
- to specify the positions of that set of axes which point in the directions of
greatest variability (such as axes AB and CD in Figure 6.10b).
49
Figure 6.11
(a) The ellipse is characterized in the two dimensional space defined by variables X and Y by
long axis AB and short axis CD, which define the two orthogonal directions of maximum
scatter.
The circle shows equal scatter in all directions from the centre, so the positions of its axes EF
and GH are purely arbitrary – there is no direction of maximum variance.
In the case of the ellipse, the direction of slope of line AB indicates that there is a strong
positive correlation between the two variables while its shape shows that one variable has a
larger variance than the other. The lack of a preferred orientation of scatter in the case of
the circle indicates a zero correlation with the two variables X and Y having equal variances.
The covariance defines the shape of the ellipse enclosing the scatter of points.
Figure 6.11a shows two distributions.
One (green outline - ellipse) has a high positive covariance while
the other (blue outline - circle) has a covariance of zero.
The mean of each variable gives the location of the centre of the ellipse (or
ellipsoid in a space of dimensionality higher than two).
Thus, the mean vector and the variance-covariance matrix define the location and
shape of the scatter of points in a p-dimensional space.
51
Suppose that we have a 3-band image;
52
y=G.x
G : PCT matrix
Cy = G . Cx . GT
Cx : Covariance matrix of the original image
Cy : Covariance matrix of the PCT image (diagonal)
54
Figure 6.12
(a) False colour composite image (ETM+ bands 4, 3, 2) of the Littleport area of eastern
England. The two parallel lines running up from the lower right corner to the top centre are
drainage channels. Clouds and shadows are apparent mainly in the upper centre of the image.
Fields of growing crops and pasture are coloured red.
(b) Principal components 1–3 of the correlation matrix between the six reflective bands of the
Littleport TM subimage. The red channel shows principal component 1, which appears to
show the negative of brightness as cloud shadow and water appear yellow. The area of land
between the two drainage channels is shown in deep purple, though little detail is present.
(c) Principal components 4–6 of the correlation matrix of the Littleport image. The image is
rather noisy, though not enough to render it unusable.
55
56
6.5 Hue-Saturation-Intensity (HSI)
Transform
It is sometimes useful to convert from RGB colour cube coordinates to HSI
hexcone coordinates, and vice versa.
Saturation is the degree of purity of the colour, and may be considered to be the
amount of white mixed in with the colour. As the amount of white light increases
so the colour becomes more pastel-like.
57
The application of the transform for colour enhancement is straightforward.
The HSI data are then converted back to RGB representation for display purposes.
Figure 6.15b shows an image of part of The Wash coastline of eastern England
after a HSI transformation.
The red colour of the growing crops in the fields is enhanced relative to the linear
contrast stretched version (Figure 6.15a) but some of the detail of the sediment in
the water is lost.
58
Figure 6.15
(a) Landsat TM bands 4, 3, 2 false colour composite of the coastline of The Wash, eastern
England, after a 5–95% linear contrast stretch.
(b) The Wash image after a HSI transform. The saturation and intensity are stretched linearly
and the hue is left unchanged.
59