Sunteți pe pagina 1din 20

Subject Geology

Paper No and Title Remote Sensing and GIS


Image Enhancement: single and multi-band images, contrast
Module No and Title
stretching and filtering
Module Tag RS & GIS IX

Principal Investigator Co-Principal Investigator Co-Principal Investigator


Prof. Talat Ahmad Prof. Devesh K Sinha Prof. P. P. Chakraborty
Vice-Chancellor Department of Geology Department of Geology
Jamia Millia Islamia University of Delhi University of Delhi
Delhi Delhi Delhi
Paper Coordinator Content Writer Reviewer

Dr. Atiqur Rahman Prof. Naved Ahsan


Department of Geography, Dr. Iqbal Imam
Department of Civil Engineering
Faculty of Natural Sciences, Aligarh Muslim University,
Jamia Millia Islamia Jamia Millia Islamia
Aligarh
Delhi Delhi

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Table of Content
1. Introduction
2. Contrast Stretch
2.1 Linear Contrast Stretching
2.1.1 Minimum-maximum Stretch
2.1.2 Saturation Stretch
2.1.3 Sinusoidal Stretch
2.2 Non-Linear Contrast Stretching
2.2.1 Histogram Equalization
2.2.2 Histogram Normalization
2.2.3 Density Slicing
2.2.4 Grey Level Thresholding
3. Convolution
4. Image Filtering
4.1 Low-pass Filters
4.2 High-pass Filters
4.3 Edge Enhancement
5. Summary

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
1. Introduction

Interpretation of the remotely sensed digital data is often enriched if radiometric


characteristics of image are enhanced. Objective of image enhancement, therefore, is
to process an image so that the outcome of image interpretation for specific
applications is more appropriate than that obtained from the analysis of original
image. For example, various vegetation or soil types may be better distinguished by
increasing the contrast of the image.

There are several techniques of image enhancement that may be used for remote
sensing data. These may be categorized as (i) point operations (radiometric
enhancement), and (ii) local operations (spatial enhancement). Point operations
involve modification of the brightness value of each pixel in an image data
independently. Unlike the pixel-by-pixel operation used for radiometric
enhancement, techniques used for spatial enhancement are applied over
neighborhoods of pixels. Although the procedure still focuses on modification of
DN value of an image pixel, the new value is derived based on the DN value of its
surrounding pixels. Such a spatial interrelationship of pixel values leads to variations
in the geometric detail of the perceived image.

Image enhancement operations are generally applied to the image data, after
necessary restoration procedures have been performed. For instance, removal of
noise from image data in particular is an important pre-requisite to most image
enhancements. In case, image enhancement is carried out without removing the
noise from digital data, there are possibilities that noise in the image is enhanced.

2. Contrast Stretch

The difference in luminance or grey level values of pixels in an image is termed as


the Contrast. High contrast values or the larger contrast ratio (ratio of maximum to
minimum intensity over an image) results in a better analysis of an image. Contrast
stretch or the contrast improvement is often required to be applied on remote sensing
images as they usually lack adequate contrast required for proper image
interpretation.
Paper: Remote Sensing and GIS
GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Contrast stretch is therefore applied to improve contrast in order to obtain an image
with a good spread of pixels over the available brightness range. It is a process that
makes image features stand out more clearly by making optimal use of color
intensities that are available with the display systems used in the analysis. The
process involves modification of range of brightness values in an image in order to
enhance the contrast. For example, an image might have brightness values ranging
from 30 to 90 only. Stretching these values to a range of 0 255 would significantly
enhance the difference between features in the image.

Contrast stretching may be broadly categorized as:


Linear contrast stretching
Non-linear contrast stretching

2.1 Linear Contrast Stretching

It is one of the simplest techniques used in contrast stretch. In this technique,


grey values in an original image and the enhanced image follow a linear
relation. The lowest DN value in the original histogram is assigned
extremely black color and a pixel with the highest DN values is assigned
extremely white color. The other pixel values occurring between the lowest
and highest values are modified between these two extremities following a
first order pattern. The features or details that were obscure on the original
image become clear in a contrast stretched image.

Consider a transfer function that relates the brightness values in original


image with that in a transformed image with an improved contrast. The
relationship of brightness values of pixels in the modified image can be
described as:

y = f(x)

