USGS

Isis 2 Documentation


random Documentation

random - Transform image with random control
Uses up to 400 random control points to change the shape of an image.
These points are used in a least-squares fit to a polynomial equation
to create a transformation file (TFILE) for GEOM.  GEOM must be used to
actually transform the image.

PROGRAMMER: KEDWARDS

ParmDescriptionDefault
FROM
Input cube file name
NONE
TFILE
Transformation file
tfile.dat
CFILE
Control point file
""
OPT
Options: ROTA,LINE,LAT
LINE
DEG
Degree of polynomial to fit
(MAX=5)
1
ROT
Rotation (positive rotation is
clockwise)
0.
NL
Number of lines
0
NS
Number of samples
0

ADDITIONAL NOTES:

ParmDescription
FROM
This is the name of the cube file that is to be transformed.
If OPT=LAT is used, the cube labels must contain the mapping
parameters such as projection, map scale, etc.
TFILE
This is the name of the transformation file needed by GEOM.
After this program has finished, GEOM must be run to
actually transform the cube.
CFILE
The CFILE is the control point file created before running
RANDOM.  If this file is used, there must be a minimum of
2 points, but no more than 400 points.  This file must be
in the following format:

point number,input line,input samp,output line,output samp
EX:    1,10,1,15,30
                             or
point number,input line,input samp,output lat,output lon
EX:    1,10,1,-30.5,180
OPT
ROTA will rotate a cube the number of degrees given by ROT.

LAT will fit line and sample input to latitude and longitude
output. NOTE: the mapping parameters must be on the input
cube labels if this option is used.

LINE will fit line and sample input to line and sample
output.  If only two points exist in the control point file
(CFILE), a translation and rotation will be determined and
applied to the input cube.
DEG
The equation used to determine the number of control points
needed for each degree of fit is:

	NPTS=(DEG+1)*(DEG+2)/2

The equations that are used for a 1 degree fit are:

	X'=C(1)+C(2)*X+C(3)*Y
	Y'=C(4)+C(5)*X+C(6)*Y

If only two points exist in the control point file (CFILE),
a translation and rotation will be determined and applied to
the input cube for OPT=LINE only.  The maximum degree of fit
is 5.
ROT
This variable is used only when OPT=ROTA.  ROT is the number
of degrees in a clockwise direction to rotate the cube.  The
number of output lines and samples are calculated to include
the full input cube.
NL
The default is to calculate the number of output lines from
the input lines and the control points.  NL will override
the calculated output number of lines if used.  If NL is
used, NS must be input also.
NS
The default is to calculate the number of output samples
from the input samples and the control points.  NS will
override the calculated output number of samples if used.
If NS is used, NL must be input also.

Last updated: Jan 31 2005
File: pdfs2.html

Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov

ISIS Documentation Home Page