Help for TPTEDT2

PURPOSE:
Batch editor for automated removal of erroneous vectors (tiepoints)
from a mark file produced by TRACKER3.
The equivalent interactive program is TPTEDT.

EXECUTION:

TPTEDT2 may be executed in the following manner:

                TRACKER3 INP=(LEFT,RIGHT) OUT=A
		TPTEDT2 INP=A OUT=B PARAMS

where INP, OUT, SIZE, AND PARAMS are parameters and are explained in their
respective parameter section.

PROPER USAGE:

This algorithm uses neighborhood vectors to predict behavior at a
point. For this to make any sense the vector spacing in TRACKER
must be LESS than the correlation size or less than the eddy size
in the medium being analyzed. Too coarse a spacing will just 
produce junk. Good results require hundreds of vectors.

The keyword BIAS is important. Make certain you understand it.

OPERATION:

Tptedt2 edits mark file tiepoints.  The input tiepoints are stored in
memory. Each tiepoint (reference) is analyzed in the following manner:

1. 4 points are selected. These are the nearest points in each quadrant
   surrounding the reference tiepoint (in the left image).

2. Optionally additional points are selected from the closest points
   in any direction until the total neighborhood points is NPTS.

3. A least squares fit is made relating the left and right images
   using the NPTS points (exluding the reference tiepoint).

4. The right position of the reference tiepoint is computed using the
   left base position and the polynomial coefficients.

5. The vector length is computed for the reference and predicted
   reference tiepoint.

6. The vector angle is computed for the reference and predicted
   reference tiepoint.

7. The reference tiepoint is deleted if:
   A)  It's length departs excessively from the predicted value.
       If Lr is the  vector length and Lp is the predicted
       length then the tiepoint is deleted if:
       abs(Lr-Lp)/(Lr+Lp+BIAS) > RANGE
   B)  It's angle deviates excessively from the predicted value.
       If Ar is the vector angle and Ap is the predicted
       angle then the tiepoint is deleted if:
       abs(Ar-Ap)*Lr/(Lr+BIAS) > ANGLE

   NOTE: The default case deletes a tiepoint if either of the above
         criteria are violated. The BOTH keyword requires both criteria
         to be violated for the point to be deleted.


Notes: If NPTS=4 then only the quadrant points are used. Border points
       may not have 4 quadrant points and will never be deleted.

       If NPTS=4 equal weight is given to each point in the polynomial
       fit.

       If NPTS > 4 the fit will be least squares using weighting. The
       weight = DISTANCE/(d+1)   where d=the distance of each point
       from the reference point in pixels.

       The polynomial is of the form:
       Y=Ax+By+Cxy+D
       X=Ex+Fy+Gxy+H

EXAMPLE:

	 TPTEDT2 INP=A OUT=B NPTS=7 DISTANCE=10. ANGLE=15. RANGE=.5

HISTORY:

ORIGINALLY WRITTEN BY: J Lorre 3/30/93
COGNIZANT PROGRAMMER:  Jean Lorre


PARAMETERS:


INP

STRING-input dataset.

OUT

STRING-output dataset.

NPTS

Number of fitted tiepoints.

DISTANCE

Weighting distance

LENGTH

Max vector length

ANGLE

Permitted angle deviation

RANGE

Permitted length deviation.

BIAS

Permitted length deviation bias.

BOTH

Both range and angle must be violated.

See Examples:


Cognizant Programmer: