0% found this document useful (0 votes)
4 views28 pages

Digital Image Processing

Digital image processing involves manipulating and interpreting digital images using computers, which became prominent with the launch of the Landsat satellite in 1972. The document discusses concepts such as digital images, histograms, preprocessing techniques to correct radiometric and geometric errors, and enhancement methods to improve image display for analysis. It emphasizes the importance of understanding various factors affecting image quality and the methods used to rectify and enhance digital images for effective interpretation.

Uploaded by

silbiswas9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views28 pages

Digital Image Processing

Digital image processing involves manipulating and interpreting digital images using computers, which became prominent with the launch of the Landsat satellite in 1972. The document discusses concepts such as digital images, histograms, preprocessing techniques to correct radiometric and geometric errors, and enhancement methods to improve image display for analysis. It emphasizes the importance of understanding various factors affecting image quality and the methods used to rectify and enhance digital images for effective interpretation.

Uploaded by

silbiswas9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DIGITAL IMAGE PROCESSING

Regional Remote Sensing Service Centre


Department of Space, Government of India
CAZRI Campus, JODHPUR
Digital Image Processing

DIGITAL IMAGE PROCESSING


1.0 Digital Image Processing
Digital Image processing is the manipulation and interpretation of digital images
with the aid of computers. It started in 1960 when first airborne multispectral
scanner data and digitized aerial photographs became available for analysis.
With the launch of Landsat satellite in 1972, the digital image data became
widely available for remote sensing applications. Today access to low cost
efficient computers and satellite data has made this technology very popular for
natural resource management. The core idea in digital image processing is to
analyse digital data which is referred as image by computer systems called as
image processing systems. Image processing systems consists of specialized
hardware and software for the analysis and display of digital images.

2.0 Concept of images


Digital image is a regular grid array of equal area picture elements (Pixels)
arranged in a row and column mode. Each pixel has a numerical value called as
digital number (DN). The DN values are related to the parameter which is being
measured. Figure 1 shows one line of image.

Figure 1

Swath
Pixel 1 Pixel n

Reflectance from individual objects makes the digital number. Detectors detect
the incoming radiation from various objects at particular wavelength. Several

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 2


Digital Image Processing

different detectors are needed to cover a wide range of wavelengths. As the


sensor system travels over different land cover types, voltage response from
each detector will vary. For high reflective land, detector response voltage will be
high compared to response from highly absorptive water. These analog voltages
responses are converted to digital numbers by sampling the sensor voltages at
fixed interval. For digital images, lower digital numbers are associated with lower
reflectance from the ground. Figure 2 shows one sample image and its
corresponding digital numbers.

200 230 250

180 40 170

60 30 0

Figure 2a. Simple image

Figure 2b. DN in low spatial resolution

200 170 202 215 250 800 681 808 860 1020

180 120 90 180 167 720 483 360 721 670

97 75 40 170 170 385 301 162 680 683

48 47 52 89 64 192 188 210 356 256

56 40 67 24 0 225 162 270 95 0

2c. High spatial resolution with 8 bit 2d. High spatial resolution with 10 bit

In 8 bit radiometric resolution data is represented in 256 ( 28 = 256) gray levels.


However in 10 bit resolution more gray values can be represented and a better
representation of scene is observed. Digital Numbers are arbitrary units which
area used to indicate variations in radiance.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 3


Digital Image Processing

Digital data have number of advantages over photographic film. Digital data can
be instantaneously transmitted to the ground. Data can be copied repeatedly
without any loss because they are in numerical format.

3.0 Digital image histogram


Histogram is a graphical representation of the brightness values that comprise an
image. Brightness values are displayed on x axis and frequency of occurrence of
each of these is shown on y axis. List of Digital numbers does not convey
impression of distribution but histogram clearly shows the distribution. Although
every scene is unique, a number of generalized histogram forms can be
recognized and a range of statistical measures can be used. Analysis of
histogram gives lots of information about the data. If the histogram is well spread
over the gray level range then the inference about the contrast in the data can be
drawn. Plotting of histograms for a theme pertaining to multi bands can give
information about the spectral separability of the class between bands and
choice of bands to be selected for classification. Two dimensional histogram
results in a scatter diagram plot by which the degree of correlation between can
be found out. Figure 3 shows few such histograms.

Figure 3a is a typical symmetrical histogram where all the values are centered
around a central DN value. This central DN is called as mean which can be
calculated by calculating arithmetic average of all the pixels in the image. Mode
is that digital number which occurs most frequently in any data set. Median of the
dataset is that digital number which is mid way in the frequency distribution. For
a plot as shown in figure 3a, mean, mode and median are equal. Mean itself is
not sufficient to describe how the DNs vary for a symmetrical distribution as
shown in figure 3a and 3b. Data have similar mean but in case of 3b data is
clustered more closely towards mean. A measure of spread or dispersion is
obtained by standard deviation of the data. Variance which is square of standard
deviation is also used for describing data set. Histograms are not always
symmetrical. They are often skewed. For histogram shown in figure 3c, mean,
mode and median will be different. Some times more than one cluster is present
in the data. The resulting histogram will be as shown in 3d. It is called bimodal
distribution. Another parameter which is calculated is correlation. Correlation is
the ratio of covariance of two variables to the product of their standard deviation.
Correlation coefficient varies from –1 to +1. A correlation coefficient of +1
indicates a positive perfect relationship between the brightness values in two
bands of FCC. A correlation coefficient of zero indicates that there is no linear
relationship between two bands.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 4


