User's Guide

MRAD

Radiometrically corrects the from frame to match the to frame and mosaics the input frames as specified.

Function:

Radiometrically corrects the "from frame" to match the "to frame" and mosaics the input frames as specified.

Parameters:

Subcommand -GLOBAL:
Mosaics the two input images based on LAMS globals $OFFL and $OFFS.

FROMFRAM
From frame number. The frame number of the image that is radiometrically corrected to match the TOFRAM image.

TOFRAM
To frame number. The frame number of the image that FROMFRAM image is radiometrically corrected to match.

BAND
Band number. The band number of the two input images that are to be mosaicked.

PNTINC(100)
Point increment. Indicates how far apart to place the points that are to be added to the cutline. These points are added to the cutline in order that the function GETZVAL processes an adequate number of points.

KERNDIM(10)
Kernel dimensions. The size of the kernel grid used to calculate the average radiometric value for each point along the cutline. The size of the kernel grid cannot exceed 100 x 100. The size of the area sampled is equal to the the size of the kernel grid times two.

THRVAL(25)
Threshold value. When sampling a kernel in GETZVAL if the number of pixels with a value of zero is greater than the THRVAL value, a value of 25 is written to the tabular file to signify that the input point has been rejected.

INTLIM(-25,25)
Interpolation limits. The points whose delta Z values are within the INTLIM values are accepted and used to calculate the radiometric transformation grid.

NLGRID(--)
Number of lines per grid. The number of lines contained in each output grid cell. If NLGRID is NULL, the radiometric mapping grid size is set to the maximum and then reduced according to the TOLVAL parameter.

NSGRID(--)
Number of samples per grid. The number of samples contained in each output grid cell. If NSGRID is NULL, the radiometric mapping grid size is set to the maximum and then reduced according to the TOLVAL parameter.

SCALFACT(1)
Scale factor. The scale factor to be applied to the output images of GEOMZ and PMASK and to the output mosaic image of CONCAT.

OVEROPT(FROMFRAM)
Overlap option. The option as to which image values will take precedence in the overlap area of the final mosaic.


  = FROMFRAM: From frame image.  The "from frame" image
	      values will take precedence over the to
	      frame image values in the overlap area 
	      of the mosaic.
  = TOFRAM:   To frame image.  The "to frame" image 
	      values will take precedence over the 
	      "from frame" image values in the overlap 
	      area of the mosaic.

DELFLG(YES)
Delete flag. Specifies whether or not the temporary files should be deleted when the procedure completes or aborts.


  = YES:  Delete temporary files.  
  = NO:   Do not delete temporary files.
Subcommand -PROJCOORD:
Mosaics the two input images based on their projection coordinates. When this subcommand is specified, the globals $MOSNL and $MOSNS should contain the size of the output mosaic in projection distance.

FROMFRAM
From frame number. The frame number of the image that is radiometrically corrected to match the TOFRAM image.

TOFRAM
To frame number. The frame number of the image that FROMFRAM image is radiometrically corrected to match.

BAND
Band number. The band number of the two input images that are to be mosaicked.

PNTINC(100)
Point increment. Indicates how far apart to place the points that are to be added to the cutline. These points are added to the cutline in order that the function GETZVAL processes an adequate number of points.

KERNDIM(10)
Kernel dimensions. The size of the kernel grid used to calculate the average radiometric value for each point along the cutline. The size of the kernel grid cannot exceed 100 x 100. The size of the area sampled is equal to the the size of the kernel grid times two.

THRVAL(25)
Threshold value. When sampling a kernel in GETZVAL if the number of pixels with a value of zero is greater than the THRVAL value, a value of 25 is written to the tabular file to signify that the input point has been rejected.

INTLIM(-25,25)
Interpolation limits. The points whose delta Z values are within the INTLIM values are accepted and used to calculate the radiometric transformation grid.

NLGRID(--)
Number of lines per grid. The number of lines contained in each output grid cell. If NLGRID is NULL, the radiometric mapping grid size is set to the maximum and then reduced according to the TOLVAL parameter.

NSGRID(--)
Number of samples per grid. The number of samples contained in each output grid cell. If NSGRID is NULL, the radiometric mapping grid size is set to the maximum and then reduced according to the TOLVAL parameter.

SCALFACT(1)
Scale factor. The scale factor to be applied to the output images of GEOMZ and PMASK and to the output mosaic image of CONCAT.

OVEROPT(FROMFRAM)
Overlap option. The option as to which image values will take precedence in the overlap area of the final mosaic.


  = FROMFRAM: From frame image.  The "from frame" image
	      values will take precedence over the to
	      frame image values in the overlap area 
	      of the mosaic.
  = TOFRAM:   To frame image.  The "to frame" image 
	      values will take precedence over the 
	      "from frame" image values in the overlap 
	      area of the mosaic.

DELFLG(YES)
Delete flag. Specifies whether or not the temporary files should be deleted when the procedure completes or aborts.


  = YES:  Delete temporary files.  
  = NO:   Do not delete temporary files.

