0% found this document useful (0 votes)
7 views7 pages

Filters

The document discusses various image processing techniques, including thresholding, filtering, and convolution filtering, which are used to enhance and analyze digital images. It explains the concepts of low-pass and high-pass filters, as well as edge detection filters, and their applications in isolating features and improving image quality. Additionally, it covers the Fourier transform and frequency domain filtering methods for image enhancement.

Uploaded by

storagenotes4
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)
7 views7 pages

Filters

The document discusses various image processing techniques, including thresholding, filtering, and convolution filtering, which are used to enhance and analyze digital images. It explains the concepts of low-pass and high-pass filters, as well as edge detection filters, and their applications in isolating features and improving image quality. Additionally, it covers the Fourier transform and frequency domain filtering methods for image enhancement.

Uploaded by

storagenotes4
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/ 7

and GIS

334 Remote Sensing


Fig.10.24. Thresholding produces
Threshold
sharplydefinedispatial boundarics.
threshold mapping are sinmple as
hinary tput wih
Frequency
Output DN value 255 =input DNs DN
f
fol ows:
Output DNvalue ) =input DNs <
DN of
10.10.6 Filtering
Filtering encompasses
another
set of
threhsrheoslhaa
Brightness values
255
are used to digital
divides it
Thresholdingintotwo a histogram
on distinct values
functions, which enhance
of an image. Spatial filters are designed he
frequency. Spatialap earanec
Hg. 10.24
in an image basedontheirspatialI
specificfeatures
orsuppress concept of image texture, the mannerin which greyscale
Isrelated tothe an image. It refersto frequency values change
the
their in animage. Rough textured areas of animage, wherethe
neighbours within of irequency
tonethattoappear
relative
tone are abrupt over asmall area, have high spatial frequencies. while smooth areas wih
little variation in tone over several pixels, havelow spatial frequencies (Fig. 10.25).
variationsin
(he changes in

implementedthrough the Fourier transform in


Fitering techniques can be convolution. The coordinates of thethe2
domain
which frequency
spatial domain by
2D(called inas
or in the components are represented are given in terms of frequency frespacequency
frequency domain). The normal row/column cOordinate system in which images are
normally expressed is spatial location (called spatial domain). The Fourier transform
(refer Section 10.11.5) is used to convert a single-band image from its spatial domain
representation to the equivalentfrequency domain representation, and vice versa. Spatial
the spatial aims at image enhancement with so-called
filtering in
(convolution) filters., while in the domain of frequency it aims at reconstruction with so-enhancement
called reconstruction filters.
10.10.6.1 Convolution Filtering
Convolution filtering is one method of spatial filtering. Convolution filtering involves
moving a 'window' of aset of pixels in dimension (e.g., 3X3, 5 x5, etc.) over each pixel
in the image, applying amathematical calculation using the pixel values under that window,
and replacing the central pixel with the new value. This window is known as convolution

(a) (b) (c)

Fig. 10.25 (a) Examples of zero spatial frequency, (b) low spatial frequency
and (c) high spatial frequency
Digital Image Processing 335
2 8 6

6 8 6 6 6

2 8 6 6 16 -1
2 2 6 -1 -1
6 2 Kernel

Data
cis 10.26 3x3
data
convolution kernel applied on asample
of numbers (these numbers are also
a matrix
toaveragethe value of each pixel with the values of known
as
kernel, coefficients
) thatkernel
surrounding pixels. The is usedis
in both the row and column dimensions
movedalong with one pixel at atime and the
until the
calculation is repeated entire image has been filtered and a
generated. By varying the calculation performed and the
'new' image is
weightings the individual
pixelsinthefilter window, filters can be designed to enhance or
of
offeatures.
suppress different types
To understand how one pixel is convolved, imagine that the convolution kernel is
don the data file values of the image (in one band), sothat the pixel to be
overlaid.
is in the centre of the window. Figure 10.26 shows a 3 x 3 convolution kernel convolved
being
appliedtothe pixel in the third column, third row of the sample data (the pixel that
corresponds to the centre of the kernel). To computethe output value for this pixel, each
value in the convolution kernel is multiplied by the image pixel value that corresponds to
it. These products are summed, and the total is divided by the sum of the values in the
kernel, as shown as follows:
(-1x8) + (-1x6) +(-lx6) +(-1x2) +(16x 8) +(-1x6) +
(-lx2) +(-lx2) +(-lx8)
integer (-1) +(-1) +(-1) + 16 +(-1)+(-1) +(-1)
= int [(128 40)/(16 8)]
=int (88/8) = int (1) = 11
Low-pass (Smoothing) Filter Alow-pass filter is designed to emphasize larger, bo
mogeneous 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, mode, and
median filters are examples of low-pass filters.
Averaging filter A 2D moving average filter is defined in terms of its dimensions,
which must be odd, positive, and integral. The output DN is found by dìviding the sum of
the products of corresponding convolution kernel and image elements often divided by
lhe number of kernel elements. Averaging filter is also known as smoothing filter.
An example of the averaging filter is the mean filter, where averaging is done with a
kernel ofequal weights. This filter is also called a box-car filter. A3x3example of such
kernel is as follows:
and GlS
336 Remote Sensing

filtering with a
Another example of averaging
filter is kemel of dif erent
follows:

1
1 2 1
0 0 0

1 1
filter The median filter is a better way to reduce
speckle,
Median
by arranging DN
all values in
simplistic. Thisfilter operates of interest is replaced by the sequential ghile
value in order being siy
window that we define. The pixel
distribution(median). A median
filter is useful for removing pulse the
cent
orrwi
eih inoithethik
(a single observation far
filter is more useful in removing outliers RADAR
on imagery, than a awayspifrom
ke noise., Thi
the rest
data), random noise, and speckles
the
It has a desirable effect of retaining edges to some extent.
example.
This Simple aver
filter can also abege filtey
line) removal. For
to drop-out line (missing scan
ap lied
5 13 11|
12 4 9
8 6 14

The median filter finds the median pixel value. In the aforementioned
the median value for the above given set of grey-level values example, 8is
Thus the centre value of the window (4) is replaced by 8. (3,4,5,6,[8],9,11,12,14),
Mode filter The mode filter is primarily used to clean up thematic maps for presenta-
tion purposes, in that it replaces small island' themes by their larger, surrounding themes
This filter computes the mode of the grey-level values (the most frequently ocumig
grey-level value) within the filter window surrOUnding each pixel. For example

|5 3 3
3 3
3 4 5
Filtered pixel of filter window (3,3,3,3,3,4,5,5,5) is 3 (which occurs five times).
It is possible that a decision have to be made between two values with the same
it S
frequency of occurTrence. In this case, if the centre value is one of the tie values,
chosen. Otherwise, the first tie value encountered is chosen. For example,
Digital Image
5 3
Processing 337
1
3 2 3

5 4 5

Filtered pixel of filter window


thrice.
Neither.3 nor 5is in the centre (1,5,3position.
,3,2,3,5,4The,5) is insettheto top5. Pixelrow and pixel occur
asthe values are read, and so it is chosen as the mode5 value.
3
is
5

High-pass Filter High-pass filters do the


encountered first
appearance of fine detail in an
opposite of
low-pass filter and serveto sharpen
image. A
frequency.high-frequency
the effect
hasthe
of increasing spatial Just kernel, or high-pass kernel,
resulting from a low-pasS filter from the original subtracting
image can
the
low-frequency
image
quencies. High-frequency information allows us
either enhance
to isolate, or
high spatial fre-
high-frequency detail ;is by adding backto the amplify the local
detail. Iffthe amplified
ofthe high-frequency component extracted by the filter, then the image some multiple
blurredimage. For instance, consider the following kernel: result is asharper, de-
|-1 -1 -1|
-1 16 -1

-1 -1 -1|
bis kernel is used on a set of pIKels in
which arelatively low value is surounded
by higher values, the low value gets lower, as in the
BEFORE
AFTER
following:
204 200 197 204 200 197
201 106 209 201 9 209
198 200 210 198 200 210
Inversely, when the kernel is used on a set of pixels in which a relatively high value is
surrounded by lower values, the high value becomes higher, as in the following:
BEFORE AFTER
64 60 57 64 60 57
61 125 69 61 187 69
58 60 70 58 60 70
In either case, spatial frequency is increased by this kernel.
Edge Detection Filter Edge and line detection are important operations in digital image
processing.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 various fields such as
geology, for the detection of linear geologic structures. Zero-sum kernels are kernels in
which the sum of all coefficients in the kernel equals zero. A common type of edge
detection kernel is azero-sum kernel. In case of zero-sum kernel, the sum of the coefficients
338 Remote Scnsing and G7N

Sobel
Original image
Laplacian

Median
Smoothing High pass
Fig. 10.27 Original image compared with the outputs of
application several filter
is not used in the convolution equation (no division is performed).
is not defined. This generally causes the output values to be zeroin areas
since division
values are equal. low in areas of low spatial frequency, extreme in
where all
areas of
frequency. Therefore., a zero-sum kernel is an edge detector, which usually high
spatiaoutl ipa
or zeros out areas of low spatial frequency and creates a sharp contrast
frequency is high. The resulting image often contains only edges and zeros. Smowheroethesspatial
are examples of zero-sum kernels (Fig. 10.27):
|-1 -2 -1| 1 -1 -1 -1 -1|1
F0olowing
-1
Sobel= 0 0 02 0 -2 Prewitt = 0 0 01 0
2 1|| 1 0 -1
Horizontal Vertical Horizontal
Vertical
1 0 1 1 1
-4 1lor1 -8 1
Laplacian =|1
0 1 1|
Adaptive Filter Adaptive filters have kernel coefficients calculated for each window
position based on the mean and variance of the original DN in the underlying image. A
powerful technique for sharpening images in the presence of low noise levels is via an
adaptive filtering algorithm. Here we look at a method of re-defining a high-pass filer as
the sum of acollection of edge sharpening kernels. Following is one example of high
pass filter:

|-1 -2
-2 12 -2

-1 -2
DigitalImage Processing 339
Thisfiltercanbe re-written as sum of the eight edge-sharpening kernels as follows:

2
-2 1 0
0 0
0

0 0

2 -2 2
1
0 -1

these kernels can be


Adaptivefiltering using performed by filtering the image with each
and|then summing those outputs that
turn,
kernel,in added exceed a threshold. As a final step.
to the originalimage. This use of a
inthesense that it overcomes the directionality of anythreshold
resultis makes the
this single kernel filter adaptive
by combining the
resultsofffiltering with a
selection of kernels, each of
image.
which is tuned to an edge-sharpening
inherentin the
Domain Filter
10.10.6.2 Frequency
The Fourier transform of an image, as expressed by the amplitude spectrum is a break-
downoffthe image into its frequency or scale components (refer Section 10.11.5). Filter-
ing of these components is done using frequency domain filters that operate on the am-
plitude spectrum of an image and remove, attenuate or amplify the amplitudes in speci-
fied wavebands. The frequency domain can be represented as a2D scatter plot known as
a Fourierspectrum (or Fourier domain), in which lower freguencies fall at the centre and
progressively higher frequencies are plotted outwards.
Filtering in the frequency domain consists of the following three stens:
1. Fourier transform the original image and compute the Fourier spectrum.
2. Select an appropriate filter function and multiply by the elements of the Fourier
spectrum.
3. Perform an inverse Fourier transform to return to the spatial domain for display
purposes.

10.10.6.3 Crisp Filter


The crisp filter sharpens the overall scene luminance without distorting the inter-band
variance content of the image. This is a useful enhancement if the image is blurred due to
atmospheric haze, rapid sensor motion, etc. of the sensor.
The algorithm consists of the following three steps:
1. Calculate principal components (refer Section 10.11.2) of multi-bandinput image.
2. Convolve PC-1 with summary filter.
3. Retransform to RGB space (Faust 1993).
340 Remote Sensing and GIS

The logic of the algorithmis that the firstprincipal component (PC-1) of an imaee:
assumed tocontain the overall scene luminance. The other principal components reneeis
repre
tintra-scene variance. Thus, we cansharpen only PC- l and then reverse the princis
components calculation to reconstruct the original image. Luminance is sharpened
whereas variance is retained.

10.11 MAGE TRANSFORMATION


Image transformations typically involve the
manipulation of multiple bands of data,
whether from asingle multi-spectral image or from
acquired at different times (i.e., two or more images of the same afea
the same area acquired at multi-temporal image data) or from two or more inages
y image difterent spatial resolution (ie.,
muiti-resolution). Each

You might also like