Digital Image Processing

Fig 3. Different types of Histogram

Mean Mean

(a) (b)

DN DN

Mean

Mean
(c) (d)

DN DN

4.0 Image Preprocessing


Preprocessing of digital data means manipulations performed on the raw data
before any further processing is attempted. This is done to correct for
radiometric, geometric, electronic and mechanical distortions. Radiometric
corrections are related to measured brightness values. Correction involves
manipulation of brightness values to achieve calibration corrections. These are
specific to the nature of distortions. Geometric corrections involves modification
of input geometry by repositioning sample elements of image to achieve desired
geometry.

To correct image data, the internal and external errors must be determined.
Internal errors are due to sensor effects and are systematic i.e. can be predicted
well in advance. External errors are caused by space craft perturbations and
scene characteristics and hence are non systematic or random. The image
errors are classified into radiometric and geometric errors.

4.1 Radiometric errors

Response form similar objects should always be similar but in nature the
radiance measured by any given system over a given object is influenced by
many factors like changes in scene illumination, atmospheric conditions, viewing
geometry and instrument response characteristics. Radiometric errors can be
internal which are caused by detector response or external caused by
atmospheric attenuation and sun elevation.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 5


Digital Image Processing

4.1.1 Detector errors - In remote sensors each detector senses radiance along
one line. Two measure errors viz. line dropouts or de-striping can occur in any
detector. Lines of data which are not recorded are called Line dropouts and
manifest themselves by black lines. Line dropouts can be due to detector errors,
errors in transmitting the image data to a ground receiving station or errors in
processing the image data. Lost data can not be recovered but it is possible to
substitute digital numbers in order to make the image more appealing. It can be
corrected by computing the mean of the pixels above and below each bad pixel.
De-striping is the systematic banding or striping pattern found on images
produced by scanning mirrors. This is usually more evident in dark homogenous
areas. This arises from the variation in response of individual detector used
within bands. Thus a particular detector in a band may give higher or lower
radiance which has to be normalized using neighbourhood operations. If Mk and
Ek are mean and standard deviation of kth detector and M and E are mean and
standard deviation of full image then each point in output image is given by
Yk (i, j) = ( E / Ek) * ( Xk (i, j) – Mk) + M, where Yk (i,j) is output pixel and Xk (i, j)
is input pixel. The relation between I and k is given by I = n ( N – 1) + k, where n
is number of detectors and N is scan number within scene.

4.1.2 Atmospheric attenuation – Atmosphere affects the radiance measured at


any point in two ways. It attenuates or reduces the energy illuminating the ground
surface. It also acts as reflector adding a scattered, extraneous “path radiance” to
the signal detected by a sensor. The composite signal observed at any given
pixel location is given by

Ltot = ρET + Lp
π
where Ltot = Total spectral radiance measured by sensor
ρ = reflectance of the object
E = irradiance of the object
T = transmittance of atmosphere
Lp = path radiance

Scattered path radiance introduces haze in the imagery and reduces image
contrast. Haze compensation procedures which observe the radiance recorded
over target areas of essentially zero reflectance are used. In another technique
IR band data is assumed free of haze due to larger wavelength and any deviation
from this assumption is subtracted from all the bands data.

4.1.3 Sun elevation - Relative positions of sun in various seasons cause effect
on satellite images. The effect of solar change can be seen in figure 4. The sun
elevation correction accounts for the seasonal position of the sun relative to the
earth. Figure 4 Effects of seasonal change on solar elevation angle.

Image data acquired under different solar illumination angles are normalized by
calculating pixel brightness values assuming the sun was at the zenith on each

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 6


Digital Image Processing

date of sensing. Each pixel is divided by the sine of the solar elevation angle for
particular time and location of imaging.

Figure 4. Effect of sun elevation Satellite

Zenith

Summer

Spring/fall

Winter

4.2 Geometric errors

An image produced by satellite sensing may have various distortions which affect
the geometry of digital data. Error caused by mirror scan velocity in scanning
mechanism is an internal geometric error where as external errors are caused by
many factors including large IFOV, scan skew, rotation of earth, spacecraft
velocity, attitude, altitude etc.

4.2.1 Mirror scan velocity – In earlier scanning mechanism it was often found
that the velocity of scanning mirror would not be constant from start to finish of
each scan line. This resulted in systematic distortion along each scan line.

