Help for RESYNC
PURPOSE:
RESYNC finds and removes horizontal line-to-line misalignment within images.
This is done by finding the displacement that has the highest line-to-line
correlation, and shifting the output image to force this displacement to be
zero. Only the first channel is used to compute displacements; the shifts
computed from the first input are applied to each subsequent channel. The
channels may be either in separate datasets, or in a single multichannel file.
Note that this algorithm produces output images somewhat larger than their
corresponding inputs.
OPERATION:
RESYNC uses the first input channel only when computing the displacements to
be applied when forming the output images. These displacements are computed
in the following manner:
(1) Each line (other than the first line) is compared to the previous
line by computing the sum of all the line-to-line pixel
differences. Since image edges sometimes contain engineering or
fill data, which would be undesirable to include in the computation,
an IGNORE parameter has been provided. The 'IGNORE' number of pixels
on both sides of the image are excluded from the computation.
(2) The previous computation is repeated for all possible shifts, left
and right, up to the search limit specified by the parameter 'SEARCH'.
(3) The shift corresponding to the smallest computed value (the most
highly correlated shift) is considered the correct shift, and is saved
in a table.
(4) In some cases, it is known that the resync'ing should be performed
only after every nth line. To accomodate this, there is a MODULO
parameter. The user specifies a value (say, 16 for raw TM data),
and the program computes which of the n (16 in our example) possible
resync'ing set locations is most commonly shifted. The program then
rejects shifts that occur which are not part of the most common set
of n (16) apart shifts. The default is to accept all shifts.
Once the table of displacements has been completed, each of the inputs is
corrected, in sequence. All fill pixels are filled with the value of zero.
Note that the VICAR labels of all outputs will originate from the VICAR label
of the first input (This is the VICAR convention for label handling.), and
labels denoting channel numbers or channel unique processing will be incorrect
for all channels other than the first input. Note also that the output images
will be wider than the input images by an unpredictable amount. RESYNC
reports the width of the outputs.
WRITTEN BY: Ron Alley, September20, 1994
COGNIZANT PROGRAMMER: Ron Alley
REVISION: 1, 3 October, 1994
PARAMETERS:
INP
Input image file name(s)
OUT
Output image file name(s)
SIZE
Standard VICAR size field
SL
Starting line
SS
Starting sample
NL
Number of lines
NS
Number of samples
SEARCH
Maximum possible offset
IGNORE
Ignore this # of edge pixels
MODULO
Resync only at intervals of
this length.
See Examples:
Cognizant Programmer: