Home
About Isis
Support
Download

Isis 3

Documentation
Tutorials
Technical Documents

Isis 2

Documentation
Tutorials
Technical Documents

Search

USGS

Isis 3 Application Documentation


nocam2map

Printer Friendly View | TOC | Home

Map project a cube without a camera model

Overview Parameters

Description

This program will map project a raw instrument cube without a camera model. However, the lack of a camera model requires latitude/longitude information at each pixel in the raw cube. This must be facilitated through a latitude image and longitude image with the same size as the raw instrument cube.

The procedure to project the input cube is output driven. That is, we create an output map cube (as specified by the user) and at each output pixel, compute its projected latitude/longitude using the projection parameters. Using this coordinate we must search for that position in the two input cubes (latitude/longitude). If found, we will have a sub-pixel location that has a 1-1 correspondence with the raw instrument pixel. An interpolator (nearest neighbor, bilinear, or cubic convolution) is then used to compute a value for the output pixel.

Therefore the root of the problem is finding the latitude/longitude in the two input cubes as it is a 2-dimensional search. We do this by first creating two polynomial functions of a user-specified order (DEGREE), one for sample and one for line. These functions, f(lat,long) = sample and g(lat,long) = line, are dervied using a least-squares computation by collecting a sparse set of control points (line,samp)-to-(lat,long). The sparseness is controlled by the SINC and LINC. Unfortunately the polynomial is not accurate enough to supply the mapping to sub-pixel accuracy. The level of errors (between control points and the equations derived) can be written to the RESIDUAL file for examination.

To achieve sub-pixel accuracy, we use the polynomials to get us close (generally within 6 pixels). Using this estimated location, two affine transforms are computed by collecting a small 3x3 window of control points. These equations are used to further refine the estimated location. We iterate this process until our estimated sample/line is within an acceptable tolerance (TOLERANCE) of latitude/longitude values contained in the two cubes (LATCUB/LONCUB) or until the number of iterations is exceeded (ITERATIONS).

Defining the output map is controlled as follows:

  • ProjectionName - Should be specified by the map file
  • TargetName - Will be searched for in the FROM cube or can be specified by the user.
  • EquatorialRadius and PolarRadius- Will be automatically computed from NAIF kernels or can be specified by the user.
  • LatitudeType - Will be read from the map if available, otherwise will be set to the latitude type of the LATCUB
  • LongitudeDirection - Will be read from the map if available, otherwise will be set to the longitude direction of the LONCUB
  • LongitudeDomain - 0-360 by default.
  • MinimumLatitude - Can be computed from the LATCUB, read from the map file or user specified.
  • MaximumLatitude - Can be computed from the LATCUB, read from the map or user specified.
  • MinimumLongitude - Can be computed from the LONCUB, read from the map or user specified.
  • MaximumLongitude - Can be computed from the LONCUB, read from the map or user specified.
  • Scale or PixelResolution - Can be computed1 from the input, read from the map, or user specified in either meters/pixel (PixelResolution) or pixels/degree (Scale)

1To compute the scale we find the number of pixels from point (1, 1) to point (nsamples, nlines) in the input cube:
  sqrt[(nsamples-1)2 + (nlines-1)2]
 And the angle across this line:
  acos(cos(latitude_point1) * cos(latitude_point2) * cos(longitude_point1 - longitude_point2) + sin(latitude_point1) * sin(latitude_point2))
 The scale is equal to the number of pixels divided by the angle in pixels per degree.
      

Categories


History

Noah Hilt2008-08-01 Original Version

Parameter Groups

Files

Name Description
FROM Input cube to be mapped
LATCUB Input cube to read latitude values
LATTYPEThe latitude type
LONCUB Input cube to read longitude values
LONDIRThe longitude direction
TO Newly mapped cube

Polynomial Fit

Name Description
DEGREEDegree of polynomial functions
SINCSample Increment
LINCLine Increment
RESIDUALSFile to write residuals to
NOWARPSpecify whether or not to warp the image

Mapping

Name Description
MAP File containing mapping parameters
PIXRESDefines how the pixel resolution in the output map file is obtained
RESOLUTIONPixel resolution
TARGETThe target planet to map from/to
EQURADIUSEquatorial radius of target
POLRADIUSPolar radius of target

Output Map Ground Range

Name Description
DEFAULTRANGEDefines how the default ground range is determined
SLATStarting latitude
ELATEnding latitude
SLONStarting longitude
ELONEnding longitude

Affine Correction

Name Description
TOLERANCEGeometric tolerance in pixels
ITERATIONSThe number of iterations to meet tolerance

Interpolation

Name Description
INTERPType of interpolation
X

Files: FROM


Description

This will specify the raw instrument cube to be mapped.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: LATCUB


Description

The DN values from this cube will be used as the latitude values for the input cube, samples and lines must match the FROM cube.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: LATTYPE


Description

Specify the latitude type, either in planetographic or planetocentric coordinates.

Type string
Default PLANETOCENTRIC
Option List:
Option Brief Description
PLANETOCENTRICPlanetocentric Latitude Sets the latitude to be in planetocentric coordinates.
PLANETOGRAPHIC Planetographic latitude Sets the latitude to be in planetographic coordinates.
Close Window
X

Files: LONCUB


Description

The DN values from this cube will be used as the longitude values for the input cube, samples and lines must match the FROM cube.

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: LONDIR


Description

Specify the longitude direction, either positive east or positive west.

Type string
Default POSITIVEEAST
Option List:
Option Brief Description
POSITIVEEASTPositive East Longitude Sets the longitude direction to be positive east.
POSITIVEWESTPositive West Longitude Sets the longitudedirection to be positive west.
Close Window
X

Files: TO


Description

This file will contain the results of the remapping.

Type cube
File Mode output
Filter *.cub
Close Window
X

Polynomial Fit: DEGREE


Description

The order of the polynomial functions to compute sample/line from latitude/longitude.

Type integer
Default 3
Close Window
X

Polynomial Fit: SINC


Description

The number of samples skipped over when adding points to the polynomial functions.

Type integer
Internal Default Computed
Close Window
X

Polynomial Fit: LINC


Description

The number of lines skipped over when adding points to the polynomial functions.

Type integer
Internal Default Computed
Close Window
X

Polynomial Fit: RESIDUALS


Description

If a file is specified, residuals for each point (line, sample) are written to the file for examination.

Type filename
File Mode output
Internal Default none
Close Window
X

Polynomial Fit: NOWARP


Description

If set to true, the image will not be processed and warped, and will only calculate the polynomial fit with errors.

Type boolean
Default false
Exclusions
  • TO
  • MAP
  • PIXRES
  • RESOLUTION
  • TARGET
  • EQURADIUS
  • POLRADIUS
  • DEFAULTRANGE
  • SLAT
  • ELAT
  • SLON
  • ELON
  • TOLERANCE
  • ITERATIONS
  • INTERP
Close Window
X

Mapping: MAP


Description

A file containing the desired output mapping parameters in PVL form. This file can be a simple hand produced label file. It can also be an existing cube label which contains a Mapping group. You can produce map file using the "maptemplate" program.

Type filename
File Mode input
Default Path $base/templates/maps
Default $base/templates/maps/sinusoidal.map
Filter *.map *.cub
Close Window
X

Mapping: PIXRES


Description

This parameter is used to specify how the pixel resolution is obtained for the output map projected cube.

Type string
Default COMPUTE
Option List:
Option Brief Description
COMPUTECompute resolution from input cube This option will automatically determine the resolution from the input. The scale in pixels per degree is computed by calculating the angle from point (1,1) to point (nsamples, nlines) across the input cube and dividing the number of pixels across the line from point (1,1) to point (nsamples, nlines) by the angle.

Exclusions

  • RESOLUTION
MAPRead resolution from input map file This option will use either the PixelResolution (meters/pixel) or Scale (pixels/degree) in the map file.

Exclusions

  • RESOLUTION
MPP Get resolution from user in meters per pixel This option allows the user to specify the resolution in meters per pixel using the RESOLUTION parameter

Inclusions

  • RESOLUTION
PPD Get resolution from user in pixels per degree This option allows the user to specify the resolution in pixels per degree using the RESOLUTION parameter

Inclusions

  • RESOLUTION
Close Window
X

Mapping: RESOLUTION