4.2.2 Panoramic distortion – This defect is caused due to finite detector field of
view. The length of ground is actually proportional to the scan angle and
therefore is greater at higher margins of scan lines.

4.2.3 Scan skew – This distortions are caused by the forward motion of the
spacecraft while acquiring the picture. The swath scanned is not normal to the
ground track but is slightly skewed, producing distortion across the scan line.
Known velocity of the satellite is used to restore this distortion.

4.2.4 Earth rotation – The amount of earth rotation during the time required to
scan one frame results in distortion in scan direction that is function of spacecraft
latitude and orbit. The angle through which the image has been shifted is termed
as skew angle θ and is calculated as
Sin (θ) = C ( Sin2i – Sin2 φ) 1/2

The value of θ which ranges from 00 to 40 ( at equator) is used to calculate the


number of zerofills to be inserted at the beginning of the first line and is given by
Ntanθ, where N is total number of lines.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 7


Digital Image Processing

4.2.5 Space craft velocity – This variation causes distortion along track direction
only and is known function of velocity that can be obtained from the tracking of
the data.

4.2.6 Attitude ( Roll, yaw, pitch) – Variations in space-craft attitude ( roll, pitch
and yaw) are caused due to motion of the satellite. These are non-systematic in
nature and can be removed with the help of control points and mathematical
models.
Fig 5. Geometric distortions

Earth rotation Altitude variation Pitch variation

Yaw variation

Spacecraft velocity Roll variation

Scan skew Mirror velocity variation

4.2.7 Image rectification – Image rectification is the procedure for removal of


non-systematic distortions in any image and to make the image planimetrically
accurate. The procedure involves selection of ground control points, selection of
transformation model and resampling technique and georeferensing the data.

[Link] Selection of ground control maps – Ground control points ( GCPs) are
locations which can be identified on image and on a corresponding map
coordinate system. GCPs should be well identifiable, stable in nature and well

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 8


Digital Image Processing

distributed over the study area. Good ground control points will lead to good
georeferenced image.

[Link] Rectification models – A linear model can be developed GCPs on map


and image. While developing linear regression model, a residual error exists
between predicted and actual values. In linear regression, the square of the error
is minimized. Affine transformation models are generally used for digital images
obtained from satellite. Scale, translation, rotation, skew distortation can be
modeled using these models. High order polynomial models are also used which
generally remove panoramic distortions.

[Link] Number of GCPs – Since we are attempting to develop statistical


rectification models a large number of GCPs are desired. Larger the sample size
better will be the model. Number of GCP depend upon terrain, size of image area
and the order of transformation model being used. Statistically the minimum
number of required points are calculated by (( N + 1) * ( N + 2)) / 2 where N is the
order of transformation model. For first order model the minimum points required
are 3, for second order it is 6 and for third order it is 10. But at the same time the
points should be well distributed in the area.

[Link] Image resampling methods – Since the output image will not perfectly
match with input grid, the original image pixels are to be resampled to fill the new
rectified image. The commonly used resampling methods are nearest neighbour,
bilinear interpolation and cubic convolution. In nearest neighbor resampling,
each output pixel is assigned the digital values of the nearest pixel from the
original image. Fig 6 Shows the technique.
Figure 6. Resampling techniques

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 9


Digital Image Processing

produce a jagged looking edges. In


bilinear interpolation the digital value
of each output pixel is weighted
average of the four closest original
digital values. It produces rectified
images which are much smoother
than images produced using nearest
neighbour but the method takes
more time and the digital values are
modified. In cubic convolution
method weighted average of all the
16 nearest pixels is assigned to
c
output pixel.

This method is very fast. It retains


the original values of the pixel but

Cubic convolution takes longer time. Image appears smooth but the original
digital values are lost.

5.0 Image Enhancement

Image enhancement procedures are applied to image data in order to more


effectively display or record the data for subsequent visual interpretation.
Apparent distinction between the features in the scene is increased. There are
various possibilities of enhancing the image. The techniques may be categorized
in point operations or local operations. Point operations modify the value of each
pixel independently. Local operations modify the value of each pixel based on
neighboring brightness value. Enhancement operations are applied to image
after preprocessing of the image. These are broadly classified in three groups.

5.1 Contrast manipulations

It aims in enhancing the contrast in the image. It manipulates the gray levels for
effective display. The methods are gray level thresholding, level slicing and
contrast stretching.

5.1.1 Gray level thresholding - It segments the image in two categories. A


required class gets highlighted by this process.

5.1.2 Contrast stretching – Few individual scenes have a brightness range that
utilizes full sensitivity range of detectors in the satellite. To produce an image
with the optimum contrast ratio, it is important to utilize entire brightness range of
the display medium. Figure 7 shows one such example.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 10


Digital Image Processing

[Link] Linear contrast stretch – It is the simplest stretch. Lower most DN is


stretched to black ( value 0) and uppermost DN value is stretched to white (
value 255). The remaining pixels are distributed linearly between these extremes.
It improves the contrast but both the ends are generally saturated.

