Retrieves the average radiometric value of point using a specified kernel grid size.
Reads an image based information system (IBIS) tabular file for line,sample locations and calculates the average radiometric value of these locations from the input image using a specified kernel grid size and increment value.
- IN
- Input image. The input image from which the radiometric values are calculated. This parameter expects only one image band; therefore, if IN is assigned to a multi-band image, the band option must be used to select only one band. No windowing is allowed.
- INFILE
- Input file. This is an IBIS tabular file that contains the point locations at which the average radiometric values are calculated. This file is also used as the output of these average radiometric values.
- LINECOL(9)
- Line column. The column of the tabular file that contains the line locations at which the average radiometric values are calculated.
- SAMPCOL(10)
- Sample column. The column of the tabular file that contains the sample locations at which the average radiometric values are calculated.
- OCOLUMN(12)
- Output column. The column of the tabular file to which the average radiometric values are written.
- KERNDIM(10)
- Kernel dimensions. The size of the kernel grid used to calculate the average radiometric value. The size of the kernel grid cannot exceed 100 x 100. The size of the area sampled is equal to the product of the size of the kernel grid and each of the line and sample increment values.
- LINEINC(2)
- Line increment. The increment value of the kernel grid in the line direction. The size of the area sampled in the line direction is equal to the product of the size of the kernel grid and the line increment value.
- SAMPINC(2)
- Sample increment. The increment value of the kernel grid in the sample direction. The size of the area sampled in the sample direction is equal to the product of the size of the kernel grid and the sample increment value.
- THRVAL(100)
- Threshold value. When sampling a kernel if the number of pixels with a value of zero and/or if the number that lie outside of image is greater than the THRVAL value, OCOLUMN will contain a value of DEFVAL to signify that the input point has been rejected.
- DEFVAL(1)
- Default value. The default value that is placed in OCOLUMN when the number of pixels with a value of zero is greater than THRVAL.
After IN.DAT and INFILE.DAT are opened, columns 8 and 9 of INFILE.DAT are read in one row at a time. These line,sample locations from columns 8 and 9 are used as the center of the 10 x 10 kernel grid. The grid point locations are every second pixel in both the line and sample directions. The grid, therefore, covers an 20 x 20 pixel area as shown in the following diagram.
Line location = 127.442: Sample location = 139.402:
For every kernel grid location that lies inside the image (marked with an X in the diagram), a bilinear interpolation of the radiometric values of the surrounding pixels are calculated. The average of these values is then written to column 11 of INFILE.DAT. After every row of the IBIS file is read in and the radiometric values are calculated, the files are closed and the completion message is displayed.
After reading the parameters, IN and INFILE are opened. For each row in INFILE, the line and sample locations are retrieved. If these line,sample locations lie within the image, they are used to calculate the four outside corners of the kernel grid according to the kernel grid size and the line and sample increment. For each line,sample location of the kernel grid that lie within the image, a bilinear interpolation is used to calculate the radiometric value of this location. The average of all the kernel grid locations is then calculated and output to the correct column of the IBIS tabular file specified in INFILE. If the number of kernel grid locations that have a value of 0 and/or that lie outside of the image is greater than the threshold value, the value of DEFVAL is output to the correct column of the IBIS tabular file.After all the radiometric values are calculated and written to the IBIS tabular file, the files are closed and the completion message is displayed.
An error was encountered while closing the input file. The data may still be valid.
Windowing is not allowed in this function. Processing will continue using the full input image.
Only one band can be specified in the input image. Use the band option if the image is more than one band.
A fatal error was encountered during processing. The output file may or may not be valid, and processing is terminated. The message that is displayed immediately preceding this message is the specific error that was encountered.
The <XXXXXX> file could not be opened and processing is terminated. Verify that the <XXXXXX> file exists.