USGS

Isis 2 Documentation


lastjig Documentation

LASTJIG - Correct camera angles on the labels of a group of LAST images
"lastjig" uses the MATCH_POINT's from MATFILE, the corresponding
ground control coordinates from GRNDFILE, and the image
information from the PICFILE to correct selected point or
image values.  These files are created by the program lab2jig or
the photogrammetry workstation software (SOCET SET).

Because the photogrammetric equations used in lastjig are not linear, an
approximation to a linear least squares solution is used.  In order to
get the solution to converge when running "lastjig" on fewer than 6
images, you will MOST LIKELY need to hold an image.  At this point
"lastjig" only processes match points and writes the results to the
labels if the error tolerance is not exceeded.  It does not handle tie
points or update spice files.
************************************************************************

The MATCH_POINTs are sets of pointid, image_number, line, sample.  These
values are read from MATFILE.  The PICFILE contains the camera
offsets and toe-in angle for each camera, followed by a list of picture
information:  IMAGE_NUMBER, COMAZ, COMEL, CAMX, CAMY, CAMZ.  MATFILE
can be created by lab2jig or by a SOCCET set program.

The algorithm uses a linear least squares approximation to solve for the
command azimuth and elevation of the images and the LSC coordinates of
the MATCH_POINTS.  The current command azimuth and elevation and the
average of the LSC coordinates of the MATCH_POINTs are used as an estimate
in the first iteration.  A new set of azimuth and elevation angles for each
image and LSC coordinates is computed for each MATCH_POINT in each iteration
until a minimum is found for the errors on all images.

This program will update the command azimuth and elevation on the cube
labels if the error tolerance is not exceeded.

The program assigns a unique point index to match points,
because the image label point indeces are not unique (each image can
have a MATCH_POINT1).  "lastjig's" point indeces for the MATCH_POINTS
are always greater than 1000.  In addition to the point index, the program
lists the image_number and the measured line and sample for each point
on each image to the session log file, so they can be cross referenced
with the image labels.  The line and sample errors reported are in LEVEL
1 pixels at the resolution of the first input image.

Several preliminary steps must be performed before this program is used:

  1.  MATCH_POINTs must be identified and saved with TVIMP or SOCET SET.
      At least 3 MATCH_POINTs should be picked for
      every join, which means that each image could have as many as 12
      MATCH_POINTs.  These points should be as far apart as possible.

  2.  lab2imp and optionally SOCCET SET must be run to generate the
      MATFILE, GRNDFILE, and PICFILE.

  3.  All of the images or subimages must be on disk.

The diagram below shows the ideal spacing on 4 images for MATCH_POINTs
where:

  R=RAW_TIE_POINTs
  M=MATCH_POINTs

------------------------------------------------------------------------
|                               | M |                                  |
|                               |   |                                  |
|   R                           |   |                                  |
|                               |   |            R                     |
|                               |   |                                  |
|             R                 | M |                                  |
|                               |   |                                  |
|                               |   |                                  |
|                               |   |            R                     |
|                               |   |                                  |
|                               | M |                                  |
------------------------------------------------------------------------
|                               |   |                                  |
|   M          M             M  |   | M             M              M   |
|                               |   |                                  |
------------------------------------------------------------------------
|                               | M |                                  |
|                               |   |                                  |
|                               |   |                                  |
|                               |   |                                  |
|                               |   |                         R        |
|                               | M |                                  |
|    R                R         |   |                                  |
|                               |   |                                  |
|                               |   |  R                               |
|                               |   |                                  |
|                               | M |                                  |
------------------------------------------------------------------------

PROGRAMMER: Debbie A. Cook. U.S.G.S., Flagstaff, AZ

ParmDescriptionDefault
MATFILE
Match point file containing
list of measured line/samples
NONE
GRNDFILE
Ground point file containing
list of X,Y,Z coordinates in
LSC frame
NONE
PICFILE
File containing list of cube
files and the picture
information
NONE
GRNDFILE
Output ground point file
containing corrected list
of X,Y,Z coordinates in
LSC frame
NONE
PICOUT
File containing list of cube
files and the updated picture
information
NONE
GRNDOUT
File containing list of
updated X,Y,Z coordinates in
LSC frame
NONE
COMAZ
Command azimuth weight
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
-38
COMEL
Command elevation weight
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
-38
GROUND
Ground control point weight
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
0
MFX_ZOFF
Vertical offset (Z) from
Mars Surface Fixed to
LSC coordinates weight
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
LQUAT
Lander Quaternion weight
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
CTWIST
Camera head twist angle weight
   -- (NULL) do not use
  -38 solve (no weight)
  15 solve (hold)
--
DTWIST
Delta twist offset angle weight
   -- (NULL) do not use
  -38 solve (no weight)
  15 solve (hold)

The next 7 parameters set
the weights for specific
cameras and filters

--
CAMERA
Specify the camera for each
set of camera parameters to
be solved.
--
FILTER
Specify the filter for each
set of camera parameters to
be solved.
--
TOE_IN
Toe-in weight for each set
of camera parameters to solve
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
--
BERR
BERR weight for each set
of camera parameters to solve
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
--
FL
FL weight for each set
of camera parameters to solve
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
CENLINE
Center line weight for each set
of camera parameters to solve
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
CENSAMP
Center sample weight for each
set of camera parameters to
solve
   --  (NULL) do not use
  -38 solve (no weight)
   15 solve (hold)