[Link] Non-linear contrast stretch – It is also called uniform distribution


stretch or histogram equalization stretch in which the original histogram has been
redistributed to produce uniform population density of pixels along DN axis.
Greatest enhancement is applied to populated range. Ends are saturated in this
case also.

[Link] Special or piecewise stretch – It enhances special features from the


image. It assigns display range to a group of pixels.

Figure 7 : Contrast stretching

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 11


Digital Image Processing

5.1.3 Level slicing – It is a procedure of grouping the DNs into number of


desired classes. All the DNs falling within specified range are displayed as one
output pixel. The slicing is generally done with the help of histogram.

5.2 Spatial feature manipulation

Spatial feature manipulations can be achieved through spatial filtering, edge


enhancement or fourier [Link] has many applications like noise
removal, data enhancement, data extraction, data compression and directional
enhancement. Filtering can be divided in many types
⇒ Spatial and frequency domain
⇒ Low pass, band pass and high pass
⇒ Directional filters
⇒ Smoothing and edge enhancement filters
⇒ Gradient and Laplacian filter

5.2.1 Spatial domain filtering – It is a digital manipulation of reflectance values in


which the transformations depends not only on the gray level of the pixel
concerned but also on the gray levels of the neighbouring pixels. It is a context
dependent operation where a gray value of a pixel is altered according to its
relationship with respect to the gray levels of neighbours. There. It enhances the
spatial frequencies which refers to the roughness of the tonal variations occurring
in an image. High frequency areas are rough. Smooth areas are those of low
frequency, where gray levels vary gradually over a relatively over a large number
of pixels. Spatial frequency is the number of changes in brightness values per
unit distance for any part of the image. Filtering procedure involves moving a
window of a few pixels over each pixel in the image, applying a mathematical
calculation using the pixel values under that window and replacing central pixel
with the new value. Figure 8 shows various frequency components.

Figure 8. Frequency components

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 12


Digital Image Processing

There are various ways of classifying filters. They can be classified based on the
direction in which filter is enhancing the image. They can be classified based on
the image component they highlight.

5.2.2 Frequency domain filtering – It is an indirect method of applying filters.


Transformations like Fourier or Hadamard are used. These help in enhancement,
compression, texture classification, quality assessment etc. Fourier transform
results from the calculation of the amplitude and phase for each possible spatial
frequency in any image. A two dimensional plot known as spectrum, is plotted for
entire area. Lower frequencies are plotted in the center of the spectrum. Spatial
filter can directly be applied to spectrum. Features tending horizontally result in
vertical component and features tending vertically result in horizontal
components. Application of inverse functions generates filtered image.

5.2.3 High pass filter – High pass filters emphasize high frequency details
and de-emphasizes low frequency features. It produces image with narrow
histogram. High frequency features are sharpened and low frequency features
are subdued.

a) High pass filter b) Low pass filter


-1 -1 -1 1 1 1
-1 16 -1 1 2 1
-1 -1 -1 1 1 1

5.2.4 Low pass filters - These are designed to enhance low frequency
details in any image. It smoothens the details in an image and reduces the gray
level range. The strips or noise having high frequency are removed.

5.2.5 Band pass filters - This type of filters enhance only a specified range
of frequency component in the image.

5.2.6 Directional filters – Directional filters are used to enhance specific


linear trends in an image. The weights are given in such a way that the features
along a particular direction in any image gets enhanced. The directional filters
enhance features oriented normal to the direction of filter movement.

-1 0 1 1 1 1
-1 0 1 0 0 0
-1 0 1 -1 -1 -1

5.2.7 Laplacian filters – These filters enhance linear features in all the
directions. Eception applies to the linear features oriented parallel to the filter

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 13


Digital Image Processing

movement which are not enhanced. These are second derivatives. Output is
scalar and only magnitude is given.

-1 0 1
-1 0 1
-1 0 1

5.2.8 Gradiant filters – These filters produce a vector at each point whose
direction gives direction of maximum change and whose magnitude gives
magnitude of maximum change.
Sobel filter Mask y Mask x

-1 -2 -1 -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1

5.3 Multi image manipulation

5.3.1 Band ratioing – Some times the differences in brightness values from
similar surface materials are caused by topographic conditions, shadows or
seasonal changes in sunlight illumination angle and intensity. Ratio images are
enhancement resulting from the division of DN values in one spectral band by the
corresponding DN value in the other band, eliminate the effect of such
environmental conditions. Subtle spectral variations in any image are enhanced
by ratioing. Ratioed image clearly portray the difference in slope of reflectance
curve. Ratio of NIR by red will clearly highlight vegetation. Generally, lower the
correlation between the bands, greater the information content of band ratioed
image.

5.3.2 Principal and canonical component transformations – Extensive