Description

Specifies the resolution in either meters per pixel or pixels per degree

Type double
Minimum 0.0 (exclusive)
Close Window
X

Mapping: TARGET


Description

This will specify the target planet to map from/to, i.e. Mars, Venus, etc.

Type string
Internal Default Read from FROM cube
Close Window
X

Mapping: EQURADIUS


Description

The equatorial radius can be read using the NAIF routines to get the radius from the specified target planet, or read from the user.

Type double
Internal Default Read from PCK file
Minimum 0.0 (exclusive)
Inclusions
  • POLRADIUS
Close Window
X

Mapping: POLRADIUS


Description

The polar radius can be read using the NAIF routines to get the radius from the specified target planet, or read from the user.

Type double
Internal Default Read from PCK file
Minimum 0.0 (exclusive)
Inclusions
  • EQURADIUS
Close Window
X

Output Map Ground Range: DEFAULTRANGE


Description

This parameter is used to specify how the default latitude/longitude ground range for the output map projected image is obtained. The ground range can be obtained from the camera or map file. Note the user can overide the default using the SLAT, ELAT, SLON, ELON parameters. The purpose of the ground range is to define the coverage of the map projected image. Essentially, the ground range and pixel resolution are used to compute the size (samples and line) of the output image.

Type string
Default COMPUTE
Option List:
Option Brief Description
COMPUTE Compute default range from input cube This option will automatically determine the mininum/maximum latitude/longitude from the input camera model cube specified using the FROM parameter.
MAP Read default range from map file This option will read the mininum/maximum latitude/longitude from the input map file. All four values are expected to be defined.
Close Window
X

Output Map Ground Range: SLAT


Description

The minimum latitude of the ground range. If this is entered by the user it will override the default camera or map value. By default, planetocentric latitudes are assumed unless the MAP file specifies otherwise.

Type double
Internal Default Use default range
Minimum -90.0 (inclusive)
Maximum 90.0 (inclusive)
Close Window
X

Output Map Ground Range: ELAT


Description

The maximum latitude of the ground range. If this is entered by the user it will override the default camera or map value. By default, planetocentric latitudes are assumed unless the MAP file specifies otherwise.

Type double
Internal Default Use default range
Minimum -90.0 (inclusive)
Maximum 90.0 (inclusive)
Greater Than SLAT
Close Window
X

Output Map Ground Range: SLON


Description

The minimum longitude of the ground range. If this is entered by the user it will override the default camera or map value. By default, positive east longitudes in the range of 0 to 360 are assumed unless the MAP file specifies otherwise.

Type double
Internal Default Use default range
Close Window
X

Output Map Ground Range: ELON


Description

The maximum longitude of the ground range. If this is entered by the user it will override the default camera or map value. By default, positive east longitudes in the range of 0 to 360 are assumed unless the MAP file specifies otherwise.

Type double
Internal Default Use default range
Greater Than SLON
Close Window
X

Affine Correction: TOLERANCE


Description

When computing the sample/line to be mapped from input->output, the sample and line are determined from the polynomial fit function. The transform then calculates the pixel differences in stereographically projected latitude/longitude from the input at sample/line to the output's stereographically projected latitude/longitude. If this difference is greater than the tolerance, then an affine transformation is iteratively used until the difference is less than the tolerance or is set to null after a set number of iterations.

Type double
Default 1.0
Minimum 0.0 (exclusive)
Close Window
X

Affine Correction: ITERATIONS


Description

If the tolerance has not been met in the number of iterations specified, then the pixel is not mapped to the output.

Type integer
Default 10
Minimum 1 (inclusive)
Close Window
X

Interpolation: INTERP


Description

This is the type of interpolation to be performed on the input.

Type string
Default CUBICCONVOLUTION
Option List:
Option Brief Description
NEARESTNEIGHBORNearest Neighbor Each output pixel will be set to the pixel nearest the calculated input pixel.
BILINEARBi-Linear interpolation Each output pixel will be set to the value calculated by a bi-linear interpolation of the calculated input pixel.
CUBICCONVOLUTIONCubic Convolution interpolation Each output pixel will be set to the value calculated by a cubic convolution interpolation of the calculated input pixel.
Close Window