You are on page 1of 14

11/14/2014

Image Enhancement

Image
Enhancement
S.Sivanantharajah
Lecture 05
2014/11/15

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

Useful since many satellite images give inadequate


information for image interpretation.
Attempted after image is corrected for distortions

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement Types:
RADIOMETRIC ENHANCEMENT
Modification of brightness values of each pixel in
an image data set independently (Point
operations).

SPATIAL ENHANCEMENT
Modification of pixel values based on the values
of surrounding pixels. (Local operations)

SPECTRAL ENHANCEMENT
Enhancing images by transforming the values of
each pixel on a multiband basis

Fundamentals of Remote Sensing S.Sivanantharajah

CONTRAST
Amount of difference between average gray level
of an object and that of surroundings
Difference in illumination or gray level values in an
image

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
Fundamentals of Remote Sensing S.Sivanantharajah

Image Histogram
Histogram- distribution of gray describes the
statistical levels(pixel values) in an image in terms
of the number of pixels( or percentage against the
total number of pixels) at each gray level.

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


Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Histogram and Image Characteristics

Why is it needed to contrast stretch?

Band1

Band 3

FCC (4,2,1)
Fundamentals of Remote Sensing S.Sivanantharajah

Reasons for Low Contrast


Scene itself has low contrast ratio

Fundamentals of Remote Sensing S.Sivanantharajah

Band2

Band4

LOW CONTRAST IMAGE AND ITS


HISTOGRAM

The individual objects and background that make


up the terrain may have a nearly uniform
electromagnetic response at the wavelength
band of energy that is recorded by the remote
sensing system.
Different materials often reflect similar amounts of
radiant through out the Visible, NIR and MIR
portion of EM Spectrum.
Cultural Factors e.g. People in developing
countries use natural building material (wood,
soil) in construction of urban areas.
Fundamentals of Remote Sensing S.Sivanantharajah

ORIGINAL IMAGE AND ITS


HISTOGRAM

Fundamentals of Remote Sensing S.Sivanantharajah

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.

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Contrast Enhancement Types


Linear Contrast
Stretch
Input and Output
Data Values follow a
linear relationship
Min Max Stretch
% stretch
Std. deviation
Stretch
Piecewise Linear
Stretch
Saw tooth Stretch

Non Linear Contrast


Stretch
Input and Output Data
Values do not follow a
linear relationship
Logarithmic
Inverse Log
Exponential
Square
Square root etc .

Linear Contrast Stretch


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

Fundamentals of Remote Sensing S.Sivanantharajah

Linear Contrast Stretch

Enhancement of Image data: Linear stretch

By expanding the original input values of the image,


the total range of sensitivity of the display device
can be utilized.
Linear contrast enhancement also makes subtle
variations within the data more obvious.
These types of enhancements are best applied to
remotely sensed images with Gaussian or nearGaussian histograms, meaning, all the brightness
values fall within a narrow range of the histogram
and only one mode is apparent.
Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Linear Contrast Stretch

Enhancement of Image data: Linear stretch


255

Y = ax + b
grey
shade

min DN

max DN

Linear stretch

0
0

DN

255

transfer function
Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Computations

Maximum Minimum Linear Contrast Stretch

Y = ax+b Eq. 1
The values of 'a' and 'b' are computed from the equations.
a =
(Ymax - Ymin )/Xmax - Xmin
b =
(Xmax Ymin - Xmin Ymax )/Xmax - Ymin
where,
X =
Input pixel value
Y =
Output pixel value
Xmin, Xmax , Ymin and Ymax are the min and max input and
output values

DN - DNmin
DN1= ---------------- . 255
DNmax Dnmin
For Example DN value 100 will become
59 after the enhancement

To stretch the data between 0- 255 Eq.1 takes the form

X Xmin
Y= -------------- . 255
Xmax - Xmin

DN DNmin
DN1 = ---------------- . 255
DNmax - DNmin

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Linear stretch

Linear stretch

Linear Stretch Min Max

Histogram
Distribution of Grey Values

(Jensen 1996)

TM band 4

Look Up Table
There is only one entry for a
combination of an Input and
Output ( No Duplicate Entries)
Data is not destroyed once an
irreversible operation is
performed
Need to only change the LUT if
another operation is to be
performed
Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Linear stretch


LUT
I/P

O/P

10

20

64

30

128

40

191

50

255

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Enhancement of Image data: Piece wise linear stretch

Enhancement of Image data: Piece wise linear stretch

Allows for the enhancement of a specific portion of