where x is the brightness value of a pixel in the raw image and y is the new
brightness value of the same pixel after the contrast stretch. Linear contrast
enhancement can simply be described as:

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
y = f(x) = ax + b

This function allows the introduction of a shift in the modified brightness


values of pixels. The effect of b, is either a spread in brightness values or a
compression therein, depending on the value of a, whether it is greater or
less than 1.

Following are important methods used for linear contrast stretching:


Minimum-maximum stretch
Saturation stretch
Sinusoidal stretch

2.1.1 Minimum-maximum Stretch


The minimum and maximum values of brightness in an image are set to
vary from 0 to 255 (for 8-bit data). Whereas, in remote sensing data,
the range of brightness values may be narrow i.e. the minimum
brightness value may be larger than zero whereas the maximum
brightness value may be much smaller than 255. In the method of
minimum-maximum stretch, the minimum and maximum DN values of
pixels in the original image are allocated a new set of values that make
use of complete range of brightness values of a given display device
used in remote sensing analysis.

Minimum-Maximum Stretch
Paper: Remote Sensing and GIS
GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Linear stretch is applied to each pixel in the image-using algorithm as
shown below:

DN orig DN min
DN out Lmax Lmin
DN max DN min
Where,
DNout = DN value allocated to the pixel in the stretched image
DNorig = DN value of the pixel in the original image
DNmin = min. DN value in the original image
DNmax = max. DN value in the original image
Lmin = min. brightness value allocated to the pixel in the stretched
image
Lmax = max. brightness value allocated to the pixel in the stretched
image

Minimum and maximum value i.e. Lmin and Lmax, allocated to pixels in
the output image, are generally assigned as 0 and 255 respectively. The
above equation, may therefore, be written as follows:

DN orig DN min
DN out 255
DN max DN min
New DN values so obtained are usually rounded off to the nearest
integer if the output is obtained in real form.

2.1.2 Saturation Stretch

The algorithm for saturating linear contrast enhancement is same as


that of the equation used for Minimum-Maximum stretch, except that
the values of DNmin and DNmax are user-defined. Typically, an image
processing system employs saturating linear stretch for automatic
contrast enhancement by determining the cut-off and saturation limits
(i.e. DNmin and DNmax) using mean brightness and its standard
deviation.

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Saturation Stretch

In general, only few pixels possess the two extreme values and
therefore there would be only few pixels that would appear at the two
extreme ends of the histogram. However, these pixels would occupy a
reasonable amount of brightness values.

Therefore, sometimes the two ends of the histogram are trimmed and
the remainder of portion of the histogram is enhanced more
prominently. The pixels lying within the trimmed portion of the
histogram are assigned the DN values as 0 or 255. A value of 0 is
assigned to pixels that have the original DN value less that the defined
DNmin. Similarly, pixels having original DN value greater than the
defined DNmax are assigned a value of 255.

The disadvantage of this algorithm is that the information contained in


the trimmed pixels is lost. Nevertheless, the remaining part of the
image is better enhanced as compared to Minimum-Maximum
stretching.

2.1.3 Sinusoidal Stretch


The sinusoidal stretch algorithm aims at enhancing the variance within
homogeneous areas in the image e.g. a forest cover and a water body.
The stretch parameters are generally determined by interpreting the

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
histogram of the image. The distribution is divided into several
intervals or ranges and each of these is expanded over the output range.

In this method, when input and output DN values are plotted against
each other, a curve similar to the sinusoidal curve is obtained.
Therefore, this method is termed as sinusoidal stretch method.

Since several different old DN values can be mapped to one output


value, sinusoidal stretches are generally applied to three multispectral
bands in order to form a color composite. It reduces the possibility to
map different features with an identical color.

Sinusoidal Stretch

2.2 Non-linear Contrast Stretching


In case an image histogram is asymmetric i.e. unequal distribution, non-
linear contrast stretch may be required as the simple linear stretching may
not be suitable. Non-linear contrast stretching involves histogram conversion
i.e. conversion of the histogram of the original image to another histogram.
This algorithm of contrast stretch has flexible parameters that are controlled
by DN frequencies and the shape of the original distribution.

The disadvantage of non-linear stretching is that several values of brightness


