Uploaded by felicityfanelo

GMA220 SUT5 Image Enhancement 19 20April2021FN

advertisement
Image Enhancement
(CH8)
SUT 5
Jensen, J.R., 2005. Digital image processing: a
remote sensing perspective. Upper Saddle River,
NJ: sPrentice Hall.
Jensen, 2016
Outline of Topics
•
•
•
•
Contrast Stretching
Frequency Filtering
Edge Enhancement
Vegetation Indices
Integer Image
Reduction (2 x 2)
•
•
•
•
•
Instead of viewing the entire image, one
would only want to locate the row and
column coordinates of a sub-image
(encompassing the study area)
Reduces the size of the original image
dataset down to a smaller dataset (that can be
viewed on the screen at one time for
orientation purposes)
Starting from first row (ith ) and column (jth ),
the corresponding brightness value (BV) is
extracted. Thereafter, in that ith row, j’s
position increments by 2, extracting every
2nd BV to the end of that particular row (ith )
…i’s position increments by 2, and then j starts
again from the first column, extracts the
corresponding BV. j’s position increments by
2, extracting every 2nd BV to the end of that
particular row (ith )
The extracted BV’s form a reduced image
following a 2 x 2 reduction image reduction
Before 8 x 8 Integer Image reduction
-
Original columns: 6464
Original rows: 6464
After 8 x 8 Integer Image reduction
-
Displayed columns: 808
Displayed rows: 808
2004
Integer Image
Magnification (2 x 2)
•
•
•
Each BV of a pixel (m) in the original image,
is replaced by an m x m block of pixels, with
the same BV as the original input pixel
Image magnification often referred to
zooming-in; enlarges the scale of an image
(to match the scale of another image)
Useful technique when trying to obtain
detailed information about the characteristics
of a small geographic area of interest
Common interface
in ENVI
Integer Image
Magnification
Useful technique when trying to obtain
detailed information about the
characteristics of a small geographic area
of interest
2004
Integer Image
Magnification
Useful technique when trying to obtain
detailed information about the
characteristics of a small geographic area
of interest
2004
Contrast Enhancement
•
The process of contrast enhancement attempts to adjust the radiometric resolution of
the image to the capabilities of the display system
•
Contrast enhancement is required when the range of image values does not match
number of brightness values available for display
•
Contrast enhancement can be defined by the DN range (min, max) or any other
measure of image variability e.g., standard deviation
•
E.g., low contrast is when there is not much difference between light 2004
and dark tones
Contrast Enhancement
•
E.g. some scenes are composed of BVs that do NOT use the full sensitivity range of
the detector such as BVs ranging from 0 – 100 where Landsat TM detectors provide
BVs of 0 – 255
•
To improve/ enhance the contrast, it is desirable to use the entire brightness range of
the display.
•
Materials reflecting similar amounts of radiant flux throughout the visible, NIR and
MIR results in relatively low contrast
•
An additional factor in the creation of low contrast imagery is the sensitivity of the
detector
2004
Linear Contrast Enhancement:
Minimum- Maximum Contrast Stretch
•
•
Expands the original input BVs to make use of the total dynamic range or sensitivity
of the output device/ sensor
Analyst first examines the image statistics and determines the minimum and maximum
BVs in band k
BVout
105
 BVin  min k
 
 max k  min k

quant k

where:
- BVin is the original input brightness value
- quantk is the full range of the brightness values
that can be displayed (e.g., 255),
- mink is the minimum value in the image,
- maxk is the maximum value in the image, and
- BVout is the output brightness value
BVout
BVout
 4in  4 min 
255  0
 
 105max  4 min 
 105in  4 

255  255
 105  4 
The calculated BVs of 0 and 255
represents the new range (new
min, max) which the intermediate
values between 4 and 105 would
be linearly stretched (BVout) to lie
within the new range
Linear Contrast Enhancement:
Percentage linear and Standard deviation Contrast stretching
•
•
Analyst specifies mink and maxk that lie a certain percentage of pixels from the mean
of the histogram. This is called the percentage linear contrast stretch
If the percentage selected coincides with the standard deviation percentage, the it is
called the standard deviation contrast stretch…which follows the “68-95-99” empirical
rule
For normal distributions, 68% of the
observations (BVs) lie within ±1
standard deviation of the mean, 95,4%
of the observations lie within ±2
standard deviations and 99,73% lie
within ±3 standard deviations
New min
Original min
New max
Original max
E.g., Applying a ±1 standard deviation
contrast stretch to the Charleston
Landsat 5 TM band 4 resulted in
mink =12 and maxk =43. All values
within 12 and 43 would be linearly
stretched within 0 to 255
 BVin  min k