interband correlation is a problem frequently encountered in the analysis of
multispectral image data. Principal component analysis helps in removing the
redundancy in the data set. It compresses the information into fewer number of
bands. Dimensionality of data set is reduced by PCA. The resultant data set is
oriented in the direction of maximum covariance. To carry out PCA,
transformation is applied to set of correlated data. It will result in a set of
uncorrelated data. Figure (a) shows the scatter plot of two band data. Figure (b)
shows the new shifted co-ordinate system and (c) shows the rotated coordinate
system. PC axes are orthogonal to each other.

Eigen values and eigen vectors are calculated for the data set. Information
content of each band can also be computed by following formula.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 14


Digital Image Processing

%p = eigenvalue λp x 100
__________________
p=1Σ eigenvalue λp
n

where %p is the total percent value in each PC, λp is the pth eigenvalue.

Figure 9. Principal component transform


(a) (b) (c)

PC analysis is more useful when no information about the scene is available.


Canonical component transformations are particularly useful when information
about the feature of interest is known. Canonical transformations maximizes the
separability between the classes and minimizes variance within class.

Figure 10. Canonical transformation

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 15


Digital Image Processing

5.3.3 Vegetation components – Vegetation Indices are empirical formulae


designed to emphasise the spectral contrast between the red and near infra-red
regions of the electromagnetic spectrum. Higher the VI value, higher the
probability of good vegetation on the ground. Figure …… shows the reflectance
curves for dead grass, healthy grass and dry soil. The shape of curve for all three
features is different. Most vegetation indices are based on these difference.

In all the vegetation Indices two assumptions are made : first that an algebraic
combination of remotely sensed spectral bands can provide useful information
about vegetation, and second that all bare soil in an image will form a line in
spectral space i.e. soil brightness soil with zero vegetation. Some indices
assume that all isovegetation lines converge at a single point and some keep the
isovegetation line parallel to soil line.

Figure 11. Spectral response from various features

[Link] Perpendicular vegetation Index ( PVI) – PVI is a measure of distance


of a pixel from the soil brightness line.

PVI = 1 / √(( Sr – Vr)2 – ( Sir – Vir)2)

Where S = soil reflection, V = Vegetation reflection in red (r) and Infra red (ir)
bands. The index varies from –1 to +1

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 16


Digital Image Processing

[Link] Normalised Difference Vegetation Index (NDVI) – NDVI is a most


commonly used index. The vegetation line converge and the value ranges from –
1 to +1.
NDVI = (NIR – RED ) / (NIR + RED)

Figure 12. Perpendicular vegetation index

[Link] Difference Vegetation Index (DVI) – It is an index where iso-vegetation


line is parallel to soil line.
DVI = NIR – RED
In all the above indices soil line is assumed to be of single line. But to cater to
changing environmental conditions, low vegetated images certain other indices
are also developed.

[Link] Soil Adjusted Vegetation Index (SAVI) - This index allows for the
isovegetation lines not being parallel and not all converging at a single point.
Adjustment factor (L) is used to give equal vegetation index results for dark and
light soils.
SAVI = (NIR – RED ) / (( NIR + RED + L) * (1 + L))
L is correction factor of 0 for very high vegetal cover and 1 for very low cover.

[Link] Tassled Cap transformation – It was developed by Kauth and Thomas.


It transform the data set in to four new axes viz. soil brightness index (SBI),
green vegetation index (GVI), yellow stuff index (YVI) and Non such Index (NSI).
Nearly 98 % of the variance in bare soil can be explained by SBI. Figure 13
shows the cap concept.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 17


Digital Image Processing

Figure 13. Tessled cap transformation

5.3.4 IHS transforms - IHS transforms are alternative methods of displaying


digital image. Intensity (I) relates to total brightness of a color. Hue (H) refers to
the dominant or average wavelength of light contributing to color and saturation
(S) specifies purity of color relative to gray. Low intensities ( dark) are located
near the apex of cone. Saturation varies from 0 to 1 and intensity varies from 0 to
255.

Advantages of IHS enhancement is the ability to vary each HIS component


independently. IHS technique is sometimes used to merge different resolution
data set. IHS values can be derived from RGB values through transformqation
equations.
I=R+G+B
H = (G – B) / ( I – 3B)
S = ( I – 3B ) / I

Figure 14. Concept of Hue, saturation and intensity

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 18


Digital Image Processing

6 Image Classification
Image classification technique assigns the picture elements into various
categories. It utilizes the pixel by pixel spectral information for automated land-
cover classification. It makes use of multiple images of the same scene, obtained
over various spectral regions as input and produces output.

Image classification is based on statistical decision theory. The decision to


classify a pixel into various classes depends upon statistical calculation. It
extracts the information from the data. Patterns i.e. set of radiance
measurements obtained in various wavelength bands for each pixel are analysed
and image classification is done. In spatial pattern recognition categorization on
image pixels is done based on their spectral properties, whereas in spatial
pattern recognition categorization is done based on pixels relationship with
neighbouring pixels. In temporal pattern recognition multidate data is analysed to
classify a particular category. Classification can be divided in many ways. Some
of them are –

⇒ Supervised and un-supervised classification


