Level 2 Help for MARSCORR

INP

First left eye image, then right eye image.

There is nothing actually requiring left/right order, other than convention.
If left/right is unclear (e.g. the images are not from a stereo camera) then
either order is acceptable.  If the output is used with MARSXYZ, the same
order must be used.


OUT

The line and sample disparity files.  If one filename is given, a two-banded
file is created with line disparity as band 1 and sample disparity as band 2.
If two filenames are given, two single-band files are created.  Line disparity
is in file 1, and sample disparity is in file 2.

See the main program help for output file contents and formatting.


MASK

Optional output file showing the coverage of tiepoints (correlated pixels),
in BYTE format.
 0 dn means the pixel could not be reached in order to be correlated.
   (i.e. there were no neighbors to supply an initial value, or TPTLIMIT
   was reached).
 128 dn means a correlation was successfully performed at this location.
 255 dn means a correlation was attempted at this location but it failed,
   usually because of low correlation quality.


OUT_QUALITY

Output quality file (optional): A REAL image containing the correlation
quality of each pixel attempted, from 0 to 1.  0 indicates either a
correlation failure unrelated to the QUALITY setting, or a pixel that was
not reached (the MASK output can distinguish).  Note that the file will
contain just a thin border of poor-quality pixels around each area,
because poor-quality pixels prevent the correlator from searching farther
in that direction.

This file could be used in conjunction with a very low quality setting
to allow correlation in low-quality areas, with the result filtered
afterwards using a higher quality (i.e. use the output quality file as
a mask).  However, this is somewhat dangerous, especially if there is
any kind of repeating pattern in the image - the correlator could get
"stuck" on the wrong match for the pattern.


BAND

The vicar image band number for the input images.  Defaults to 1


TEMPLATE

Correlation size.  Must be an odd number.  Defaults to 15 square.

If only one value is given, a square template is used.  If two values are
given, the first is the template height (line direction) and the second is
the template width (sample direction).  Rectangular templates that are
wider than they are tall should be useful for lander images.


SEARCH

Correlation search area.  Must be an odd number.  Defaults to 35 square.
SEARCH must be > TEMPLATE.  If SEARCH is only a bit larger than TEMPLATE
then many correlations will abort because they will be prohibited from
searching in promising directions. 

If only one value is given, a square search area is used.  If two values are
given, the first is the search height (line direction) and the second is
the search width (sample direction).  Rectangular search areas that are
wider than they are tall should be useful for lander images.

Note that SEARCH is not used for seed points, AMAX(2) is.  However, the
TEMPLATE parameter *is* used for seed points.


QUALITY

Minimum acceptable correlation quality.  Correlations with qualities below
QUALITY will be rejected. Qualities range from 0 (poor) to 1 (excellent).
Defaults to 0.6  


TPTLIMIT

Limit number of tiepoints to the first TPTLIMIT values.  Defaults to -1 which 
indicates that all points are to be acquired.  This limits the growth of
the search window around the seed point.  However, the gore-filling pass is
not constrained by TPTLIMIT.

If there are multiple seed points, TPTLIMIT represents an aggregate of all
correlated points, not ones derived from each seed point.


SEED

Starting tiepoint seed location.
In the order: left line, left sample, right line, right sample.

If SEEDFILE is specified, this parameter is ignored.


SEEDFILE

Specifies a file of tiepoints from the program MARSTIE.  These tiepoints are
used as seed points for MARSCORR.  Multiple seed points allows correlations
in areas separated from the rest of the image by large disparity displacements
or uncorrelateable areas such as undifferentiated sand.

See also SEEDPAIR.


SEEDPAIR

Specifies which image numbers to use from the SEEDFILE.  Normally, MARSTIE
will be run on a single pair of images only, in which case SEEDPAIR can be
defaulted (to (0,1)).  However, if the tiepoint file contains tiepoints for
many different image pairs, SEEDPAIR can be used to specify which image numbers
to use for this run of MARSCORR.  The numbers are 0-based and correspond to
the first two columns of the tiepoint file.


AMAX

Specifies the maximum template and search areas.  AMAX(1) is not very useful,
but AMAX(2) is used for seed point correlations as the search area (which is
always square).  An error is generated if TEMPLATE or SEARCH exceed the
AMAX limits.


MODE

Specifies which mode of the gruen correlator to use.

All correlations are performed using the gruen correlation routine.  See
the gruen documentation for details of the algorithm.  Seed points are
always correlated using mode 3 (linear followed by amoeba) to handle large
offsets.  The rest of the points may be correlated using any gruen mode
via the MODE parameter:

linear:            gruen mode 0
annealing:         gruen mode 1
amoeba:            gruen mode 2
linear_amoeba:     gruen mode 3
annealing_amoeba:  gruen mode 4
amoeba2:           gruen mode 5
linear_amoeba2:    gruen mode 6

Of the above, only amoeba and amoeba2 (modes 2 and 5) are recommended.  The
others are provided only for experimentation, and may significantly increase
the execution time of the program.  The annealing modes are not fully
implemented in the code at this time, but it would be trivial to do so if
desired.

The amoeba mode uses a full 6 degree of freedom search from the starting point
(derived from the best neighbor).  The starting point must be within 2 pixels.
The amoeba2 mode uses only 2 degrees of freedom (x/y offsets only) so it will
be faster, at the possible expense of accuracy.  The starting point must also
be within 2 pixels.  amoeba2 is not recommended for images that are not derived
from a stereo camera, e.g. using different instruments or involving motion
between the two frames.  The other modes generally do not have a 2 pixels
starting point limitation, so they might be useful for scenes with wildly
varying disparity values.  However, they are so slow that it will usually be
better to supply multiple seed points in each area using MARSTIE.


DATA_SET_NAME

The DATA_SET_NAME typically identifies the instrument that acquired the
data, the target of that instrument, and the processing level of the data.
This value is copied to the output label, property IDENTIFICATION,
keyword DATA_SET_NAME.


DATA_SET_ID

The DATA_SET_ID value for a given data set or product is constructed
according to flight project naming conventions.  In most cases the
DATA_SET_ID is an abbreviation of the DATA_SET_NAME.
This value is copied to the output label, property IDENTIFICATION,
keyword DATA_SET_ID.


RELEASE_ID

When a data set is released incrementally, such as every three months during
a mission, the RELEASE_ID is updated each time part of the data set is released.
For each mission(or host id if multiple spacecrafts), the first release of a data
set should have a value of "0001".
This value is copied to the output label, property IDENTIFICATION,
keyword RELEASE_ID.


PRODUCT_ID

Specifies a permanent, unique identifier assigned to a data product by
its producer. Most commonly, it is the filename minus the extension.
This value is copied to the output label, property IDENTIFICATION,
keyword PRODUCT_ID.


PRODUCER_ID

Specifies the unique identifier of an entity associated with the
production of a data set. This value is copied to the output label,
property IDENTIFICATION, keyword PRODUCER_ID.


PRODUCER_INST

Specifies the identity of a university, research center, NASA center or other
institution associated with the production of a data set.
This value is copied to the output label, property IDENTIFICATION, keyword
PRODUCER_INSTITUTION_NAME.


TARGET_NAME

Specifies a target.  The target may be a planet, satelite, ring, region, feature,
asteroid or comet.  This value is copied to the output label, property
IDENTIFICATION, keyword TARGET_NAME.


TARGET_TYPE

Specifies the type of a named target. This value is copied to the output
label, property IDENTIFICATION, keyword TARGET_NAME.