of pixels in the stretched image may be obtained for each value in the input
image. Therefore, the features in the original image are likely to lose their
correct values. However, non-linear techniques of contrast stretching are
Paper: Remote Sensing and GIS
GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
often found to be useful in distinguishing nearly classes by enhancing the
color contrast. Further, these techniques may also be helpful in identifying
subclasses of a main class.

Following are common non-linear contrast stretching techniques:


Histogram equalization
Histogram normalization
Density slicing
Grey level thresholding

2.2.1 Histogram Equalization


The histogram equalization also known as uniform distribution stretch
is one of the frequently used non-linear stretching techniques. The
objective of histogram equalization is to revise a histogram of any form
into the one that exhibits the same frequency over the entire range of
DN values. Thus, in an equalized histogram, all the pixel values of the
image are re-allocated in such a manner that there are almost equal
number of pixels allocated to each of the output values.

The method involves redistribution of original DN values based upon


their frequency of occurrence. The greatest contrast enhancement
occurs within the range with the most original DN values.

It is important to note that histogram equalization may hide much of


the necessary information. Therefore, histogram equalization may not
be appropriate in case the information is required about data in terrains
under shadows or in the case of clouds.

2.2.2 Histogram Normalization


Histogram normalization technique is based on the normal distribution
or the Gaussian distribution of a histogram, which is actually a bell
shaped distribution. In Gaussian distribution most of the values are at
or near the middle of the histogram, forming the peak of the bell curve.
Values that lie on the extreme of the curve occur rarely.

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Normal Distribution Histogram

This method also known as Gaussian stretching involves enhancement


of contrast within the ranges covered by tails of the histogram. Original
histogram, in this case, is fitted to a normal distribution curve in the
range of 0 to 255.In this manner the contrast is improved in the light
and dark portions of the image. However, in the process of normal
distribution stretching, the enhancement is achieved at the cost of
contrast in the middle gray range.

2.2.3 Density Slicing


Density slicing also called as Level slicing. It is the process in which
the continuous grey tone of an image is converted into a series of
density segments, of a specified range of brightness values. These
density segments or digital slices may be displayed in different colors
or in the form of contour lines. Difference in subtle grey-scales is
highlighted by the use of density slicing that may not be easily noticed
otherwise.

The algorithm used for density slicing involves segmentation of DN


values, distributed along the abscissa of the histogram of an image, into

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
a number of user defined intervals or slices. All the DN values in the
input image that fall within a given slice are assigned with a single
brightness value. Thus, some of the details in the image are lost as the
overall discrete number of brightness values used in the image is
reduced. However, the effect of noise can be significantly reduced and
image becomes segmented, or looks like a contour map, except that the
areas between boundaries are occupied by pixels displayed at the same
DN value.

Density Slicing

Instead of using grey levels in density slicing, different colors may also
be used. This process is known as color density slicing. A suitable
selection of colors used for display may allow the analyst to figure out
very fine details in the image.

2.2.4 Grey Level Thresholding


The technique of grey level thresholding is employed to classify the
input data image into two distinct classes i.e. black and white. All the
DN values in the input image that are less than the given threshold
value (defined by the image analyst) are assigned 0 value i.e. black
Paper: Remote Sensing and GIS
GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
color. Whereas, DN values greater than the threshold level are assigned
a value of 1, which is white color.

Thus, thresholding results in a binary output, which clearly defines


spatial boundaries. Binary masks so obtained may be used for
segmentation of an image into two classes so that additional processing
may then be applied to each class independently.

3. Convolution

Convolution is a kind of spatial enhancement technique used in remote sensing data


analysis. The process of convolution involves a moving kernel or window that
contains an array of coefficients (weights) throughout the input image. It further
involves mathematical computations using pixel values under the kernel, and
modifying the central pixel value with the new one. The moving window is called as
convolution kernel, which is generally an array of odd number of pixels in size such
as 33, 55, 77 etc.

Following is an example of a 33 pixel kernel with each of its coefficient being


equal to 1/9 the total sum of all the values being equal to 1. Convolution of image
using this kernel should result in simply averaging the values in the moving window.

This type of kernel may be used to prepare a low frequency enhancement of the
image.

1/9 1/9 1/9

Kernel = 1/9 1/9 1/9

1/9 1/9 1/9

65 62 62

Input Image Values = 62 57 63

61 64 62

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Convolved Value in the center pixel = 62

4. Image Filtering