⇒ Statistical and syntactic classification
⇒ Parametric and non-parametric classification

6.2 Supervised classification


Supervised classification refers to that classification procedure where the image
analyst supervises the classification procedure by specifying the algorithm,
training site etc. Identification and location of some land cover type is a must
before attempting supervised classification. The steps involved in any
classification procedure are –
1. Appropriate classification scheme
2. Training site selection
3. Extraction of statistics
4. Analysis of training sites
5. Selection of classification algorithm
6. Classification into number of classes
7. Evaluation of classification accuracy

6.2.1 Classification scheme – A well defined classification scheme is


necessary before attempting any classification. The scheme takes into
consideration the resolution of sensor and the difference between information
class and spectral class. Classification scheme should be comparable over
different levels. It can be a resource based or activity based. Classification
scheme should possess following quantities
⇒ It should be capable of applying over large areas
⇒ It should be capable over multidate images.
⇒ It should be capable of adjustment for scale differencing
⇒ System should allow use of sub-categories

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 19


Digital Image Processing

⇒ Accuracy of interpretation for all the categories should be same.

6.2.2 Training site selection – Training sites are small representative areas
identified by analyst for which a developed numerical description is available.
The procedure assembles a set of statistics that describe the spectral response
pattern for each landcover type to be classified.

To yield acceptable classification results, training data must be representative


and complete. All the spectral classes constituting information class must be
adequately represented in the training set statistics. Training sites cane be
marked with a polygon or can be given with a seed point. The number of
training pixels should be theoretically equal to n + 1 where n is number of bands
for statistical calculations. Ideally 10n to 100n number of training samples are
sufficient.

6.2.3 Training site analysis – In training site analysis, refinement of training


sites is done and the spectral separability between classes is determined. Purity
of the data is checked and it is ascertained that the data is normally distributed.
Extraneous pixels are removed from the sites. Training sites are merged or
splitted if the need arise. The training refinement procedure involves the
following –

[Link] Graphical representation – The distribution of training area response


patterns is graphically displayed. Figure shows a histogram for one category in
number of bands.

Figure 15. Histogram in bands 1, 2, 3 and 4 for TM data

Figure clearly explains the spectral response of one category, but to evaluate
spectral separation between different categories coincident spectral plot is used.
This plot illustrate, in each spectral band, the mean spectral response of each
category and the variance of distribution. It shows the overlap between category
response pattern. Figure … shows such plot.

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 20


Digital Image Processing

Figure 16. Coincident spectral plot

[Link] Quantitative expressions – A measure of statistical separation between


category response patterns can be computed for all pairs of classes.
Transformed divergence, a covariance weighted distance between category
means is a measure for separability. Transformed Divergence and Bhattacharya
distance are also used as measure of separability. Table shows the divergence
matrix used to evaluate pairwise training class spectral separability.

Spectral class Water1 Water2 Crop1 Crop2 Hay


Water1 0
Water2 1185 0
Crop1 1997 2000 0
Crop2 1953 1890 860 0
Hay 2000 1839 1410 1123 0

Some times a training set may contain certain atypical values which will disturb
the mean and variance – co-variance matrix. Mahalanobis distance is a measure
which identifies deviant member of the sample. Mahalanobis distance can be
plotted against probability and outlying samples can be identified. The pixels with
high Mahalanobis distance indicate that they are away from mean of training set.

[Link] Self classification of training set data – This is another method of


evaluating spectral separability. Training sites are classified to determine what
percent of training pixels are actually classified as expected. A classification
error matrix known as confusion matrix is calculated which shows omission
(exclusion) and commission (inclusion) errors.

6.2.4 Classifiers - various algorithms exist to assign unknown pixel into


number of classes. The choice of particular classifier or decision rule depends
upon the nature of input data and the desired output. The most commonly used
classifiers are MINDIS, parallelepiped and maximum likelihood.

[Link] MINDIS classifier – It is the simplest classifier. Mean spectral value


in each band for each class is determined. By considering the two channel pixel
values as positional co-ordinates, a pixel of unknown identity may be classified

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 21


Digital Image Processing

by comparing the distance between the value of un-known pixel and each of
category means. Figure shows the MINDIS method of classification.

Figure 17. Minimum distance to mean classifier

This method is mathematically simple and computationally efficient, but it


considers only mean of category. It is in-sensitive to different degrees of variance
in the spectral response data. This classifiers are not used where spectral
classes are close to each other.

[Link] Parallelepiped classifier – This classifier considers variance of each


category and is better than MINDIS. Highest and lowest digital numbers are also
checked and then the pixel is allocated to any category. Figure 18 shows the
algorithm.
Figure 18. Parallelepiped and stepped parallelepiped classifier

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 22


Digital Image Processing

This classifier is also fast but it leaves lot of gap areas. Overlap areas between
various parallelogram is classified as “not sure” areas. To avoid the problem
caused due to high variance a modified method with stepped parallelograms is
used. Figure … shows the classifier.