Examples:

  1. LAS> mrad-g fromfram=1 tofram=2 band=3 kerndim=20 pntinc=100 thrval=25 intlim=(-20,20) nlgrid=-- nsgrid=-- scalfact=5 overopt="fromfram" delflg="yes"

    Assuming that the LAMS globals $IMAGE = ("US1","US2") and $MOSIMG = "USA," CUTADD reads US1.XCT and adds points every 100 pixels along the cutline. The temporary file created by CUTADD is used by GETZVAL to calculate an average radiometric value (Z) for a 20 x 20 kernel grid that covers an area of 40 x 40 pixels for each point. If the number of pixels (sampled by the kernel grid) that are equal to 0 is greater than 25, the point is rejected. The Z values are calculated for both US13.XFR and US23.XFR. The difference between the Z values for each point of the two images is then calculated, and any point with a difference less than -20 or greater than 20 is deleted. The minimum, maximum, and average of the delta Z values are then calculated. FINITE uses these delta Z values to create a radiometric grid called US13.FINAL. US13.ZED is created by GEOMZ by applying the grid and the average delta Z value to US13.XFR. US13.ZED and US1.XCT are then used as the inputs to PMASK which masks the image locations that lie outside of the cutline creating US13.ZCUT. PMASK is also run on US23.XFR using US2.XCT as the cutline and creating US23.ZCUT. US13.ZED, US13.ZCUT, and US23.ZCUT will be scaled down by 5 as specified by SCALFACT. The final step is to mosaic US13.ZCUT with US23.ZCUT to create USA.MOSIAC. Since SCALFACT equals 5, the size of USA.MOSAIC will be 5 times smaller than the size specified by the LAMS globals $MOSNL and $MOSNS. As specified by OVEROPT, the pixel values of US13.ZCUT have precedence over the pixel values of US23.ZCUT in the overlap area of the mosaic. The temporary files will be deleted.

  2. LAS> mrad-p fromfram=1 tofram=24 band=3 kerndim=20 pntinc=100 thrval=20 intlim=(-10,10) nlgrid=500 nsgrid=500 scalfact=1 overopt="tofram" delflg="yes"

    Assuming that the LAMS globals $IMAGE = ("US1","US2") and $MOSIMG = "USA," CUTADD reads US1.XCT and adds points every 100 pixels along the cutline. The temporary file created by CUTADD is used by GETZVAL to calculate an average radiometric value (Z) for a 20 x 20 kernel grid that covers an area of 40 x 40 pixels for each point. If the number of pixels (sampled by the kernel grid) that are equal to 0 is greater than 20, the point is rejected. The Z values are calculated for both US13.XFR and USA.MOSAIC. The difference between the Z values for each point of the two images is then calculated, and any difference less than -10 or greater than 10 is deleted. The minimum, maximum, and average of the delta Z values is then calculated. FINITE uses these delta Z values to create a radiometric grid called US13.FINAL which has 500 pixels between each grid cell. US13.ZED is created by GEOMZ by applying the grid and the average delta Z value to US13.XFR. US13.ZED and US1.XCT are then used as the inputs to PMASK which masks the image locations that lie outside of the cutline creating US13.ZCUT. Since SCALFACT equals 1, US13.ZED and US13.ZCUT will not be scaled down. The final step is to mosaic US13.ZCUT with USA.MOSIAC to create USA.MOSIAC. The size of USA.MOSAIC will be the size specified by the LAMS globals $MOSNL and $MOSNS. As specified by OVEROPT, the pixel values of USA.MOSAIC have precedence over the pixel values of US13.ZCUT in the overlap area of the mosaic. The temporary files will not be deleted.

Description/Algorithm:

The FROMFRAM image has points added to its cutline at a specified increment. At each of these points an average of the radiometric values (Z) of the kernel grid is calculated for each image by GETZVAL. The difference between the Z values of the two images (delta Z) is calculated, and any points with a difference less than or greater than INTLIM values specified are deleted. The minimum, maximum, and average of the delta Z values are calculated. These points and their corresponding delta Z values are then input to FINITE in order to create a radiometric grid which has NLGRID X NSGRID pixels between each grid cell. This radiometric grid will be applied to the FROMFRAM image along with an offset equal to the average delta Z value using GEOMZ. PMASK is then called to apply the cutline to the FROMFRAM image. SCALFACT will be applied to the output images created by GEOMZ and PMASK and the output mosaic image. The two images are mosaicked together with the values of the image specified by OVEROPT to have precedence over the other image values in the overlap area.

After the mosaic of the two images has been created, it is renamed to ($MOSIMG)//".MOSAIC", and if specified, the temporary files will be deleted. Error Messages: Error messages are displayed from the called routines.

User Notes:

  1. Any changes made to the routines CMCOPY, CMDEL, CMRENAME, CUTADD, FINITE, GEOMZ, GETZVAL, IBIS2GBL, INSCOUNT, MERGE, MF, MGR2MTB, MTB2MGR, PMASK, ROWOP, and CONCAT may affect the operation of this routine.

  2. Related Large Area Mosaicking System (LAMS) procedure functions include MCTP, MCUT, MTIE, MEDIT, MCRN, MAVE, MGRID, and MGMAP.