You are on page 1of 13

image

Enhancement
Linear Contrast Stretching

 When the values in the original image are expanded uniformly to fill the
total range of the output device, the transformation is called linear contrast
stretching. If DN is the Digital Number of the pixel, DNst is the
corresponding DN in the enhanced output image, DNmax and DNmin are
the maximum and minimum DN values in the original image, the linear
contrast stretching can be graphically represented as shown below.
Graphical representation of the linear contrast stretching function
Fig. 2
For example, for an 8-bit display system, linear contrast stretching transformation can be
achieved as given below.

where DN values in the range DNmin-DNmax are rescaled to the range


0-255 in the output image.
Logarithmic, power law or Gaussian
stretch
 In logarithmic stretching, curves having the shape of the logarithmic function
are used for rescaling the original DN levels into the wider output range, as
shown in

Fig 3. A sample logarithmic stretch function


General form of logarithmic stretching uses
the following form.

DNst = c log (1+DN)


As shown in Fig. 3, in logarithmic stretching, smaller values are stretched to a wider range,
whereas narrower output range is used for higher values. This type of stretching is generally
used to enhance the information contained in the dark pixels, during which process the
information contained in the lighter pixels are compressed.
Application of power law executes the stretching in an opposite way. Power-law contrast
stretching generally uses the following form.

DNst = c DNn

where c and n are positive constants.


Density slicing
Density slicing is the process in which the pixel values are sliced into different ranges and
for each range a single value or color is assigned in the output image. It is also know as
level slicing.

For example, Fig.1(a) shows the ASTER GDEM for a small watershed in the Krishna River
Basin. Elevation values in the DEM range from 591-770 m above mean sea level. However,
the contrast in the image is not sufficient to clearly identify the variations.

The pixel values are sliced into 14 ranges as shown in Fig. 1 (b) and the colors are assigned to
each range. The resulting image is shown in Fig 1(b).

Density slicing may be thus used to introduce color to a single band image. Density slicing is
useful in enhancing images, particularly if the pixel values are within a narrow range. It
enhances the contrast between different ranges of the pixel values.
Fig. 1 (a) ASTER GDEM and (b) Density sliced
image showing 14 levels of elevation
Spatial Filtering
Another processing procedure falling into the enhancement category that often
divulges valuable information of a different nature is spatial filtering.
Although less commonly performed, this technique explores the distribution
of pixels of varying brightness over an image and, especially detects and
sharpens boundary discontinuities. These changes in scene illumination, which
are typically gradual rather than abrupt, produce a relation that we express
quantitatively as "spatial frequencies". The spatial frequency is defined as the
number of cycles of change in image DN values per unit distance (e.g., 10
cycles/mm) along a particular direction in the image. An image with only one
spatial frequency consists of equally spaced stripes (raster lines). For instance,
a blank TV screen with the set turned on, has horizontal stripes. This situation
corresponds to zero frequency in the horizontal direction and a high spatial
frequency in the vertical.
Convolution filtering is a common mathematical method of implementing spatial filters. In
this, each pixel value is replaced by the average over a square area centered on that pixel.
Square sizes typically are 3 x 3, 5 x 5, or 9 x 9 pixels but other values are acceptable. As
applied in low pass filtering, this tends to reduce deviations from local averages and thus
smooth the image. The difference between the input image and the low pass image is the
high pass-filtered output. Generally, spatially filtered images must be contrast stretched to
use the full range of image display. Nevertheless, filtered images tend to appear flat.

Next, we will apply three types of filters to TM Band 2 from Morro Bay. The first that we
display is a low pass (mean) filter product, which tends to generalize the image:

Low pass filter image of Band 2,


Morro Bay
An edge enhancement filter highlights abrupt discontinuities, such as rock joints and faults,
field boundaries, and street patterns:

An Edge Enhancement Filter Image of Morro Bay

In this example, the scene has been radically modified. The Sobel Edge Enhancement
algorithm finds an overabundance of discontinuities but we have chosen this program (using
Idrisi) to emphasize the sharp boundaries that can result from applying this mode of
enhancement.
The high pass filter image for Morro Bay also brings out boundaries, but more subdued than
above:

Here, streets and highways, and some streams and ridges, are greatly emphasized. The trademark
of a high pass filter image is that linear features commonly appear as bright lines with a dark
border. Details in the water are mostly lost. Much of the image is flat.
Prepared by:

Zapanta, Eduardo Jr. M


Genandoy, Resty

You might also like