[Link] Maximum Likelyhood classifier – This classifier evaluates variance and


co-variance also. Distribution of points is assumed to be normal or Gaussian.
When the distribution is normal, mean and covariance can be calculated.
Probability density functions are used for classification. Probability of each pixel
belonging to each category is found out and the pixel is assigned to that class for
which the probability is maximum. Figure shows the equiprobability contours
defined by MXL algorithm.

Figure 19. Maximum likelihood classifier

Another classification approach is the Bayesian classifier which uses a priori


probability or the anticipated likelihood of occurrence for each class in given
scene. Main drawback of MXL is the number of computations required to classify
a scene. The classifier although accurate is very slow in computation.

6.3 Unsupervised classification

Unsupervised classification do not utilize training data as the basis for


classification. It is a process whereby numerical operations are performed that
search for “natural groups” in multispectral space. The area is divided into
number of spectral classes. Analyst then specifies thematic class pertaining to
each spectral class. Clustering algorithm operates in two pass mode. In the first
pass the program reads through the data set and sequentially builds clusters.
There is a mean vector associated with each cluster. In the second pass a

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 23


Digital Image Processing

minimum distance to means algorithm is applied to the whole data set on pixel by
pixel basis, in which each pixel is assigned to one of the mean vectors created in
the first pass. In first pass analyst has to give following information.

1. R – radius in spectral space used to determine when a new cluster should


be formed.
2. C – A spectral space distance parameter used when merging clusters
3. N – The number of pixel to be evaluated between each merging of clusters
4. Cmax – the maximum number of clusters to be identified by the algorithm

After the cluster formations and inclusion of all pixels in clusters mean is
updated. When any pixel distance is greater than R then from already formed
cluster new cluster is formed. This procedure continues.

There are various algorithm for cluster building.

6.3.1 Histogram based classification – This classification relies on the bell


shaped assumption. The procedure first determines peaks within the histogram
through the digital range. Then boundary between each peak is determined.
Entire image is classified based on specified ranges.

6.3.2 Sequential clustering – Sequential clustering is most commonly used


algorithm. Sequentially the pixels are scanned and assigned to nearest spectral
class mean. User specified number of categories are classified. A pixel will be
assigned as new class if it is away from previous class mean. All the pixels will
be scanned from one end to another in one pass. In further passes refinement of
classes will be done to maintain the class mean and variance within specified
limits.

6.3.3 ISODATA clustering – Iterative Self Organising Data Analysis


technique (ISODATA) requires user input in the form of cluster centers. It is just
opposite to sequential clustering where the analysis starts with class 1. All the
seed points are taken as cluster centers. User has to give initial number of
spectral classes. He has to specify maximum number of clusters to be
considered (N), convergence threshold (T) which is the maximum percentage of
pixels whose class values are not allowed to be unchanged between iterations,
maximum number of iterations to be performed (M), minimum number of pixels
allowed in a cluster (P), standard deviation threshold (STDMAX) for splitting the
class, interclass distance (D) below which classes will be lumped and maximum
no of classes (C) to be lumped in an iteration.

6.4 Fuzzy classification

In classifying and labeling remote sensing images, information is currently


represented in one-pixel-one-class method. In practical situations, a pixel may
represent the measurement of cover class mixture, intermediate conditions or

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 24


Digital Image Processing

other complex cover patterns which can not be properly described by a single
class. To improve this fuzzy classifiers are used which allow partial or multiple
membership.
Fuzzy classification allows to break a single pixel in terms of multiple
membership functions of the contributing classes. Separate classification outputs
are generated for each class.

6.5 Neural net classification

Artificial neural networks are biologically inspired. They are composed of


elements that perform in a manner that is analogous to the most elementary
functions of biological neuron. The basic characteristics of neural networks are
learning and generalization. They can learn from experience and modify their
behaviour in response to the environment. Once the network is trained, the
response is somewhat insensitive to minor variations in its input.
Neural network classifiers are algorithms which mimic the computational abilities
of biological systems by using simple, interconnected artificial neurons. These
are organized in two or more layers. Input layer is activated by input image data.
The output layer of neurons represents the output classes to train for and there
are one or two or more hidden layers.
The neural network approach has the advantages that no prior knowledge of the
statistical distribution of an image is needed. Another advantage of using neural
networks is that they can take care of the weighting of evidence from different
sources. Neural network method requires large number of training samples to
train the network. This method may not be robust to features that do not
resemble the training data.

6.6 Knowledge based classification

Knowledge based classification utilizes the ancillary data and knowledge along
with spectral information. It has following steps
⇒ Identifying knowledge and information sources
⇒ Knowledge acquisition
⇒ Knowledge presentation
⇒ Decision making
⇒ Evaluation of results
When the classes are well separable then little is gained by adding knowledge
but when the separability between classes is marginal then adding knowledge is
helpful.

6.7 Classification accuracy assessment

