NLT Landsat Processing Techniques
From World Wind Wiki
Here's the process that we've used to create the first version of the NLT Global Landsat 7 Mosaic (Visible Bands)
- By Chris Maxwell (Lead Developer, NASA World Wind)
1. We first download Landsat7 scenes (the ones that are marked as "Earthsat") from the Global Land Coverage Facility
Remarks: The scenes come as a set of grayscale GeoTiff files for each row/path/date scene
2. Next composite 3 bands to create an RGB GeoTiff image. For "visible" Landsat, it's bands 1 (Blue), 2 (Green), 3 (Red)
Remarks: I used PixelSense for this as I didn't want to have to write the code to create GeoTiffs, but PixelSense did apply a linear clip contrast stretch, so I had to "replace" the image data after PixelSense outputted the RGB GeoTiff.
3. Next apply color enhancement algorithm to RGB Landsat GeoTiff
Remarks: The basic idea for the algorithm I used is to divide the image into a grid with each grid square being n by n pixels, where n is about 25 for a 30meter/pixel Landsat scene. For each square, find the least-squares for both the "high" and "low", and then save this information in order to later apply a linear stretch of the pixels in that square, weighting the R, G, B bands individually to the desired tastes. I found that generally, the source Landsat scenes have too much blue and red, and I weight the stretch to compensate for this for a more pleasing image. Next, use a cubic convolution to smooth out the stretch information in the grid squares. This is only applied to the information in the grid squares, not the actual pixel data. I did this 3 times for increased smoothness, but it seems that some areas still needed more smoothing. Next, stretch the pixels in each square according to the new grid stretch information. I tried to smooth the differences between the squares again by using bi-linear averaging (I think that's what to call it) for the grid squares that surround the current square being processed.
4. Re-project the Landsat image from UTM to Geodetic projection.
Remarks: I used GDAL for this. It's free, fast, and gives decent results.
5. Mosaic and re-tile Landsat scenes to regular Geodetic grid squares
Remarks: I used ERMapper for this, with the ESG Utilities add-on. The idea here is that the Landsat scenes overlap each other, so they must be stitched together before being re-tiled into gridded squares that correspond to Lat/Lon. I used grid squares that were 2.25 x 2.25 degrees, with a resulting image size of 8152 x 8152 pixels, which roughly equates to 30 m/pixel at the equator.
6. Build image pyramid
Remarks: I wrote a custom program for this, but basically it just splits the gridded tiles into smaller tiles, and names them appropriately for the World Wind naming scheme. After I split up the "source" gridded tiles, I resized all the tiles in the image pyramid to be 512 x 512 pixels.
7. Convert to JPG
Remarks: I wrote a program that basically is just a batch utility that utilizes GDAL to convert the Tiff files into JPG files with a 90% compression ratio. Nothing fancy.
Please feel free to put your comments about this page below