GLT and Bowtie Correction Background
This topic describes the algorithm used to correct imagery that is georeferenced to a geographic lookup table (GLT). It also describes how ENVI removes artifacts associated with bowtie effects or missing data. This algorithm assumes that the imagery has a Geographic WGS-84 coordinate system.
- Choose a standard map output grid. This grid type must support a constant pixel size. The two supported map grids are Geographic WGS-84 and Polar Stereographic WGS-84.
- Estimate the median X and Y pixel sizes, using the center column and row from the GLT. This will determine the pixel size for the output map grid. IDL notation is used in the following examples. The SHIFT function shifts elements of vectors or arrays along a dimension by any number of elements. Positive shifts are to the right, while negative shifts are to the left.
- Compute the size of the grid, using the following IDL notation. The CEIL function returns the closest integer greater than or equal to its argument.
- Set the grid ground control point (GCP) as
[0, 0, MinX, MaxY]
. - Map all X and Y entries in the GLT to the output grid, excluding those that are flagged as "bad." If the image crosses the International Date Line, a value of 360 is added to X coordinates that are less than 0. This mapping can be represented as an index into the output grid.
- For each index in the output grid, find the matching mapped index values from the input raster and fill the output grid with valid pixels.
- At the end of this step, every grid point that can be directly filled using the "Column" equation (Step 5) will have been filled. Some output grid points may remain unfilled.
- For each empty grid location, find all valid filled grid points in a 3x3 kernel. If no valid values exist, try a 7x7 kernel. If no valid values exist, fill this grid point with a missing data value (-9999).
- If there are valid pixels in the kernel, fill the missing grid point with the distance-weighted value of the valid pixels. If the user selects the Nearest Neighbor interpolation method, fill the grid point with the single nearest neighbor.
PixelSizeX = Median(X(NumLines / 2) - Shift(X(NumLines / 2))
PixelSizeY = Median(Y(NumRows / 2) - Shift(Y(NumRows / 2))
Columns = Ceil((MaxX - MinX) / PixelSizeX)
Rows = Ceil(MaxY - MinY) / PixelSizeY)
Column = Round((X - MinX) / PixelSizeX))
Row = Round((Y - MinY) / PixelSizeY))
MappedIndex = (Rows - 1 - Row) * Columns + Column