One of the important feature of remotely sensed data is a parameter known as spatial
frequency. It is defined as number of changes in pixel value per unit distance in an
image. In case, there are very little changes occurring in the brightness value of pixel
in a portion of a remote sensing image, then it is termed as a low frequency area. On
the other hand, if considerable changes in the Brightness Value are observed over a
small distance, then it is said to be an area of high frequency.

In the image filtering technique, various algorithms are used to enhance patterns in
imagery based on spatial frequency within small regions of an image. The algorithm
is usually designed to identify large differences in brightness value, or more subtle
differences that occur in a specific orientation.

Thus, image filtering is a technique in which an image is divided into its constituent
spatial frequencies. It also involves changing certain spatial frequencies, to
emphasize specific features in a remote sensing image. Following are three different
types of spatial filters that are commonly used in the processing of remote sensing
data:
Low pass filters
High pass filters
Edge Enhancement

4.1 Low pass Filters


A low-pass filter is used to emphasize low frequency features and to
suppress the components of high frequency in an image. Low pass filter is
also known as Smoothing Filter, as it results in smoothening of the
appearance of an image. The simplest form of low-frequency filter computes
Paper: Remote Sensing and GIS
GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
the brightness value (DNout) of a pixel based upon its original brightness
value (DNin) and that of its surrounding pixels. Computation is usually based
upon the averaging of used kernel. Neighborhood convolution masks of size
3x3, 5x5, 7x7, or 9x9 are commonly used.

Use of a 3x3 kernel causes the output image to be shorter by two lines and
two columns as compared to input image thus resulting in loss of some data
near image boundaries. This loss of data may be avoided by repeating the
brightness value of original border pixels i.e. artificial extension of the output
image beyond its border. Alternatively, the brightness values at the borders
of the output image may be replicated, depending on the image behavior
within pixels of the border. Mean, median and mode filters are the forms of
commonly used low pass filters. Average filtering may be employed using a
kernel of uniform weights. Following is an example of a 3x3 kernel of equal
weights.

1 1 1

1 1 1

1 1 1

Sometimes, weighted low pass filters, as shown below, may also be used.

1 1 1

0 0 0

1 1 1

1 2 1

2 4 2

1 2 1

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
4.2 High pass Filters
High-pass filtering is a technique that is just opposite to the technique of
Low pass filtering. It is applied to remote sensing images in order to de-
emphasize or eliminate the low frequency components and to highlight the
high-frequency local variations. Contrast stretching of the output images
obtained from most high-frequency filtration is generally required before
their visual interpretations. A high pass filtering kernel, thus, enhances the
spatial frequency. Following is an example of high pass filtering kernel.

1 1 1

1 8 1

1 1 1

4.3 Edge Enhancement


In many remote sensing applications, valuable information is often contained
in the edges surrounding various features in the image. The technique of
edge enhancement sharpens these edges and makes various features in the
image more distinguishable resulting in better and easier understanding of
the analyst.

An edge enhancement filter would therefore enhance abrupt changes in the


image and filter out the background. One of the simplest methods to detect
edges is to subtract the smoothed average image from the original image,
leaving only the high and low points in the data that were removed from the
original image during low pass filtering. Since only the edges are left in the
resulting output image, this process is called as edge detection.

Prewitt Kernels and Sobel Kernels, named after their respective developers,
are commonly used for edge enhancement. Examples of these kernels are
given below-

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Prewitt Kernels:

1 1 1

x-direction = 0 0 0

1 1 1

1 0 1

y -direction = 1 0 1

1 0 1

Sobel Kernels:

1 2 1

x-direction = 0 0 0

1 2 1

1 0 1

y -direction = 2 0 2

1 0 1

These filtering kernels have been found to be effective in identification of


edges of various features in a remote sensing image.

5. Summary

Image enhancement includes processes of modification of remote sensing images so


that a better analysis of the data may be carried out and more information may be
retrieved that would not have been possible otherwise. Contrast modification or the
contrast stretching is a common technique used for image enhancement. Both linear

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
and non-linear methods of contrast stretching are applied depending upon the
characteristics of the remote sensing data and the type of analysis. Image filtering is
also another kind of image enhancement technique. It includes low pass filtering
(smoothening), high pass filtering and edge enhancement.

Frequently Asked Questions-

Q1. What do you understand by contrast stretching of remote sensing data?