BVout  
 max k  min k

quant k

Original
Minimummaximum
+1 standard
deviation
Contrast Stretch of
Charleston, SC Landsat
Thematic Mapper Band 4 Data
Stretches the original min and max BVs
to lie within the full range of the detector
Stretches the min and max BVs at ±1 standard deviation
of the mean
to lie within the full range of the detector
2004
Non-linear contrast enhancement: Histogram
Equalization
• Aim: to reduce the contrast in the very light or very dark
parts of the image associated with the tails of a normally
distributed histogram.
• Simple to implement
• Only requires the user/ analyst to specify 1) number of
classes desired and 2) number of bands to be equalized
•evaluates the individual brightness values in a band of
imagery and assigns approximately an equal number of
pixels to each of the user-specified output gray-scale classes
(e.g., 32, 64, and 256).
Statistics for a 64 x 64 Hypothetical Image
with Brightness Values (BVs) from 0 to 7
(Step 3)
(Step 1)
(Step 2)
E.g. consider hypothetical image composed of
64 rows x 64 columns = 4096 no. of pixels with
Available BVs from 0 – 7 (quantk = 2^3 bits)
Step 1: determine frequency of occurrence of
the individual BVs
Step 2: determine probability/ frequency of
occurrence or percent occurrence of the individual
BVs
Translation of BVs
Into probabilities
4096 total
Step 3:
Translate BVs into probabilities
Relative
Frequency
The computed frequency of occurrence and
probability of occurrence of the BVs gives an
indication of as to whether the (raw) image
histogram has low/high BVs resulting in a
relatively low/high contrast
Histogram Equalization
(Histogram of BVs)
Translation of BVs into probabilities
Compute “Cumulative probability” of the BV
frequencies
Cumulative probability
of BV frequencies
(790/n) = 0.19
(1813/n) = 0.44
(2663/n) = 0.65
(3319/n) = 0.81
(3648/n) = 0.89
(3893/n) = 0.95
(4015/n) = 0.98
(4096/n) = 1
Running
Total of
Of frequencies
Statistics of How a a 64 x 64 Hypothetical Image with
Brightness Values from 0 to 7 is Histogram Equalized
New set of BV classes
Step 4: compare the cumulative
frequency with the closest BV
probability of each class
Step 5: Assign new class
to the original BVs.
NEW CLASS ASSUMES THE
FREQUENCY of the orig BV
985
985
Reduced the contrast in the
very light or
very dark parts of the
image
Band Ratioing
• Band ratioing is mainly applied to discriminate between different targets (e.g.
soil and vegetation) or enhance the spectral signal of the target material while
suppressing that of the unwanted target(s).
BVi , j ,ratio 
BVi , j ,k
BVi , j ,l
where:
- BVi,j,k is the original input brightness value in band k
- BVi,j,l is the original input brightness value in band l
- BVi,j,ratio is the ratio output brightness value
• Often, differences in brightness values from identical surface materials are
caused by topographic slope and aspect, shadows, atmospheric attenuation,
seasons changes, and/or sun and sensor geometry.
• Band ratio can be applied to reduce the severity of such effects
Class exercise (not for marks)
•
Refer to the provided table below showing the brightness values for different land
cover types per spectral band, and answer the questions that follow:
Forest
Water
Corn
Pasture
Ultra-voilet
(UV)
Blue
Green
Red
28
22
53
40
29
23
58
39
36
19
59
42
27
13
60
32
NearInfrared
(NIR)
56
8
71
62
Question 1: Redraw the table above with brightness values translated into percentages, and
derive a spectral curve for the different land cover types. (10)
Question 2: Which spectral band(s) is the most useful for clearly discriminating between:
i)
Forest and Water,
ii) Water and Corn,
iii) Corn and Pasture,
iv) Water and Pasture,
v) Forest and Pasture land cover types? (5)
Band Ratioing
of Charleston,
SC Landsat
Thematic
Mapper Data
2004
Tsela (2011)
Know which bands are affected the most by each target
•
•
•
•
NDVI range of values is from -1 to +1
Healthy vegetation generally falls in values
> +0.5
SR range of values is from 0 to more than 30
Healthy vegetation generally falls between
values of 2 to 8
Know when to use which index
Spatial Filtering to Enhance Low- and
High-Frequency Detail and Edges
Requires that you look at the local (neighboring)
pixel BVs rather than just an independent pixel
value
A characteristics of remotely sensed images is a2004
parameter called spatial frequency, defined as the
number of changes in brightness value (BV) per
unit distance for any particular part of an image.
Spatial Filtering to Enhance Low- and
High-Frequency Detail and Edges
Spatial filtering in remotely sensed imagery may be
enhanced or subdued using two different approaches:
- Spatial convolution filtering based primarily on the
use of convolution masks, and
- Fourier analysis which mathematically separates an
image into its spatial frequency components
2004
Spatial Convolution Filtering
First is to know the size of the neighborhood
convolution mask or kernel (n) is usually 3 x 3, 5 x 5, 7
x 7, or 9 x 9.
Spatial Convolution Filtering
The size of the neighborhood convolution mask or
kernel (n) is usually 3 x 3, 5 x 5, 7 x 7, or 9 x 9.
We will constrain our discussion to 3 x 3 convolution
masks with nine coefficients, ci, defined at the
following locations:
Mask template =
c1 c2 c3
c4 c5 c6
c7 c8 c9
1 1 1
1 1 1
1 1 1
Replaces the value of the center pixel in the original image
Spatial
Moving window
Spatial Convolution Filtering
The coefficients, ci, in the 3 x 3 convolution mask are
multiplied by the following individual brightness
values (BVi) in the input image:
c1 x BV1 c2 x BV2 c3 x BV3
Spatial
Mask template = c4 x BV4 c5 x BV5 c6 x BV6 Moving
window
c7 x BV7 c8 x BV8 c9 x BV9
The primary input pixel under investigation at any one time
is BV5 = BVi,j (usually it’s center pixel in any given window
in the original image)
Spatial Convolution Filtering:
Low Frequency Filter
 9

  ci x BVi 