data by dividing the lookup table into sections
It enables to create a number of straight line
segments that can simulate a curve.
Can also enhance the contrast or brightness of any
section in a single color gun at a time.
This technique is very useful for enhancing image
areas in shadow or other areas of low contrast.

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Piece wise linear stretch

Fundamentals of Remote Sensing S.Sivanantharajah

Non-Linear Contrast Enhancement


Input and Output Data Values do not follow linear
relationships
Input and output are related via a transformation
function

Y = (x)
Increases or decreases contrast in different
regions of histogram
Transfer Function Types:
Mathematical
* Logarithmic
* Inverse Log
* Exponential
* Square
* Square root
* Cube
* Cube Root

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Statistical
* Histogram Equalization
* Gaussian Stretch
Trigonometrical
* Arc tangent ( tan-1)

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Redistributes pixel values with a


nonlinear contrast stretch.
There are approximately the same
number of pixels with each value within a
range.
Contrast is increased at the peaks of
the histogram and lessened at the tails.

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Enhancement of Image data: Histogram equalization

Enhancement of Image data: Histogram equalization


N - the number of bins to which pixel values can be
assigned.
T = the total number of pixels in the image
If there are many bins or many pixels with the
same value, some bins may be empty.
The total number of pixels is divided by the number of
bins, equaling the number of pixels per bin, A =T/N the
equalized number of pixels per bin.
The pixels of each input value are assigned to bins, so
that the number of pixels in each bin is as close to A
as possible.

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Fundamentals of Remote Sensing S.Sivanantharajah

Enhancement of Image data: Histogram equalization

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Enhancement of Image data

SPATIAL ENHANCEMENT
SPATIAL ENHANCEMENT
Modification of pixel values based on the
values of surrounding pixels. (Local
operations)
While radiometric enhancements operate on each
pixel individually, spatial enhancement modifies pixel
values based on the values of surrounding pixels.
Spatial enhancement deals largely with spatial
frequency, which is the difference between the
highest and lowest values of a contiguous set of
pixels.

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Spatial Filtering

Spatial Frequency

Spatial Filtering is the process of dividing the image into its


constituent spatial frequencies, and selectively altering
certain spatial frequencies to emphasize some image
features.
Process of suppressing (de-emphasizing) certain
frequencies & passing (emphasizing) others.

zero spatial frequency - a flat image, in which every pixel


has the same value
low spatial frequency - an image consisting of a smoothly
varying gray scale
high spatial frequency - an image consisting of a
checkerboard of black and white pixels
Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Spatial Frequency

Spatial Filtering
This technique increases the analysts ability to
discriminate detail.
This is known as local operation i.e. pixel value is
modified based on the values surrounding it.
Main purpose of this technique is to

SPATIAL FREQUENCY:
variation of the Digital
Count per space unit.

enhance certain features.


remove the noise in the image.
Smoothening of image.

"Smooth image" : low spatial frequency

Fundamentals of Remote Sensing S.Sivanantharajah

"Rough image" : high spatial frequency

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Spatial enhancement

Fundamentals of Remote Sensing S.Sivanantharajah

Spatial enhancement

Fundamentals of Remote Sensing S.Sivanantharajah

Convolution Filtering

Convolution ( Filtering Technique)

Convolution filtering is the process of


averaging small sets of pixels across an
image. Convolution filtering is used to
change the spatial frequency characteristics
of an image.
A convolution kernel is a matrix of numbers
that is used to average the value of each
pixel with the values of surrounding pixels in
a particular way. The numbers in the matrix
serve to weight this average toward
particular pixels.

Process of evaluating the weighted neighbouring


pixel values located in a particular spatial pattern
around the i,j, location in input image.

Fundamentals of Remote Sensing S.Sivanantharajah

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.
Fundamentals of Remote Sensing S.Sivanantharajah

Compute the output


integer [(-1 8) + (-1 6) + (-1 6) + (-1 2)
+ (16 8) + (-1 6) + (-1 2) + (-1 2) + (-1
8) (-1 + -1 + -1 + -1 + 16 + -1 + -1 + -1 + -1)]
= int [(128-40) / (16-8)]
= int (88 / 8) = int (11) = 11

Fundamentals of Remote Sensing S.Sivanantharajah

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

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Convolution Process

c1 c2 c3
c4 c5 c6

Convolution Process

c1

c2

c3

c4

c5

c6

c7

c8

c9

Step 1 : Window mask is placed over


part of Image
c1 c2 c3
c4 c5 c6

c7 c8 c9

c7 c8 c9
Filter

Filter

Input Image