Q2. Distinguish between Minimum-Maximum Stretching and Saturation Stretching
methods of image enhancement?
Q3. Describe the sinusoidal method of contrast stretch. Also, describe its
applicability in remote sensing data analysis?
Q4. Briefly describe the method of level slicing used in image enhancement?

Q5. Following are the DN values of pixels in a segment of an image:


101 112 118
116 118 119
119 121 120

Using a 33 averaging kernel with all of its coefficients being equal to 1/9,
determine the modified value of the central pixel in the in the above matrix.
Q6. In the above problem, determine the modified value of the central pixel using
the kernel as given below:
1 1 1
0 0 0
1 1 1

Q7. Differentiate between Low Pass and High Pass filters?

Q8. What do you understand by edge detection? Give a suitable example of kernel
that may be used in edge detection?

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Multiple Choice Questions-

1. The DN values, in an 8-bit system, range between


(a) 0 and 55
(b) 0 and 155
(c) 0 and 255
(d) None of these
Ans: c
2. The method of contrast stretch, in which the stretching is carried out in such a
way that DN values are spread over the entire available range, is known as
(a) Minimum-Maximum Stretching
(b) Saturation Stretching
(c) Sinusoidal Stretching
(d) None of these
Ans: a
3. Which of the following is a linear contrast stretching methods
(a) Sinusoidal Stretching
(b) Density Slicing
(c) Histogram equalization
(d) None of these
Ans: a
4. A binary image, dividing an image into two classes only, may be obtained by using
(a) Minimum-Maximum Stretching
(b) Grey Level Thresholding
(c) Histogram Normalization
(d) None of these
Ans: b
5. A filter used to emphasize low frequency features and to suppress the high
frequency features is called as
(a) Edge enhancement Filter
(b) High Pass Filter
(c) Smoothening Filter
(d) None of these
Ans: c
6. Prewit Kernels and Sobels Kernels are used in
(a) Low Pass Filtering
(b) High Pass Filtering
(c) Smoothening
(d) Edge Enhancement
Ans: d

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
7. Following is an example of the kernel used in _________

1 2 1

2 4 2

1 2 1

(a) Edge detection


(b) High pass filtering
(c) Low pass filtering
(d) None of these
Ans: c
8. A histogram that contains same frequency for the entire range of DN values, is
known as
(a) Normalized Histogram
(b) Equalized Histogram
(c) Segmented Histogram
(d) None of these
Ans: b
9. An image data contains only a few pixels with DN values in the ranges of 0 to 50
and 200 to 255 such that these pixels contain insignificant amount of
information. Which of the following method should be used for linear contrast
stretching?
(a) Minimum Maximum Stretching
(b) Saturation Stretching
(c) Sinusoidal stretching
(d) None of these
Ans: b
10. A filter that eliminates the slowly varying features in an image and enhances the
high frequency local variations is known as
(a) Low Pass Filter
(b) High Pass Filter
(c) Edge Detection Filter
(d) None of these
Ans: b

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering
Suggested Readings:

1. Bhatta, B. (2008). Remote sensing and GIS. Oxford University Press, USA.
ISBN: 019569239X, 9780195692396.
2. Jensen, John R. (2015), Introductiory to Digital Image Processing : A
Remote Sensing Perspective, 4th Edn., Pearson Education. ISBN:
013405816X, 978-0134058160.
3. Lillesand Thomas, Keifer Ralph W. and Chipman Jonathan (2015). Remote
sensing and Image Interpretation, 7th Edn. John Wiley & Sons, New York.
ISBN : 978-1-118-34328-9.
4. Liu, J. G., & Mason, P. J. (2013). Essential image processing and GIS for
remote sensing. John Wiley & Sons. ISBN: 978-0-470-51031-5.
5. Congalton, R. G., & Green, K. (2008). Assessing the Accuracy of Remotely
Sensed Data: Principles and Practices. CRC press Inc., USA. ISBN:
9781420055122.
6. Reddy, Anji M. (2012), Textbook of remote sensing and geographical
information systems, 4th Edn., B S Publications. ISBN: 9381075972, 978-
9381075975.

Paper: Remote Sensing and GIS


GEOLOGY Module: Image Enhancement: single and multi-band
images, contrast stretching and filtering

S-ar putea să vă placă și