Home
About Isis
Support
Download

Isis 3

Documentation
Tutorials
Technical Documents

Isis 2

Documentation
Tutorials
Technical Documents

Search

USGS

Isis 3 Application Documentation


equalizer

Printer Friendly View | TOC | Home

Tone matches cubes prior to mosaicking

Overview Parameters Example 1

Description

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:

            newdn(s,l,b)   =   (olddn(s,l,b) - avg(b)) * MULT(b) + avg(b) + BASE(b)
        
where
            s = sample index
            l = line index
            b = band index
        

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).


Categories


Related Applications in Previous Versions of Isis

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 Edwards1994-05-24 Original version
Elizabeth Ribelin2005-06-25 Ported to Isis 3.0
Elizabeth Ribelin2005-10-04 Changed categoryItem to Photometry and Radiometry
Brendan George2005-11-07 Added application test
Elizabeth Miller2006-01-12 Made SD default contrast mode (PCA may have errors)
Jeff Anderson2007-07-16 Fixed memory leak
Jeff Anderson2008-04-09 Modified to solve system using QRD which is faster the SVD
Steven Lambright2008-05-12 Removed references to CubeInfo
Tracie Sucharski2008-06-12 Modified call LeastSquares Solve due to change to LeastSquares Solve method.
Travis Addair2009-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 Addair2009-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 Addair2009-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 Addair2009-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.

Parameter Groups

Files

Name Description
FROMLIST List of cubes to equalize
HOLDLIST List of filenames to hold
TOLIST The list of the equalized cubes to be created
OUTSTATS Output text file containing thorough equalization related statistics
INSTATS Input text file containing thorough equalization related statistics, used for applying correction

ProcessingOptions

Name Description
PROCESS Calculate statistics, apply correction, or do both

CalculationOptions

Name Description
ADJUST Algorithm type used to adjust the pixel values.
MINCOUNT Minimum number of points in overlap area required to be used in the solution
WEIGHT Weight overlaps
PERCENT Percentage of the lines to consider when gathering overall cube statistics and overlap statistics
X

Files: FROMLIST


Description

A list of map projected cubes to equalize. The Mapping groups must match in order to do the equalization.

Type filename
File Mode input
Close Window
X

Files: HOLDLIST


Description

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.

Type filename
File Mode input
Internal Default None
Filter *.txt *.lis *.lst
Close Window
X

Files: TOLIST


Description

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").

Type filename
File Mode input
Internal Default Automatic
Close Window
X

Files: OUTSTATS


Description

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.

Type filename
File Mode output
Internal Default None
Filter *.txt *.pvl *.lis *.lst
Close Window
X

Files: INSTATS


Description

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.

Type filename
File Mode input
Internal Default None
Filter *.txt *.pvl *.lis *.lst
Close Window
X

ProcessingOptions: PROCESS


Description

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.

Exclusions

  • HOLDLIST
  • OUTSTATS
  • ADJUST
  • MINCOUNT
  • WEIGHT
  • PERCENT

Inclusions

  • TOLIST
  • INSTATS
Close Window
X

CalculationOptions: ADJUST


Description

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.
Close Window
X

CalculationOptions: MINCOUNT


Description

If the number of points in the overlap area meets or exceeds this value, the area will go into the solution. Otherwise it will not be included.

Type integer
Default 1000
Close Window
X

CalculationOptions: WEIGHT


Description

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.

Type boolean
Default FALSE
Close Window
X

CalculationOptions: PERCENT


Description

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).

Type double
Default 100.0
Close Window

Example 1

Io Images Equalized

Description

This example shows the use of the equalizer application. The defaults are adjusting both the gain and offset in the Standard Deviation Fit Mode (SD).

Command Line

equalizer fromlist= ../FromList.lst holdlist= ../HoldList.lst
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.