Input Image

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Convolution Process
Convolution Process
c1

c2

c3

c4

c5

c6

c7

c8

c9

Step 2 : Central Pixel values is


calculated based on its neighbouring
values
C1
BV1

C2
BV2

C3
BV3

C4
BV4

C5
BV5

C6
BV6

C7
BV7

C8
BV8

C9
BV9

c1

cc12

cc23

cc31

cc12

cc23

c3

c4

cc45

cc56

cc64

cc45

cc56

c6

c7

cc78

cc89

cc97

cc78

cc89

c9

c1

c2

c3

c4

c5

c6

c7

c8

c9

BV5, out = ( C1* BV1 + C2* BV2 + C3* BV3 + C4* BV4 +
C5* BV5 + C6* BV6 + C7* BV7 + C8* BV8 +
C1* BV9 )

Input Image

Ci

Fundamentals of Remote Sensing S.Sivanantharajah

Step 3: Central Pixel Value is replaced


by the new value and window is shifted
by one pixel to the right and the entire
process is repeated

Input Image
Fundamentals of Remote Sensing S.Sivanantharajah

Convolution Process
Please Note that:

Central Pixel

Using 3x3 kernel results in output


image 2 lines and 2 columns smaller.
Boundary pixels are either copied from
original image
Or

Duplicated from the sides and then


computed

Fundamentals of Remote Sensing S.Sivanantharajah

Window mask
010
111
010

BV5, out = 932 / 5 = 186

Fundamentals of Remote Sensing S.Sivanantharajah

11/14/2014

Filtering

Low Pass Filters


Low pass filter eliminate high frequency
components, while leaving low frequencies
untouched (ie, the filter passes low frequencies).

block high frequency details


has a smoothening effect on images.
Used for removal of noise
Removal of salt & pepper noise
Before Filtering

After filtering

Blurring of image especially at edges.

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

LOW PASS FILTERS:

MEDIAN FILTER:

TYPES:

MEAN

MEDIAN

MODE

Effect
- Retains sharpness of linear feature along with
smootherning of image

MEAN FILTER:
-

weights of

pixel values are sorted within the window


- median of sorted value is used to replace the central pixel.

MODE FILTER:

1
1
1
3x3 mean filter mask 1
1
1
1
1
1
Effect smoothens the image
blurring the image at edges

Central pixel replaced by most common neighbour in the


window
Used to Remove Random (Spike like) noise.
-

Post Classification filter

Low Pass Median Filter

3x3

Fundamentals of Remote Sensing S.Sivanantharajah

5x5

Low Pass Filters - Mode

7x7

3x3

5x5

7x7

Fundamentals of Remote Sensing S.Sivanantharajah

10

11/14/2014

Low Pass Filter

High Pass Filters


Preserves high frequencies and
Removes slowly varying components
Emphasizes fine details

Low
pass
Filter

Used for edge detection and


enhancement
Edges - Locations where transition from
one category to other occurs
0 -1 0
-1 5 -1
0 -1 0

Fundamentals of Remote Sensing S.Sivanantharajah

Delineates Edges and makes the shapes and


details more prominent
background is not lost.

-1 -1 -1
-1 8 -1
-1 -1 -1

Fundamentals of Remote Sensing S.Sivanantharajah

High Pass Filtering


Edge Detection Background is lost
Edge Enhancement

1
or

Edge Detection
Zero-Sum Kernels
Zero-sum kernels are kernels in which
the sum of all coefficients in the kernel
equals zero.
This generally causes the output values
to be:
zero in areas where all input values are
equal (no edges)
extreme in areas of high spatial
frequency (high values become much
higher, low values become much lower)

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

Edge Enhancement

Edge Detection
Therefore, a zero-sum kernel is an edge
detector, which usually smoothes out or zeros
out areas of low spatial frequency and creates
a sharp contrast where spatial frequency is
high, which is at the edges between
homogeneous (homogeneity is low spatial
frequency) groups of pixels.
The 3 x 3 kernel
-1
-1 -1
1
-2
1
1
1
1
Fundamentals of Remote Sensing S.Sivanantharajah

Non Zero Sum Kernel


High-frequency kernels serve as edge enhancers, since
they bring out the edges between homogeneous groups of
pixels. They highlight edges and do not necessarily
eliminate other features. (The sum of coefficients of kernel
is not zero)

Kernel
-1
-1
-1

-1
16
-1

-1
-1
1

Fundamentals of Remote Sensing S.Sivanantharajah

11

11/14/2014

Edge Enhancement

Edge Detection