LFF5,out  int  i 1


n




 BV1  BV2  BV3  ...BV9 
 int 

9


Replaces the BV for every center pixel in the original
image of a moving window (e.g. 3 x 3)
1
1
1
1
1
1
1
1
1
Coefficients ci in the Low frequency
convolution mask are usually set to 1
Suppresses high-frequency detail;
2004
Result in blurred images, especially in heterogeneous areas
Low Pass
Filter…concept
Replaces the BV for every center pixel in the
original image of a moving window (e.g. 3 x 3)
3
Suppresses high-frequency detail;
27
9
Result in blurred images, especially in
heterogeneous areas
4
36
45
5
9
9
2004
Low-frequency filter: scene example
Suppresses high-frequency detail
Result in blurred images
Spatial Convolution Filtering:
High Frequency Filter
High-pass filtering is applied to imagery to remove the slowly varying components and
enhance the high-frequency local variations.
One high-frequency filter (HFF5,out) is computed by subtracting the output of the lowfrequency filter (LFF5,out) from twice the value of the original central pixel value, BV5:
HFF5,out  (2 x BV5 )  LFF5,out
Twice the value of
the original
Central Pixel Value
Output of
Low-frequency
filter
The High-frequency filtered image will have a relatively narrow intensity histogram
2004
Output from High-frequency filtered image often must be contrast stretched
prior to
visual analysis
High-frequency filter: scene example
• Enhance high-frequency local
variations
• Contrast stretched
Spatial Convolution Filtering:
Minimum or Maximum Filters
Examine BVs of adjacent pixels in a user-specified
region (e.g. 3 x 3) and replace the value of the center
pixel with minimum or maximum value encountered.
Olympic Filter
Named after system of scoring in Olympic events
E.g. in a 3 x 3 matrix, the highest and lowest are
dropped, and the remaining values are averaged
Spatial Convolution Filtering:
Unequal-weighted smoothing Filter
0.25 0.50 0.25
1
1
1
0.50
0.50
1
2
1
0.25 0.50 0.25
1
1
1
1
Minimizes the salt-and-pepper effect
2004
Coefficients ci in the Low frequency
convolution mask are usually set to 1
d. Olympic filter
Download