TOL
Error tolerance
16.
ITERAT
Number of iterations for fit
5
PMATCH
Name of optional predict
matchpoint file
--
UPDATE
Update labels of input cube
files
NO
CAMDIR
Directory containing camera
definition file
--
CAMFILE
Camera definition file
--

ADDITIONAL NOTES:

ParmDescription
MATFILE
This is the name of a file containing a list of MATCH_POINT's.
Each row in the file is formatted as follows:

MATCH_POINT_ID IMAGE_NUMBER LINE_P SAMP_P

This file is created by qmatch or the photogrammetry
workstation
GRNDFILE
This is the name of a file containing a list of the
MATCH_POINT ID and Landing Site Cartographic (LSC) coordinates
of each point.
PICFILE
This is the name of a file containing a list of the camera
and picture information for each cube file.  The format is
START_TIME IMAGE_NUMBER
COMMAND_AZIMUTH COMMAND_ELEVATION
CAMERA_X CAMERA_Y CAMERA_Z in LSC coordinates
GRNDOUT
This is the name of an output file containing a list of
the MATCH_POINT ID and updated Landing Site Cartographic
(LSC) coordinates of each point.
PICOUT
This is the name of a file containing a list of the updated
camera and picture information for each cube file.  The
format is
START_TIME IMAGE_NUMBER
COMMAND_AZIMUTH COMMAND_ELEVATION
CAMERA_X CAMERA_Y CAMERA_Z in LSC coordinates
COMAZ
Enter the desired weighting factor of the command azimuth
in the fit.  A NULL value (--) indicates that the command
azimuth for each image will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
COMEL
Enter the desired weighting factor of the command elevation
in the fit.  A NULL value (--) indicates that the command
elevation for each image will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
GROUND
Enter the desired weighting factor of the ground control
points in the fit.  A NULL value (--) indicates that the
ground control points will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial values are held) may be entered to control the
convergence of the solution.
MFX_ZOFF
Enter the desired weighting factor of the Z-offset from Mars
Surface Fixed to LSC coordinates in the fit.  A NULL value
(--) indicates that the MFX_ZOFF for each image will not be
fit in the solution.  Otherwise a weight ranging from -38
(no weight) to 15 (the initial value is held) may be entered
to control the convergence of the solution.
LQUAT
Enter the desired weighting factor of the LANDER_QUATERNION
in the fit.  A NULL value (--) indicates that the LANDER_
QUATERNION will not be fit in the solution.  Otherwise a
weight ranging from -38 (no weight) to 15 (the initial value
is held) may be entered to control the convergence of the
solution.
CTWIST
Enter the desired weighting factor of the camera head twist
in the fit.  A NULL value (--) indicates that the camera
head twist will not be fit in the solution.  Otherwise a
weight ranging from -38 (no weight) to 15 (the initial
value is held) may be entered to control the convergence
of the solution.
DTWIST
The fixed delta twist will be added to the camera head twist
for the left camera and subtracted for the right camera.
Enter the desired weighting factor of the delta twist in
the fit.  A NULL value (--) indicates that the delta twist
will not be fit in the solution.  Otherwise a weight ranging
from -38 (no weight) to 15 (the initial value is held) may
be entered to control the convergence of the solution.
CAMERA
CAMERA and FILTER identify a set of camera parameters that
are to be solved by lastjig.  Up to 20 sets of camera parameters
mat be solved if enough match points have been provided.  Up to
five parameters may be solved for in each set:  TOE_IN, BERR,
FL, CENLINE, or CENSAMP.

For example, to solve for the TOE_IN of the left camera and
BERR of the right camera, both for filter 5, enter
		CAMERA(1)=IMP_L
		CAMERA(2)=IMP_R
		FILTER(1)=5
		FILTER(2)=5
		TOE_IN(1)=-38
		BERR(2)=-38

FILTER
The filter numbers for the camera parameters to be solved.  See
CAMERA for an example.
TOE_IN
Enter the desired weighting factor of the toe-in angle
for each corresponding CAMERA and FILTER.  A NULL
value (--) indicates that the TOE_IN for that CAMERA
and FILTER will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
BERR
Enter the desired weighting factor of the right camera
elevation error (relative to the left camera),
for each corresponding CAMERA and FILTER.  A NULL
value (--) indicates that the BERR for that CAMERA
and FILTER will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
FL
Enter the desired weighting factor of the focal length
for each corresponding CAMERA and FILTER.  A NULL
value (--) indicates that the FL for that CAMERA
and FILTER will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
CENLINE
Enter the desired weighting factor of the center line
for each corresponding CAMERA and FILTER.  A NULL
value (--) indicates that CENLINE for that CAMERA
and FILTER will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
CENSAMP
Enter the desired weighting factor of the center sample
for each corresponding CAMERA and FILTER.  A NULL
value (--) indicates that the CENSAMP for that CAMERA
and FILTER will not be fit in the solution.
Otherwise a weight ranging from -38 (no weight) to 15 (the
initial value is held) may be entered to control the
convergence of the solution.
TOL
If the error in lines or samples in LEVEL1 space on any one
of the images is greater than the tolerance set, none of the
values in the image labels will be updated.
ITERAT
This is the number of iterations that the program will
perform to make a "best fit".
CAMDIR
This directory will be pointed to when loading the camera
definition file.  The default is ISISIMPDATA.
CAMFILE
The camera definition file defaults to imp_camera.sav in
ISISIMPDATA.  An alternate file may be used, but should
follow the same format.

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