With the advent of more advanced digital techniques, the necessity of performing
an accuracy assessment has received renewed interest. Traditionally the
accuracy of visually classified maps has been accepted as correct without any
confirmation. Many a times digital classification are often compared with visual

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 25


Digital Image Processing

classification assuming that visual classification is 100% accurate. This


assumption is rarely valid and can lead to a rather poor and unfair assessment of
the digital classification.

With regard to classification accuracy of digital data it is necessary to find both


site specific and class accuracy. In non – site accuracy assessment location
accuracy is completely ignored and only total amount of a category is
considered. If all the errors are balanced out then non site specific accuracy will
yield misleading results.

A number of points are checked to assess the accuracy. There are three
approaches for this
⇒ Classification of training sites itself
⇒ Analysis of 25% of training sites which were not used for training the
computer
⇒ Analysis of pixels selected through random sampling
The ideal number of points required to check the classification accuracy are
given by

N = 4[(p)(q)] / E2
Where p is the expected percent accuracy, q = (100 – p) and E = allowable error.
Greater the allowable error, the fewer points that need to be collected to evaluate
the classification accuracy. To add to confidence limit another formula is used
where p is expressed as ratio of number of points correct to total number of
points. For 95% lower confidence limit accuracy is given by

p = p- - [ 1.645 ((p-)( q-)/n) + (50 / n)]

where p- = c/n, q- = 100 – p- and n = sample size

Most common way to represent classification accuracy is in the form of error


matrix. An error matrix is a square array of numbers set out in rows and columns
which express the number of sample units assigned to a particular category
relative to the actual category as verified on the ground. The columns refer to
reference data while rows indicate the classification generated from remote
sensing data. An error matrix is a very effective way to represent accuracy in that
the accuracies of each category are plainly described along with both the errors
of inclusion (commission error) and errors of exclusion (omission errors) present
in the classification.

The error matrix is used to as a starting point for a series of descriptive and
analytical statistical techniques. Simplest descriptive statistics is overall
accuracy which is computed by dividing the total correct (sum of major diagonal)
by the total number of pixels in the error matrix. Overall accuracy for the data
shown above will be (321 / 434 ) 74 %. Individual class accuracy can also be

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 26


Digital Image Processing

checked by error matrix. There are two types of class accuracy. Producer’s
accuracy and user’s accuracy.

A B C D Total
A 65 4 22 24 115
B 6 81 5 8 100
C 0 11 85 19 115
D 4 7 3 90 104
Column 75 103 115 141 434
total
Producer’s A = 65 / 75 = 87% User’s A = 65 / 115 = 57%
accuracy B = 81 / 103 = 79% accuracy B = 81 / 100 = 81%
C = 85 / 115 = 74% C = 85 / 115 74%
D = 90 / 141 = 64% D = 90 / 104 = 87%

Producer’s accuracy is obtained by dividing the correct number of pixels by total


number of pixels in the category as obtained by column total. This gives that how
well a certain area can be classified. In case of user’s accuracy total number of
correct pixels are divided by total number of pixels which got classified in that
category i.e. sum of rows. This measure is indicative of the probability that a pixel
classified on a map actually represents that category on the ground.

There are obvious advantages of considering overall, producer and user


accuracies. For category A the overall accuracy is 74% but producer accuracy is
87%. We will feel happy but the user’s accuracy is only 57% meaning that
producer can claim that 87% of the time an area that was category A was
identified but only 57% of the time will an area he visits that the map says is
category A will actually be category A.
Another multivariate technique used in accuracy assessment is the use of
KAPPA. The result of KAPPA analysis is a KHAT statistics. KHAT is given by

r r
Khat = N Σ xii - Σ( xi+ * x+i)
i=1 i=1
_________________
r
N - Σ ( xi+ * x+i)
2

i=1

where r is number of rows in the matrix, xii is number of observations in a row I


and column j, xi+ * x+I is the marginal total of row I and column I and N is total
number of observations.
KHAT for the error matrix can be calculated as

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 27


Digital Image Processing

Σ xii = 65 + 81 + 85 + 90 = 231
r
Σ( xi+ * x+i) = (115 * 75) + (100 * 103) + (115 * 115) + (104 * 141) = 46814
i=1
KHAT = 434 ( 231) – 46814
________________ = 0.37
(434)(434) – 46814

Overall accuracy only includes the data along major diagonal but KHAT includes
off diagonal elements also. Usually both the measures are computed to analyse
the accuracy.

References
ƒ Manual of Remote Sensing, Vol I and II
ƒ Introductory Digital Image Processing by John R Jensen
ƒ Introduction to environmental remote sensing by Barrett and Curtis
ƒ Remote Sensing and image interpretation by Thomas M Lillesand, Ralph W
Keifer
ƒ Remote Sensing – Principals and interpretation by Floyd F Sabins
ƒ Remote Sensing, Digital Image Processing – An introduction by John A
Richards

R V Bothale, RRSSC Jodhpur (Lecture at Winter School, 2007, IARI) 28

You might also like