0% found this document useful (0 votes)
20 views44 pages

Unit 5

Uploaded by

Hamza khan q
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)
20 views44 pages

Unit 5

Uploaded by

Hamza khan q
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
You are on page 1/ 44

5/18/2022

Digital Image Processing


Minakshi Kumar

What is an Image ?
IMAGE - Pictorial Representation of an object or a scene.

Forms of Images –
 Analog
 Digital

Analog Images
 Produced by photographic sensors on paper based
media or transparent media
 Variations in scene characteristics are represented as
variations in brightness ( gray shades)
 Objects reflecting more energy appear brighter on the
image and objects reflecting less energy appear darker.

1
5/18/2022

DIGITAL IMAGE
Produced by Electro optical Sensors
 Composed of tiny equal areas, or picture elements
abbreviated as pixels or pels arranged in a rectangular
array
 With each pixel is associated a number known as
Digital Number ( DN) or Brightness value (BV) or gray
level which is a record of variation in radiant energy in
discrete form.
 An object reflecting more energy records a higher
number for itself on the digital image and vice versa.

Multi Spectral Remotely Sensed Image

Digital Images of an area captured in different


spectral ranges (bands) by sensors onboard a
remote sensing satellite.

Band 1 Band 2 Band 3 Band 4


0.45 - 0.52 m 0.52 – 0.59 m 0.62- 0.68 m 0.77 – 0.86 m

2
5/18/2022

DIGITAL IMAGE DATA FORMATS

Formats in which image data is stored :


Band Sequential (BSQ)
Band Interleave by line (BIL)
Band Interleave by pixel (BIP)

Each of these formats is usually preceded on the by


"header" and/or "trailer" information, which consists
of ancillary data about the date, altitude of the
sensor, attitude, sun angle, and so on.
Such information is useful when geometrically or
radiometrically correcting the data.

CSSTE-AP SHORT COURSE 28 August, 2000 5

Band Sequential Format


• Data for a
single band for
entire scene is
written as one
file
• That is for
each band
there is
separate file

Digital Image Processing Minakshi,PRSD,IIRS 6

3
5/18/2022

BAND INTERLEAVE BY LINE


• Data for all the(BIL)
bands are written
as line by line on
the same file.
That is
line1, band 1, line 1
band 2, line1 band
3, line2, band 1,
line 2 band 2,
line2 band 3 ,
line3, band 1, line
3 band 2, line3
band 3 etc.

Digital Image Minakshi,PRSD,IIRS 7


Processing

BAND INTERLEAVE BY
PIXEL
• data for the pixels in
all bands are written
together.
That is
pixel1 band1 pixel1 band2
pixel1 band3 pixel2 band1
pixel2 band2 pixel 2 band3
pixel3 band1 pixel3 band2
pixel3 band3

Digital Image Processing Minakshi,PRSD,IIRS 8

4
5/18/2022

GeoTiff
• "The GeoTIFF spec defines a set of
TIFF (Tagged Image File Format)
tags provided to describe all
’Cartographic’ information associated
with TIFF imagery that originates
from satellite imaging systems,
scanned aerial photography, scanned
maps, digital elevation models, or as a
result of geographic analysis" (Ritter
and Ruth 1999).
Digital Image Minakshi,PRSD,IIRS 9
Processing

Different Data Formats


