This program can be used to tonematch or equalize the brightness and/or
contrast of the input cubes prior to mosaicking.
All cubes must be in a common map projection as this program will use the
mapping information to gather statistics in overlapping areas. This is done on a
band-by-band basis as well. The statistics are used in a least squares solution
to determine multiplicative and additive corrections to each image. The user has
the option to stop the processing and examine the statistics and corrective factors.
Alternatively, the processing can continue and the corrective factors will be applied
to each image (by making sure the APPLY checkbox is ticked).
The actual equation to be used for each band in each cube is:
Prior to equalizing, the user can choose whether to adjust the brightness and/or contrast of the cubes.
The default is to adjust both, however, if the brightness (average) of all the cubes is the same,
then simply adjusting the contrast may suffice. Likewise, if the standard deviation of all the
cubes is similar, then a contrast adjustment is not necessary. Adjusting for contrast only implies
the offsets (BASE values) will be held to zero. Similarly, adjust for brightness implies the gains (MULT values)
will be held to one.
The BASE and MULT values are computed independently for each image, therefore we have two
least squares computations with N unknowns, where N is the number of cubes to be equalized.
The overlaps, M, between all the cubes are computed and in some cases M < N. This implies
an underdetermined system. The program will report an error if this occurs. You can hold one or
more cubes to alleviate this problem. Holding a cube forces MULT and BASE to 1.0 and 0.0,
respectively.
If the APPLY option is selected, the equalized cubes will be named the same as the input cubes
with the addition of a '.equ' prior to the '.cub' extension.
For the sake of efficiency, the user may choose to set the "sampling percent" to a value
less than its default of 100.0. By doing so, the program will likely perform its
statistic gathering noticeably faster, but at a potential loss of accuracy in the
results. It should also be noted that the user runs the risk of encountering an error
if by decreasing the sampling percent, the amount of valid data in their calculated
overlaps is less than the minimum set in the MINCOUNT field (default value of 1000).
Sampling percent must be a decimal between 0.0 (exclusive) and 100.0 (inclusive).
This application replaces the following
applications existing in previous versions of Isis, which have been deprecated
from the current version of Isis:
b4equal
equalizer
History
Kay Edwards
1994-05-24
Original version
Elizabeth Ribelin
2005-06-25
Ported to Isis 3.0
Elizabeth Ribelin
2005-10-04
Changed categoryItem to Photometry and Radiometry
Brendan George
2005-11-07
Added application test
Elizabeth Miller
2006-01-12
Made SD default contrast mode (PCA may have errors)
Jeff Anderson
2007-07-16
Fixed memory leak
Jeff Anderson
2008-04-09
Modified to solve system using QRD which is faster the SVD
Steven Lambright
2008-05-12
Removed references to CubeInfo
Tracie Sucharski
2008-06-12
Modified call LeastSquares Solve due to change to LeastSquares
Solve method.
Travis Addair
2009-03-12
Added user feedback during statistic gathering, modified existing progress
information, and moved error checking on number of bands and projection
parameters to be done prior to statistic gathering
Travis Addair
2009-06-24
Refactored for use with the new OverlapNormalization class, thus removing
the option to use the broken PCA contrast mode; the PVL output has been
modified to print all normalization information for a cube in one group
with OverlapStatistics information coming last in the file; added an
option to decrease the percentage of lines sampled in statistic gathering
Travis Addair
2009-07-17
Added a TOLIST parameter, allowing the user to specify a unique output
file name and location for each input file. The default is now to
place each output file in the same directory as its input file, not in
the current working directory.
Travis Addair
2009-07-30
Added functionality allowing the user to run the program applying
corrections based off of previously gathered statistics obtained from
the program's output PVL file. The output PVL has also been changed
from "PVL" to "OUTSTATS". Results will now be placed into the print
file.
List of cubes that are to be held in the equalization.
An additive and a multiplicative factor of 0 and 1 will be applied
to all cubes that were held. All cubes listed in this file must
also be contained in FROMLIST.
This list of output files should contain a file to correspond to each
input file. The output files will be written to the exact location
with the exact name specified unless it happens to be identical to
that of its corresponding input file, in which case an error will be
thrown. If this file is not specified, but the APPLY option is
still selected, the output cubes will be placed in the directory of
its input file, and named the same with the exception of ".equ"
extension (e.g. "foobar.cub" becomes foobar.equ.cub").
This file will contain the statistics of all of the overlapping areas
in every band along with the computed equalizing factors
(BASE and MULT). Specifying this output file is optional.
This file will contain the statistics of all of the overlapping areas
in every band along with the computed equalizing factors
(BASE and MULT). Specifying this output file is optional.
This option allows the user to decide whether they want to do the
equalization calculations and then go on to apply correction
afterwards, apply correction to the images off of previously
gathered statistics, or do the calculations but not apply
correction. If the APPLY option is not selected, you must
specify an OUTSTATS file. If it is selected you can still
optionally specify an OUTSTATS file and the MULT/BASE values
will be applied to each input cube. The names and locations of
the output cubes are specified by the TOLIST file.
Type
string
Default
BOTH
Option List:
Option
Brief
Description
BOTH
Calculate statistics and apply correction
This option will calculate statistics on the images,
then apply correction off of those results.
Exclusions
INSTATS
CALCULATE
Calculate statistics only
This option will calculate statistics on the images and
print them to an output PVL file, but not correct them.
Exclusions
TOLIST
INSTATS
Inclusions
OUTSTATS
APPLY
Apply correction only
This option will use previously generated statistics to
apply correction to the images.
Choose the fit option to select the algorithm to use to
adjust the pixel values. The BRIGHTNESS mode will equalize using only a offset/base
(the gain/multiplier will be set to 1.0), and the CONTRAST mode will equalize
using only a gain/multiplier (the offset/base will be set to 0.0). The BOTH option will equalize
using both a base and a multiplier. In most cases this
option will give you the best results.
Type
string
Default
BOTH
Option List:
Option
Brief
Description
BOTH
Adjust the Brightness and Contrast of the images.
This option will use an algorithm that equalizes
both the brightness and contrast of the images.
BRIGHTNESS
Adjust the Brightness of the images only
This option will use an algorithm that only equalizes
the brightness of the images. This option should be
used only if the variance/standard deviation of the
images is close.
CONTRAST
Adjust the Contrast of the images only
This option will use an algorithm that only equalizes
the contrast of the images. This option should only
be used if the brightness of the images are already
close.
This option allows the user to decide whether they want to weight the least squares solution based on how
large the overlap area is, or if they want no weighting at all.
The percentage of lines in each area to consider in the process
by line solutions to finding overall cube statistics and
overlap statistics. This value must be a decimal between
0.0 (exclusive) and 100.0 (inclusive).
Specify a list of Io images to equalize along with a holding list that enables the necessary
calculations to be performed. All other options are at default values.
Input Image
Mosaic of unequalized input images
Mosaic of the input images for equalizer
Parameter Name:
FROMLIST
This is a a small section of the input images for the equalizer example mosaicked together.
Output Image
Output image of mosaic showing results of the equalizer application.
Mosaic of the output images for equalizer
This is a small section of the equalized output images mosaicked together.