BEFORE
AFTER
204 200 197
204 200 197
201 106 209
201 9
209
198 200 210
198 200 210
...the low value gets lower. Inversely, when the kernel is used
on a set of pixels in which a relatively high value is
surrounded by lower values...
BEFORE
AFTER
64 60 57
64 60 57
61 125 69
61 187 69
58 60
70
58 60 70
...the high value becomes higher. In either case, spatial
frequency is increased by this kernel.
Fundamentals of Remote Sensing S.Sivanantharajah

Original image

3 x 3 Edge Detection

5x5 Edge Detection

Fundamentals of Remote Sensing S.Sivanantharajah

Edge Enhancement
Original Image
Enhancement

3x3 Edge

Fundamentals of Remote Sensing S.Sivanantharajah

SPECTRAL ENHANCEMENT
Enhancing images by transforming the values
of each pixel on a multiband basis.(Image
Transformation)

Fundamentals of Remote Sensing S.Sivanantharajah

Spectral Enhancement

Image Transformation (1)

The enhancement techniques that follow


require more than one band of data.
They can be used to:

Image transformations typically involve


the manipulation of multiple bands of
data, whether from a single multispectral
image or from two or more images of the
same area acquired at different times.
Either way, image transformations
generate "new" images from two or
more sources which highlight particular
features or properties of interest, better
than the original.

extract new bands of data that are more


interpretable to the eye.
apply mathematical transforms and
algorithms.
display a wider variety of information in the
three available color guns (R, G, B).
Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

12

11/14/2014

Image Transformation (2)


Basic image transformations apply simple
arithmetic operations to the image data.
Image subtraction
Image division (spectral ratioing)
Image subtraction is often used to identify changes
that have occurred between images collected on
different dates.
Image ratioing serves to highlight subtle variations in
the spectral responses of various surface covers.

Fundamentals of Remote Sensing S.Sivanantharajah

Vegetation Indices
This group of algorithms contains a
number of simple band combinations
that are commonly used for either
vegetation or mineral delineation.
Indices are used extensively in mineral
exploration and vegetation analyses to
bring out small differences between
various rock types and vegetation
classes.
Fundamentals of Remote Sensing S.Sivanantharajah

NDVI

Normalized Difference Vegetation Index


One widely used image transform is the
Normalized Difference Vegetation
Index (NDVI) which has been used to
monitor vegetation conditions on
continental and global scales using the
Advanced Very High Resolution
Radiometer (AVHRR) sensor onboard
the NOAA series of satellites.

NDVI = (Infra Red Red)/(Infra Red + Red)

Fundamentals of Remote Sensing S.Sivanantharajah

Fundamentals of Remote Sensing S.Sivanantharajah

= (TM 4 TM 3)/(TM 4 + TM 3)
VI = Vegetation Index
= TM 4/TM 3
Clay Minerals = TM 5/7
Ferrous Minerals = TM 5/4
Ferric Minerals (iron oxide) = TM 3/1

NDVI
For Landsat TM NDVI = (Band 4 Band3/(Band 4 + Band3)
Normalized Difference Vegetation Index (NDVI) = (IR R)/(IR + R)
The NDVI itself varies between -1.0 and +1.0.
Negative values of NDVI (values approaching -1)
correspond to deep water.
Values close to zero (-0.1 to 0.1) generally correspond to
barren areas of rock, sand, or snow.
Low, positive values represent shrub and grassland
(approximately 0.2 to 0.4), while high values indicate
temperate and tropical rainforests (values approaching 1).
The typical range is between about -0.1 (for a not very
green area) to 0.6 (for a very green area).

Fundamentals of Remote Sensing S.Sivanantharajah

NDVI
Increasing positive NDVI values, shown
in increasing shades of green on the
images, indicate increasing amounts of
green vegetation.
NDVI values near zero and decreasing
negative values indicate non-vegetated
features such as barren surfaces (rock
and soil) and water, snow, ice, and
clouds.
Fundamentals of Remote Sensing S.Sivanantharajah

13

11/14/2014

Applications - NDVI
Indices are used extensively in mineral
exploration and vegetation analysis to bring
out small differences between various rock
types and vegetation classes. In many cases,
judiciously chosen indices can highlight and
enhance differences that cannot be observed in
the display of the original color bands.
Certain combinations of TM ratios are routinely
used by geologists for interpretation of Landsat
imagery for mineral type. For example: Red
5/7, Green 5/4, Blue 3/1.
Fundamentals of Remote Sensing S.Sivanantharajah

14

You might also like