Lab exercise 5, due right before the class on Feb. 25, 2005
ES6973: Remote Sensing Image Processing and Analysis, UTSA
http://www.utsa.edu/eps/programs/EnvSci/HXie.htm
Student name: ______________
Image registration and projection conversion
Purpose
This lab is getting you familiar with image registration (image to map in this lab) and map projection conversion. You will get to know how to set up all parameters and using different spatial interpolation and pixel value (intensity) interpolation (or resampling) approaches. if you would interested in using my IDL code for automatic image to image registration, I would happy to help you set up.
Step 1. Preparation
The image you will use in this lab is the Landsat ETM+ reflectivity image (one file with stacked 6 bands) you created in Lab 4. The other dataset is a Texas road map (a shape file) which you can download from here (http://spatialdata.ees.utsa.edu/ClassWebSites/ES5053/texas/). Delete all the images in your previous labs except the ETM+ reflectivity image you will use in this lab and the MODIS reflectivity image you might use later on. If you want to keep others, you should make copies to your USB.
Step 2. Do map projection conversion
Open and load the ETM+ image, click and check the Map Info from the Available Bands List. Now you will convert the map projection to latitude and longitude system. Click Map -> Convert Map Projection. In the Convert Map Projection Input Image window, you will select the image you want to convert, and you can also define your "Spatial Subset" and/or "Spectral Subset" to be converted. Otherwise, you will convert the entire image area and 6 bands. Once you click OK, a new window called "Convert Map Projections Parameters" will popup. Your image projection and datum are listed in the very top, you are asked to select output projection parameters. Select the Geographic Lat/Lon map projection, keep the Datum and Units as default. click OK, you will see the window looks like below:

You can test different spatial interpolation methods or Warp Method: Triangulation, RST (rotation, scale, and transformation), and Polynomial (Degree is the same as order, 1 degree is order 1, 3 degree is order 3, please refer to the lecture if you do not know what order means), and different pixel value interpolation or Resampling methods: Nearest Neighbor, Bilinear, and Cubic. Keep others as default and then run it.
Step 3. Image to map registration
Since your ETM+ image already has a projection (UTM) and datum (WGS84), so you can directly convert it from one projection to another without any problem as what you just did in the step 2 above. The good thing is MODIS and Landsat ETM+ imagery have already did good geometric correction before releasing for public use. But some old imagery (such as Landsat 4 or 5) or aerial photos, do not have good geolocation accuracy, and they do need georeferencing.
To practice the registration tool in this lab, we would register the ETM+ to geographic Lan/Lon using the Texas road map (even though we know the ETM+ has a map system). To open the shape file (Texas_rd.shp) that you downloaded in step 1 by clicking Vector (in the ENVI main menu) -> Open Vector File -> shapefile. Then the shape file is opened in "Avalilable Vector List" window. This window (for vector layers) is similar as the Available Bands List window (raster or image layers). This is how ENVI organizes vector and raster files. You can select the Texas_rd, and click Load Selected, you will be asked which window to load. You can load to existing display window or a new vector window. if you load it to your image display window (because both of them have projection. if the image does not have projection, you can not overlay them), then the Texas roads will overlay on the image the same way as you see in ArcView or ArcGIS. You can check how the map roads match the roads from image (good, bad, or fair?). But in this lab, you will need load the roads to a New Vector Window (see figure below) in order to do the image to map registration. Here we are assuming the image does not have a projection.

Once you zoom to the right area, you should be able to identify the features from both the image and road map, see an example below where you see the intersection of loop 1604 and I-10. This is a pair of ground control point (GCP) that you would like to have.

Now you are ready to select the GCPs. Click Map (from the main ENVI menu) -> Registration -> Select GCPs: Image to Map. You will see a window as below. Select your image to be registered and Select Registration Projection as the window below and click OK.

Now a new window called Ground Control Points Selection opened. use the Zoom window to find the exact intersection and click, the position (x, y) will be output to Ground Control Points Selection window: Image X (728.5) and Image Y (339.5) in this case (see figure below). In the vector window, zoom to the very intersection position, click the position, and then right click your mouse and click Export Map Location. So the map E (-98.59828234 in this case) and N (29.58967007 in this case) will be export to Ground Control Points Selection window. see the figure below:

Click Add Point in the above window, your first pair of GCP has been added into your image and road map. Using the same method, you will add the 2nd one, the third one, ..... Once you did the third one, you will be able to select a point and right click to Export Map Location, then you can click the Predict. It will predict the approximate point in the image, what you need to do is to zoom to that point, move a little bit to the right position. click Add point. Once you got 5 GCPs, the program will start to calculate the RMS error (1.289330 pixel in this case) for you see figures below:


If you click the Show List, you should see this table below, you will see which pair of GCP has the biggest error. In one TM or ETM+ image, you might select some 20 GCPs relatively evenly distributed in the image. Then you will delete the first GCP who has the biggest error, the tool will recalculate the RMS error. You will find the second GCP who has the biggest error, ..., until your total RMS error less than or equal to 1 (pixel). If you want to leave during the GCPs selection, you can save them: File -> Save GCPs w/ map coords... You can restore them once you come back: File -> Restore GCPs from ASCII... then you can continue to add points.

Once you done the GCPs selection, you can do the image registration now: click Options -> Warp Displayed Band... (only warp the displayed one band or 3 bands) or Options -> Warp File (warp the file with many bands). In this practice, you may select only displayed band to warp (or to register). Then you will get the exact same window as step 2 you used. You can select different spatial interpolation and resampling methods. You may use the exact same methods you used in step 2, then you may compare them in the following step. (Hint: Please change the pixel size from 30 and 30 to the degree of 0.000309 and 0.000271 as you can see in step 2. Thinking about why the pixel size is not square in Lat/Log degree system while it is square in meter of UTM system).
Step 4. Compare two images
Now, you can link the two warped images in step 2 and step 3 to see if the positions match fairly good or not.
Write a report about the procedure and your results.