Most of the recent satellite data
(Worldview, QuickBird, IKONOS,
CARTOSAT Data supplied in GeoTiff
format
NDC supplies
IRS LISS-I,II,III,IV data in LGSOWG
(superstructure) / Fast format
 Stereo data of CARTOSAT 1 is in
GEOTIFF format

Digital Image Minakshi,PRSD,IIRS 10


Processing

5
5/18/2022

iirs

Superstructure Format
Data from NDC is in Superstructure Format Volume Directory
• PRODUCT1 Folder,
• CDINFO.txt
File Descriptor Record

LOGICAL VOLUME Leader File


VOLUME DIRECTORY FILE
File Descriptor Record
LEADER FILE
Image File
IMAGE FILE
TRAILER FILE File Descriptor Record

NULL VOLUME DIRECTORY Trailer File


FILE
Null Volume Directory

Digital Image Processing Minakshi,PRSD,IIRS 11

Digital Image Processing


Digital image processing can be defined as the
computer manipulation of digital values contained in
an image for the purposes of image correction, image
enhancement and feature extraction.

A digital image processing system consists of computer


Hardware and Image processing software necessary to
analyze digital image data.

Image Processing
system

Hardware Software

6
5/18/2022

DIGITAL IMAGE PROCESSING


• Data Acquisition/Restoration
{Compensates for data errors, noise and geometric
distortions introduced in the images during acquisitioning and
recording}

 Image Enhancement
{Alters the visual impact of the image on the interpreter
to improve the information content}

 Information Extraction
{Utilizes the decision making capability of computers to
recognize and classify pixels on the basis of their signatures}
Others
Data merging and GIS integration, Hyperspectral image analysis
Image transmission and compression

DIGITAL IMAGE PROCESSING Digital Data

Initial Statistics
Initial Display of Image
Extraction

Image Rectification & Restoration

Image Enhancement
Visual Analysis

Image Classification
Ancillary Data

Unsupervised Supervised

Classified output

Post-processing operations

Data merging

Assessment of Accuracy

Maps and Images Report Data


Flowchart of Digital Image Processing Sequence

7
5/18/2022

Image Display
COLOR COMPOSITIES
High spectral resolution is important when
producing color components. While displaying the
different bands of a multispectral data set, the images
obtained in different bands are displayed in different
image planes (other than their own) the color composite
is regarded as False Color Composite (FCC) .
TRUE COLOUR COMPOSITE

Red Green Blue BANDS

Red Green Blue FRAME BUFFER MEMORY

Digital Image Minakshi,PRSD,IIRS 15


Processing

TRUE COLOUR COMPOSITE

8
5/18/2022

STANDARD FALSE COLOUR COMPOSTE (FCC)


Screen Colour Gun
Green Assignments
Blue Gun

Red Green Gun

Infrared Red Gun

In this healthy vegetation shows up in shades of red because vegetation


absorbs most of green and red energy but reflects approximately half of
incidence Infrared energy. Urban areas reflect equal problem of NIR, R &
G, and therefore they appear as steel grey.
Digital Image Minakshi,PRSD,IIRS 17
Processing

iirs
Major Commercial Free & Open Source
Digital Image Processing  ILWIS
Softwares (http://www.ilwis.org/index.htm)
 Opticks
• ERDAS IMAGINE http://opticks.org/confluence/
• ENVI display/opticks/Welcome+To+O
pticks
• IDRISI  GRASS (Geographic
Resources Analysis Support
• ER Mapper System
http://grass.osgeo.org/ )
• PCI Geomatica  OSSIM
• eCognition (Open Source Software Image
Map www.ossim.org )
• MATLAB Multispec
https://engineering.purdue.edu/
• Intergraph ~biehl/MultiSpec/index.html

Digital Image Processing Minakshi,PRSD,IIRS 18

9
5/18/2022

iirs
Basic Image Statistics
• Graphical • Univariate Statistics
Representation of
– Dispersion
Image data • Range
– Histogram • Standard Deviation
– Ogive • Variance

• Univariate
Statistics • Multivariate Statistics
– Central tendency – Covariance
• Mean – Correlation
• Median
• Mode

Digital Image Processing Minakshi,PRSD,IIRS 19

iirs
The Histogram
87 – 91
Histogram
92 - 96
97-101
Frequency or occurence

40
102-106
35
107-111
or population

30
25 112-116
20 117-121
15 122-126
10 127-131
5 132-136
0 137-141
f 142-146
147-151
Digital Numbers Range
152-156

10
5/18/2022

iirs
The Polygon
87 – 91
Histogram
92 - 96
97-101
Frequency or occurence

40
102-106
35
107-111
or population

30
25 112-116
20 117-121
15 122-126
10 127-131
5 132-136
0 137-141
f 142-146
147-151
Digital Numbers Range
152-156
Linear ( 87 – 91)

iirs Image Statistics


Measures of Central Tendency
n
• Mean  BVik
k  i 1
n
• Median- value midway in frequency distribution
• Mode- most frequently occurring value in a distribution
Measures of Dispersion
• Range-difference between the maximum (maxk) and minimum (mink)
values rangek  max k  min k
• Variance- Sum of Squared Deviation from Mean n

 BV  k 
2
ik
• Standard Deviation- var k  i 1
n
positive square root of the variance sk   k  var k
Digital Image Processing Minakshi,PRSD,IIRS 22

11
5/18/2022

iirs

Multivariate Statistics
• Covariance- the joint variation of two variables about their common
mean.

• Correlation- the degree of interrelation between variables not


influenced by measurement units
covkl
rkl 
sk sl

Digital Image Processing Minakshi,PRSD,IIRS 23

iirs

Image Preprocessing
• Remote sensing systems do not function perfectly
all the time.
• Pre-processing operations, referred to as image
restoration and rectification, are intended to correct
for sensor- and platform-specific radiometric and
geometric distortions of data.
• Pre processing functions are normally carried out
prior to the main data analysis and extraction of
information
• The two most common types of error encountered
in remotely sensed data are radiometric and
geometric.

12
5/18/2022

iirs

Why Geometric Correction?


• To allow an image to overlay a map
• To warp an image to eliminate
distortion caused by terrain, instrument
wobble, earth curvature, etc.
• To change the spatial resolution of an
image
• To change the map projection

iirs

Difference in Geometry
Shift
Scale
Rotation and
Skew

13
5/18/2022

Two basic strategies for


fitting images to maps
1. Rectification: Find Ground Control
Points (GCPs) on the image and on
maps (or from the field).
2. Registration: Create links between
two images or between the image
and a digital map.

5/18/2022 27

Rectification
• is a process of geometrically correcting an image so
that it can be represented on a planar surface ,
conform to other images or conform to a map.
• i.e it is the process by which geometry of an image is
made planimetric.
• It is necessary when accurate area , distance and
direction measurements are required to be made from
the imagery.
• It is achieved by transforming the data from one grid
system into another grid system using a geometric
transformation
In other words process of establishing mathematical
relationship between the addresses of pixels in an image
with corresponding coordinates of those pixels on another
image or map or ground.

5/18/2022 28

14
5/18/2022

Rectification Procedure
(Steps)
1. Spatial Interpolation: The geometric relationship between input
pixel location (row & column) and associated map co-ordinates of the
same point (x,y) are identified.
• This establishes the nature of the geometric co-ordinate
transformation parameters that must be applied to rectify the
original input image (x,y) to its proper position in the rectified
output image (X,Y).
• Involves selecting Ground Control Points (GCPS) and fitting
polynomial equations using least squares technique
2. Intensity Interpolation:
• Pixel brightness value must be determined.
• A pixel in the rectified image often requires a value from the input
pixel grid that does not fall neatly on a row and column co-ordinate.
• For this reason resampling mechanism is used to determine pixel
brightness value.

5/18/2022 29

Rectification / Registration

5/18/2022 30

15
5/18/2022

Ground Control Points


(GCPs)
• Road intersections, river bends,
distinct natural features, etc.
• GCPs should be spread across image
• Requires a minimum number
depending on the type of
transformation
• Some say that it is better to have
clusters of GCPs
• Must choose a map projection for
GCP coordinates.
5/18/2022 31

Intensity Interpolation or
Image Resampling
• Once an image is warped, how do you assign
DNs to the “new” pixels?
• Since the grid of pixels in the source image
rarely matches the grid for the reference
image, the pixels are resampled so that new
data file values for the output file can be
calculated.
• This process involves the extraction of a
brightness value from a location in the input
image and its reallocation in the appropriate
coordinate location in the rectified output
image.
5/18/2022 32

16
5/18/2022

Resampling Techniques
• Nearest Neighbor
– Assigns the value of the nearest pixel to
the new pixel location
• Bilinear
– Assigns the average value of the 4
nearest pixels to the new pixel location
• Cubic Convolution
– Assigns the average value of the 16
nearest pixels to the new pixel location
5/18/2022 33

Second Ground Control Point

5/18/2022 34

17
5/18/2022

5/18/2022 35

5/18/2022 36

18
5/18/2022

5/18/2022 37

iirs

Image Enhancement
• Modification of an image to alter its
impact on viewer
• Enhancements are used to make it easier
for visual interpretation and
understanding of imagery.
• Process of making an image more
interpretable for a particular
application
• to accentuate certain image features for
subsequent analysis or for image display

19
5/18/2022

iirs

Enhancement Types:
• RADIOMETRIC ENHANCEMENT
• Modification of brightness values of each pixel in an
image data set independently (Point operations).
• SPECTRAL ENHANCEMENT
• enhancing images by transforming the values of
each pixel on a multiband basis
• SPATIAL ENHANCEMENT
• Modification of pixel values based on the values of
surrounding pixels. (Local operations)

[email protected] 39

iirs

RADIOMETRIC ENHANCEMENT
• Modification of brightness values of each pixel in
an image data set independently (Point
operations).
• Brings out contrast in the image
• Applied separately to each band of data.
• Enhancement applied to one band may not be
appropriate to other bands.
• Contrast Enhancement falls under Radiometric enhancement

[email protected] 40

20
5/18/2022

iirs

CONTRAST
• Amount of difference between average gray level of an
object and that of surroundings
• Difference in illumination or grey level values in an image
or
• Intuitively, how vivid or washed-out an image appears
• Ratio of Maximum Intensity to Minimum Intensity
• Larger the ratio more easy it is to interpret the image

CONTRAST = Max . Grey Value / Min. Grey Value

[email protected] 41

iirs
Why is it needed to contrast stretch?

Band4 Band2

Band1
FCC (4,2,1)
Band2
Band4

21
5/18/2022

iirs

Image and Contrast

Original Low Contrast Saturated

iirs

Contrast Enhancement
• Expands the original input values to make
use of the total range of the sensitivity of
the display device.
• The density values in a scene are literally pulled
farther apart, that is, expanded over a greater
range.
• The effect is to increase the visual contrast
between two areas of different uniform densities.
• This enables the analyst to discriminate easily
between areas initially having a small difference
in density.

22
5/18/2022

iirs

Linear Contrast Stretch


• A DN in the low range of the original
histogram is assigned to extreme black,
and a value at the high end is assigned to
extreme white.
• The remaining pixel values are
distributed linearly between these two
extremes

iirs
Linear stretch

Histogram
Distribution of Grey Values
TM band 4

[email protected] 46

23
5/18/2022

iirs

Histogram Equalisation
 In this technique, histogram of the original image is
redistributed to produce a uniform population density.

This is obtained by grouping certain adjacent gray


values.

Thus the number of gray levels in the enhance image is


less than the number of gray levels in the original image.

Contrast is increased at the most populated range of


brightness values of the histogram (or "peaks").

It automatically reduces the contrast in very light or


dark parts of the image associated with the tails of a
normally distributed histogram
[email protected] 47

iirs

Histogram equalization

Histogram

TM band 4

24
5/18/2022

iirs

Filtering
• pixel value is modified based on the values surrounding
it.
• Process of suppressing (de-emphasizing) certain
frequencies & passing (emphasizing) others.
• This technique increases the analyst’s ability to
discriminate detail.
• used for enhancing certain features
• removal of noise.
• Smoothening of image

iirs

Spatial frequencies
• Numbers of changes in the brightness values
per unit distance for any particular part of the
image
• Image Composed of
• High frequency details
• Low frequency details
• Low Frequency Details
Few changes in brightness value over a given
area
• High Frequency Details
Brightness values change dramatically over
short distances

25
5/18/2022

iirs
Where are the low and high
frequencies ?

iirs

Filters
• are Algorithms for filtering
• Composed of
• Window mask /Kernal / Convolution mask and
• Constants (Weights given to mask)
• Mask size 3x3, 5x5, 7x7, 9x9………
ex. Square mask
1 1 1
1 1 1
1 1 1

[email protected] 52

26
5/18/2022

iirs

Convolution ( Filtering Technique)


• Process of evaluating the weighted neighbouring pixel
values located in a particular spatial pattern around the i,j,
location in input image.

Technique
– Mask window is placed over part of image
– Convolution Formula is applied over the part of image (Sum of the
Weighted product is obtained (coefficient of mask x raw DN
value)/ sum of coefficients)
– Central value replaced by the output value
– Window shifted by one pixel & procedure is repeated for the entire
image.

[email protected] 53

iirs

Filter Types
• Low Pass Filters
• block high frequency details
• has a smoothening effect on images.
• Used for removal of noise
• Removal of “salt & pepper” noise
• Blurring of image especially at edges.
• High Pass Filters
• Preserves high frequencies and Removes slowly varying
components
• Emphasizes fine details
• Used for edge detection and enhancement
• Edges - Locations where transition from one category to
other occurs

27
5/18/2022

iirs

A low-pass filter is designed to emphasize larger, homogeneous


areas of similar tone and reduce the smaller detail in an image.
Thus, low-pass filters generally serve to smooth the appearance of
an image. Average and median filters, often used for radar
imagery, are examples of low-pass filters.

FCC Low Pass Filtered Image

iirs
High-pass filters do the opposite and serve to
sharpen the appearance of fine detail in an image. One
implementation of a high-pass filter first applies a
low-pass filter to an image and then subtracts the
result from the original, leaving behind only the high
spatial frequency information

FCC 3X3 EDGE DETECTOR 5X5 EDGE DETECTOR SOBEL FILTER

28
5/18/2022

iirs
Directional, or edge detection filters are designed to highlight
linear features, such as roads or field boundaries.

These filters can also be designed to enhance features which


are oriented in specific directions.

These filters are useful in applications such as geology, for the


detection of linear geologic structures.

iirs

Multi Band Operations


• Ratioing

“The process of dividing the pixels in one


image by the corresponding pixels in a
second image.”

• One of the most commonly used


transformation applied to remotely
sensed images.

29
5/18/2022

iirs
Which bands to Ratio
1 2 3 4 5 7

Image Enhancement Techniques Minakshi,PRSD, IIRS 59

iirs
Vegetation Indices
These are computed to eliminate the changing illumination
conditions, surface slope, aspect, and other extraneous
factors. The vegetation indices are helpful in highlighting
the vegetation content in the imagery.

The commonly used vegetation indices are:

Vegetation Index (VI) = IR / R


Normalized Difference Vegetation Index
(NDVI) = (IR - R)/(IR + R)
Transformed Vegetation Index (TVI)
= {(IR - R)/(IR + R) + 0.5}1/2 x 100

30
5/18/2022

iirs

InfraRed Red

RATIO IR/R (RVI) NDVI {(IR-R)/(IR+R)}

iirs

Vegetation Index

RATIO IR/R (RVI) NDVI {(IR-R)/(IR+R)}

31
5/18/2022

iirs
Vegetation cover map of India (vegetation cover
from IRS-IC WiFS data,

iirs

IMAGE FUSION
• Most of the sensors operate in two modes: multispectral mode
and the panchromatic mode.
• The panchromatic mode corresponds to the observation over
a broad spectral band (similar to a typical black and white
photograph) and
• the multispectral (color) mode corresponds to the observation
in a number of relatively narrower band.
• Usually the multispectral mode has a better spectral
resolution than the panchromatic mode.
• Most of the satellite sensors are such that the panchromatic
mode has a better spatial resolution than the multispectral
mode,
• Better is the spatial resolution, more detailed information about
a landuse is present in the imagery
• To combine the advantages of spatial and spectral
resolutions of two different sensors, image fusion
techniques are applied

32
5/18/2022

iirs
Multi Sensor Image Data Fusion

Panchromatic Image Multispectral Image


1 m spatial resolution 4 m spatial resolution

Gandhi Park

Cinema halls Dehradun City Centre


(prabhat and krishna) as imaged by IKONOS
on 19th April 2001

Ghanta Ghar

Merged PAN+ MSI

iirs

Principal Component Analysis (PCA)

• Different bands of multispectral data are


often highly correlated and thus contain
similar information.
• We need to Transforms the original
satellite bands into new “bands” that
express the greatest amount of variance
(information) from the feature space of
the original bands

Image Enhancement Techniques Minakshi,PRSD, IIRS 66

33
5/18/2022

iirs

Graphical Conceptualization

• PCA is accomplished by a linear


transformation of variables that
corresponds to a translation and rotation
of the original coordinate system

Image Enhancement Techniques Minakshi,PRSD, IIRS 67

iirs

Correlation Scatterplot
Data 2

Data 2

Positive Correlation
Data 1
Negative Correlation Data 1
Data 2

Data 1
No Correlation

Image Enhancement Techniques Minakshi,PRSD, IIRS 68

34
5/18/2022

iirs

PCA- Graphical Conceptualization

Image Enhancement Techniques Minakshi,PRSD, IIRS 69

iirs

Principal Component 1
• The first principal
component,
broadly simulates
standard black and
white photography
and it contain most
of the pertinent
information
inherent to a
scene.

Image Enhancement Techniques Minakshi,PRSD, IIRS 70

35
5/18/2022

iirs
Principal Component 2

• Thus as is the
convention
the second
PC has a
smaller
variance than
the first PC

Image Enhancement Techniques Minakshi,PRSD, IIRS 71

iirs

Principal Component 3
• Some of the gray
patterns can be
broadly correlated
with two
combined classes
of vegetation: The
brighter tones
come from the
agricultural fields.
Moderately darker
tones coincide
with some of the
grasslands, forest
or tree areas.
Image Enhancement Techniques Minakshi,PRSD, IIRS 72

36
5/18/2022

iirs

Principal Component 4
• Very Little
Information
Content

Image Enhancement Techniques Minakshi,PRSD, IIRS 73

iirs
Composite PC Image
• Forest appears
green, river bed
in blue, water in
Red – orange ,
vegetation
appears in
varying shades
of green and
fallow
agriculture field
as pink to
magenta
Color Composite PC1,PC2,PC3

Image Enhancement Techniques Minakshi,PRSD, IIRS 74

37
5/18/2022

iirs

38
21-05-2019

Image Classification
– Un-supervised and Supervised
Accuracy Assessment

What is an image?

1
21-05-2019

What is an image?

Image Classification
The objective of these operations is to replace visual
analysis of the image data with quantitative techniques
for automating the identification of features in a scene.

35 1 6 26 19 24
35 1 6 26 19 24 1 1 1 3 4 2
35 31 326 726 21 19 23
24
35 31 326 726 21 24 2525
19 23
35 13 3132
6 26 7 1921 22
23 27
24 25 2 2 1 1 2 4
32 979 2212 22
3 31 25 2020
23 27
3 32
31 79 21 2 3322 17
23 27 10
25 20
31 898 2822833
22 17 20 1515
27 10 2 2 1 1 1 4 1 Water
31 98 3028
2 22 33 34
17 12
27 10 14
20 15
28 5335 34
8 30 17 12 15 1616
10 14 2 1 3 4 2 3 2 Vegetation
30 33
8 28 5 36 34 29
17 12 13
10 14 18
15 16
30 454 36
34 2912 13 16 1111
14 18 2 4 4 4 3 3 3 Wetland
30 54 3436 1229 14
13 16
18 11
4 36 29 13 18 11
4 36 29 13 18 11 4 4 4 3 3 4 4 Soil

2
21-05-2019

Pixel based Parametric Classifiers

Unsupervised Classification
Supervised Classification Algorithms
Classification Accuracy

Pixel based Parametric Classifiers

Image Classification - Unsupervised

Unsupervised method

3
21-05-2019

Pixel based Parametric Classifiers

Image Classification - Unsupervised

k-means Algorithm
Euclidean norm

Pixel based Parametric Classifiers

Image Classification - Unsupervised

k-means Algorithm
Mahalanobis norm

4
21-05-2019

Pixel based Parametric Classifiers

Image Classification - Supervised


Supervised method

Supervised Classification Algorithms


Minimum Distance Classification
Mahalanobis classifier
Parallelepiped Classification
Maximum Likelihood Classification

5
21-05-2019

Confusion Matrix or Error Matrix


Ground truth classes Total

A B C

Thematic map classes


A 35 2 2 39
B 10 37 3 50
C 5 1 41 47

Number of ground 50 40 46 136


truth pixels

User Accuracy for B = 37/50=74%: Error of Commission = 26%


Producer Accuracy for B = 37/40=93% ; Error of Omission = 7%

Kappa estimates =

You might also like