3. Stretches
Images used:
Description of mer_20040201 _algal1.dat
Download mer_20040201 _algal1.dat
(83 K)
Useful information:
Numerical data formats
Null values and missing data
|
The Bilko Stretch menu provides some automatic stretch options:
Auto Linear, Equalize and Gaussian stretches.
In this section you will use the MERIS algal pigment image to investigate
how these stretches work.
Clear the desktop (close all open files) and reopen
mer_rr_ 20040201_082314_algal1.dat.
Right-click on the image to open the Redisplay dialog and set the null value to 0.
From the menu bar open the Stretch Menu ( [ALT+S] ) and select Clear.
Checking the stretch options
Before you use the automatic stretches it is good practice to check the settings in the Stretch Options dialog (see
figure
(5K)).
Note:
If you do not set these options yourself, Bilko will carry out the stretch based on the settings from last time the box was opened.
Because these settings are saved from one session to the next they may have been set by a previous user.
Thus you cannot rely on the auto stretches to give consistent results unless you check when you start a Bilko session
that the settings conform to your preferred values.
From the menu bar open the Stretch Menu ( [ALT+S] ).
Note:
You may have noticed that the three automatic stretch options are not available (shaded pale grey) from the drop-down.
This is because no image area has been selected yet. Don't worry about this for the moment, you will get to that later in the section.
Select Options from the drop-down menu.
When the Stretch Options dialog opens, make sure the settings are as follows:
-
Auto-linear: Min%: 1, Max%: 99
-
Output levels: 256
-
Gaussian: Min: -3, Max: 3
-
Apply stretches: Un
Note:
In general these are useful default settings.
You may sometimes change them if you have reason to think it will enhance the display of a particular image or set of images.
You will look at the Stretch Options and the effect of changing them during the activities in this section. You can also read about them
in Bilko Help, select Stretch options dialog from the Help index.
The Autolinear stretch
An autolinear stretch performs an automatic linear stretch on the image.
It works in a similar way to the manual stretch document you have experimented with in the previous section,
with the exception that you do not set the position of the knees; these are fixed automatically by the software.
To determine the end-points (knees) of the stretch, Bilko first analyses the frequency distribution of the selected image area; if
no area is selected, the automatic stretches are not available.
Activity / Question 1
|
-
Select the whole area of the MERIS image ( [CTRL+A] )
-
Create a new histogram ( [CTRL+N] ) without stretches applied.
-
Make a copy of the image so you can compare this with the stretched display later on ( [CTRL+N] > [I] )
-
Activate the original image and open the Stretch Menu ( [ALT+S] )
- note how the automatic options are now available because an image area has been selected.
-
Chose Autolinear from the menu and watch how applying this stretch changes the appearance of the image.
-
Now create another histogram, this time with the new stretch applied.
-
Open the Stretch Menu and select View ( [ALT+S] > [V] ) to see the stretch function you just applied.
Examine the two images, the two histograms and the stretch document, and use them to answer the questions below.
|
|
a) |
How would you explain the changes in the image before after application of the autolinear stretch?
|
b) |
In the histogram of the display values after stretching, what percentage of pixels have
been given the display value 0 (black) and how many have been given the value 255 (white)?
How does this tie in with the settings in the Stretch Options dialog?
|
c) |
What will happen if you change
the AutoLinear settings in the Stretch Options dialog to Min% = 5 and Max% = 95 and then carry out a new autolinear stretch?
|
Before trying the next automatic stretch option, clear the stretch the latest stretch from the image,
and use Window > Close All Except to close everything except the MERIS image.
Equalize
The Equalize option applies what is known as a histogram equalisation to the image.
To see how this works, select the whole area of the MERIS image, open the Stretch menu and select Equalize to apply this option.
Activity / Question 2
|
Take a histogram of the new display (remember to apply stretches) and select View from the Stretch menu to
open the stretch document that has just been applied.
|
|
a) |
In the new histogram, what proportion of the pixels are contained within the following display value ranges:
0-50, 50-100, 100-150, 150-200, 200-250?.
|
b) |
What does this tell you about how the pixels have been distributed?
|
As you can see there are two peaks in the new histogram. The range of the first peak runs from 0 to 137.
Create a new histogram without the stretch applied
and use this to identify this peak in the underlying data.
|
c) |
What is the range of data values represented by the 0-137 peak seen in the histogram based on the image display?
What proportion of pixels is represented by this peak in each of the two histograms?
|
d) |
Within the low-chlorophyll peak, which bins in the frequency distribution of the original data have been spread most widely in the equalised display?
Which have been mapped closest together?
|
Gaussian
A Gaussian stretch works in a similar manner to histogram equalization, but the density distribution
in the output histogram is Gaussian rather than uniform.
Activity / Question 3
|
Take a copy of the image (do not apply stretches) and apply a Gaussian stretch to it.
Compare the results of this to the original image which should still be displayed with and Equalize stretch.
|
|
a) |
What are the main differences between the two images?
|
b) |
Compare the colour-bars and the stretch documents for each of these two images.
What does this tell you about the differences between these two automatic stretches?
|
c) |
What are the main differences between the histograms taken from the two displays?
|
As you have seen a Gaussian stretch makes greater use of the mid-range display values than the highest and lowest values
in the display range (fewer pixels are mapped to very dark and very pale grey). However, as in the other automatic stretches the output
spread over the whole available range of values.
In grey-scale image a Gaussian stretch can sometimes be more effective than a histogram equalization.
The human eye can distinguish subtle shades of grey more easily than it can distinguish between black and nearly black or white and nearly-white.
However, if features of interest fall in the range of values close to the mean of the distribution these may become less clear
as a result of a Gaussian stretch.
Activity / Question 4
|
You can change the Stretch Options for Gaussian Stretches so that the range of data values are spread more widely. Use the Stretch Option dialog with Bilko Help to help you understand the effect of changing the settings, and then answer the questions below.
Note:
You can do this either by reading about the Stretch Options dialog (use the Help Index to find this) or by using the context sensitive help system (place your cursor in an area of the dialog and press F1.)
|
a) |
What do the Min and Max settings in the Gaussian Stretch options specify?
|
b) |
What would be the effect on the display of the MERIS image of changing these settings to Min:-2 Max 3?
|
c) |
What would be the effect on the display histogram of reducing the number of output levels given in the Stretch Options dialog?
|
Verify your answer to 4c by changing the output levels to 128, 64 and 32, following each change by applying a
Gaussian stretch and then examining the resulting histogram.
|
d) |
What changes do the reduced output levels make to the Stretch function (select View from the stretch menu to check this)?
|
Note:
While experimenting to answer 4c and 4d you may have noticed that changing the output levels have a relatively minor effect on this image, untill
the number of levels became very small. This is not unusual. If you are planning to store a large number of GIF image displays or
use them on the Internet, changing the output levels could be a useful way of reducing their file size.
Be careful of reducing the output levels so much that the display suffers, however. Always compare different versions to the original
and choose the one with the lowest number of output levels that still displays the features of interest adequately.
|
Answers:
(Resizable pop-ups)
Answer 1
Answer 2
Answer 3
Answer 4
Back up to:
Q1
Q2
Q3
Q4
|
You may have wondered during your investigation of the different automatic stretches which is the best one to use.
The answer to this question depends both on the nature of the image, on the features of interest you want to display.
If in doubt the best option is to open the image and simply experiment until you find a stretch that works.
In the next section we will look at other examples of how to use the automatic stretches,including the use
of image subareas to help optimise the display of 16 and 32-bit data.
Before you continue:
-
reset all the stretch settings (select Stretch Options from the Stretch menu, and set the options in
the dialog as described at the top of this page), and
-
close all open windows in the Bilko workspace (select Close All from the Windows menu).
|