Contrast
The
Contrast
operation is used to enhance the visual quality of the image
represented by a raster file.
The
available methods in TerraLib are:
- Linear:
The user defines
a new minimum and maximum values for the pixels in the image. The
algorithm then applies a linear function over the pixels using this 2
values.
- Histogram
Equalization:
Using this method, the histogram of the image will be equalized
automatically.
- Square:
The contrasted image will be created by using a square function.
- Square
Root: he contrasted image will be created by using a
square root
function.
- Log:
The contrasted image will be created by using a log function.
- Mean
and Standard Deviation:
The contrasted image will have a predefined mean and standard
deviation, defined by the user.
- Decorrelation
Enhancement: Uses the principal components to
contrast the image.
- Enhancement
2% cumulative: The
a new minimum and maximum values are extracted automatically using 2%
and 98% of the cumulative histogram. The
algorithm then applies a linear function over the pixels using this 2
values.
Select
a layer, draw it, then select this option in the main menu
PROCESSING → RASTER PROCESSING
→ CONTRAST:
- Layer:
it will be filled with the layer NAME visible in the map display.
Nothing else can be done until you select an area to apply the contrast.
- Histogram Area:
choose an area to apply the contrast
- Use All Image: all
image will be used, even if it is not visible.
- Use Visible area:
all visible area over will be considered.
- Use
ROI : Region
Of
Interest
- in this case draw a region over the layer.
- The Histogram shows the
histogram of the first band initially (default), or the histogram of
the band selected in Raster
Bands.
- The Input histogram
represents the
histogram of the selected band (blue).
- The
Output is the
resulting histogram if the contrast is applied with
other parameters (red) - initially it will not be visible.
- Changing
parameters: Use left and
right mouse button to set
the min
and max
gray value over the graphic area.
- Then
click on apply contrast to consider the new min/max value and check the
output
(red).
- Reset values to start
the contrast operation again. In this case select an area again over
the displayed layer.
- Raster
Bands:
select each band and observe the Histogram(graphic).
Now set the specific parameters which varies depending on the
contrast type chosen in 6. Double click over the
cell of each parameter to make the cell editable and then change the
value and press enter:
- If Linear, Square, Square
Root or Log: set the
new value for Minimum and/or Maximum,
- If Histogram
Equalization:
set the new value for Maximum,
- If Mean and Standard Deviation:
set the new value for Mean and/or Std Dev.
- If Decorrelation
Enhancement: no extra parameters is necessary.
- If Enhancement 2%
Cumulative: no extra parameters
is necessary.
- Data Type
Range:
it will be used to set the minimum and maximum values of data type
range in output image.
- Type:
Select
one of the available contrast type.
- Output: Click on the to inform the Directory and
output Layer name.
- Layer
Name -
the informed Layer name
will be displayed here.
- Press the OK
button to save the resulting contrasted raster image.
Hint:
The contrasted image will be added as a new layer at the
TerraView project.