This program can be used to tonematch or equalize the brightness and
contrast of the input HiRISE cubes prior to mosaicking. The set of N
cubes inputed must be all Red, all Blue-Green, or all Infared, where N
is an integer 2-10 for RED sets and exactly 2 both for IR and BG sets.
The order the cube names are provided in does not matter, but the cubes
must all follow a linear sequence without skipping cubes all the same
(i.e., the user cannot run this application on cubes RED1-RED3 and RED5
without also providing the program RED4). Statistics are gathered by
line, taking into account the bin number of the cube (automatically
derived from the number of samples in the line). The statistics are
used in an IntersectionStatistics object's least squares solution to
determine multiplicative and additive corrections to each image. The
user has the option to stop the processing after the statistics and
corrective factors have been computed for examination. 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 cube is:
newdn(s,l) = (olddn(s,l) - avg()) * MULT() + avg() + BASE()
where
s = sample index
l = line index
The BASE and MULT values are computed independently for each image, therefore we have two
least squares computations with M unknowns, where M is the number of
cubes to be equalized. The intersections, O, between all the cubes are
computed and O < M should hold in all cases. In order for the
least squares equation to be solved, there must be at least as many
knowns as unknowns. Therefore, you must 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.