Performs a vertical (brightness) rubber band sheet manipulation of an image according to the radiometric grid specified in INGRID.
Performs a vertical (brightness) rubber band sheet manipulation of an image according to the radiometric grid specified in INGRID.
- IN
- Input image. The input image may be BYTE, INTEGER*2, INTEGER*4, or REAL*4. Only one band may be processed at one time, and the starting line and starting sample of the input image must be one in order for the grid to be applied correctly.
- INGRID
- Input grid file. This file contains grid locations (line,sample) and corresponding brightness shift values that will be applied to the pixels of IN. A positive brightness shift value increases the value of each pixel, and a negative brightness shift value decreases the value of each pixel.
- OUT
- Output image. The output image will be the same data type as the input image. The size of the output image will be the size of the input image divided by SCALFACT.
- PIXVAL(0)
- Pixel value. The pixels which have this value are not changed. This is commonly used to preserve the value of those pixels which form the background of an image.
- SCALFACT(1)
- Scale factor. Scale factor to be applied to the input image and or the window option.
- OFFSET(0)
- Offset value. This value is added to each pixel value before the vertical manipulation of the image takes place. .var MINVAL Minimum value. The minimum pixel value allowed in the output image. If NULL is specified the output value will be the mimimum allowed by the data type of the image. .var MAXVAL Maximum value. The maximum pixel value allowed in the output image. If NULL is specified the output value will be the maximum allowed by the data type of the image.
OUT.DAT will be the same size and data type as IN.DAT because SCALFACT was defaulted to 1. GRID.DAT contains the radiometric grid values that are used to manipulate the brightness values of IN.DAT. Any pixel of IN.DAT that has a value of zero is left as a value of zero because PIXVAL was defaulted to 0.
OUT.DAT will be 171 (512/3) lines by 171 (512/3) samples and the same data type as IN.DAT. GRID.DAT contains the radiometric grid values that are used to manipulate the brightness values of IN.DAT. Any pixel of IN.DAT that has a value of 255 as specified by PIXVAL is left as a value of 255.
After reading the input parameters; IN and OUT are opened for read and write, respectively. INGRID is opened, and the line/ sample locations and brightness shift values are read. If the value of SCALFACT is greater than 1 (one), the window specifications are divided by SCALFACT and the input image is reduced by a factor of SCALFACT.The value of OFFSET is added to the pixel values of the image, and then these values are adjusted according to the tie points and brightness shift values given in INGRID. The tie points form a rectangular grid, and the pixel is adjusted according to the brightness shift value associated with the four tie points that enclose that pixel. If a point lies outside the grid, then the nearest rectangle of the grid is used to adjust the pixel value. If the adjusted pixel value is greater than maximum or less than the minimum allowed by the MINVAL and MAXVAL or the output data type, the pixel will have a value of MINVAL or MAXVAL or the maximum or the minimum allowed by the data type depending on what is specified for MINVAL and MAXVAL.
The vertical adjustment is bilinear interpolation of the brightness shift values (DN) of the four tie points that enclose a pixel. The formula is:
DN(output) = DN(input) + ax + by + cxy + d where x and y are pixel coordinates and a,b,c,d are constants chosen so that ^DN(k) = ax(k) + by(k) + cx(k)y(k) + d for k = 1,2,3,4 where x(k), y(k) are coordinate values and ^DN(k) is the brightness shift values of the four tie points the enclose the point x,y.For a single line, the DN increment per sample is given by b+cx. The starting values for subsequent lines are incremented by a+cy. Thus, the full solution is needed only at the upper-left corner of each rectangle and all other values are obtained by incrementing.
After every line is processed, all the files are closed, the history file is created, and the completion message is displayed.
An error was encountered while closing the input file. The data may still be valid.
An error occurred freeing dynamic memory. Contact the System Manager.
A nonfatal error was encountered during processing. Processing is NOT terminated. The error message that is displayed immediately preceding this message is the specific error that was encountered.
An error occurred allocating dynamic memory. Contact the System Manager.
Only one band may be specified in the input image. Use the band option if the image contains more than one band.
The data type of the image could not be accessed. Verify that the DDR file exists.
The number of <XXXXXXX> contained in the image is greater than the number of <XXXXXXX> that the grid was created for. Create a new grid with the correct number of <XXXXXXX>.
A fatal error was encountered during processing. The output image may or may not be deleted, and processing is terminated. The message that is displayed immediately preceding this error message is the specific error that was encountered.
A fatal error was encountered while processing the input matrix grid. Verify that the input grid is a uniform rectangular grid.
The <XXXXXXX> file could not be opened and processing is terminated. Verify that the <XXXXXXX> file exists.
The <XXXXXXX> file could not be read; and therefore, an output file cannot be created. Verify that the format of the file is correct.
The tie points contained within the INGRID file have to form an evenly-spaced rectangular grid.
An error occurred while trying to write to the <XXXXXXX> file. Check output parameter or the amount of free disk space.