Lab 6

Image Restoration: Geometric Rectification       

Geog 418/518, Fundamentals of Remote Sensing


Name 1                                                       Name 2                                            


Lab Goals


Pixels on raw remote sensing images only have row, column coordinates; that is, they do not have geographic coordinates such as latitude-longitude or state plane coordinate system.  In addition, all remote sensing images display varying degrees of geometric and location  distortion.  The goals of this lab are to introduce you to basic techniques for:


·        assigning geographic coordinates to an image, and


·        reducing geometric and location distortion.


The process of assigning geographic coordinates to an image is known as georeferencing. The process of shifting pixel locations to remove distortion is known as rectification.  Often the process of rectification includes georeferencing, because one can both shift the pixels to remove distortion and assign coordinates to those pixels at the same time.  In today’s exercise, you will use the process of rectification to assign coordinates to a Landsat image and reduce the geometric distortion in the image. 




There are two broad types of spatial distortion: systematic and nonsystematic.


Systematic distortion occurs when coordinates are consistently off by a certain amount across the whole image. For example, each row might be shifted 2 m west relative to its true position, so that row 1 is off by 2 m, row 2 is off by 4 meters, row 3 if off by 6 meters, and so on.  Systematic distortion is caused by factors that vary in a consistent manner.  Cartographers, for example, have been concerned for centuries with the systematic distortion that occurs when one attempts to portray a sphere (the earth) as a flat surface (the map), which has led to many differing projection approaches.  In addition, remote sensors worry about systematic distortions associated with the platform motion and imaging device.  For example, the rate at which the earth rotates out from beneath a satellite cause systematic distortion, as does the rate at which off-nadir scale changes across an image.


Nonsystematic distortion is another broad category of image distortion.  Nonsystematic distortion occur when  random factors cause local variations in image scale and coordinate location.  Nonsystematic distortion is particularly common in airborne imagery, where turbulence and variations in ground topography can alter the image scale over short distances.  Likewise, the direction in which the sensor is pointed varies with the pitch, yaw and role of the aircraft, which in turns causes the coordinates of the pixels’ locations to change in a nonsystematic manner.  Nonsystematic distortion can be so severe at times that the same pixel may be resampled multiple times, or some locations on the ground may be entirely missed.  Figure 1 represents a classic case of nonsystematic image distortion due to pitch, yaw

and roll of the helicopter that was carrying the sensor (resolution is ~1-m).


Figure 1.  Soda Butte Creek, WY, August 4, 1999.



The process of rectification reassigns coordinates to pixels.  Although a spherical surface can never be shown as a flat image without some distortion, different approaches (projections) can be used to minimize certain types of distortion.  Systematic distortions can be minimized using equations that adjust the pixel locations systematically across the entire image.  Often some of the major systematic distortions will have been removed before you even get the imagery.  For example, it is common to purchase Landsat imagery which has already been corrected to account for the rotation of the earth beneath the satellite, which is why the image has the outline of a parallelogram rather than a right angle rectangle.


In most cases, however, your images will have some mix of systematic and nonsystematic distortions in them.  The approach you use to remove these distortions (if you remove them at all) is dependent on user-define variables and needs, such as which map projection you use to fit a sphere to a flat surface, the degree to which topography is a concern, the level of accuracy you require, etc.


ERDAS Imagine provides several approaches for rectifying your image beyond what has already done by the data provider.  In general terms, these approaches are rubber sheeting adjustments, camera adjustment, Landsat adjustment, and polynomial adjustments.  Rubber sheeting adjustments (called triangulation adjustments in other remote sensing software packages) break the image up into many smaller pieces and apply a correct to each of these pieces.  This is appropriate where nonsystematic distortion is severe and pixel locations shift in a quasi-random way across the image (e.g. Figure 1- although this image is so badly distorted that it is not usable).  If you are lucky, you will never have to deal with cruddy imagery like Figure 1.

The camera require specific information about the camera focal properties and can be used to rectify aerial photos.  Likewise, the Landsat adjustments apply corrections specific to the Landsat sensors and orbital paths.  Both the camera and Landsat adjustments in ERDAS can produce orthorectified images, which provide the highest level of scale accuracy across the image.  The orthorectification techniques require a DEM to correct for scale variations due to topography.


All the adjustment procedures require that you have a number of sites on the image with known coordinates.  You then shift the pixels in the image to fit those coordinates.


Today you will investigate polynomial adjustments, which are what you would most commonly use with satellite imagery or high quality airborne imagery.  The polynomial approach applies a single equation for x and one for y across the whole image to adjust pixel locations, although the degree of adjustment can shift quite drastically from one part of the image to the next.  


When you shift the locations of pixels, you may also alter the scale.  For example, you may want to move five pixels that were sampled at 1-m resolution to an area only 4 m in width.  The question then becomes: How to assign the spectral values from the original 5 pixels into the new 4 pixel area?  The answer is that when you rectify the image, you also have to resample the image to assign pixel values to the new locations. 


The following lab therefore takes you through three broad steps:


  1. Creating ground control points from clearly identifiable features
  2. Error checking your ground control points
  3. Rectifying and Resampling the image to the ground control points.


An excellent overview of geometric rectification issues is contained in Chapter 9 of the ERDAS Imagine Field Guide, which can be accessed via the Help button on the ERDAS menu.


Lab Procedures:


As with all labs, work in pairs on this lab and turn in only one lab per team. 


Please provide your answers in complete sentences, except where the question specifies otherwise.  Please be legible.


Lab Activities and Questions:


Part 1. Choosing Ground Control Points (GCPs)


Go into the class folder for this lab and display band 2 of the image tmAtlanta.img as a gray scale image (you can do this using the commands found in the Raster Options tab when you open the image) .


Open a second Viewer window and open panAtlanta.img.


tmAtlanta is a Landsat Thematic Mapper image of Atlanta, Georgia. The image panAtlanta is a SPOT panchromatic image

1.  Has the TM image been georeferenced (i.e., have geographic coordinates been assigned to the pixels)?  How can you tell?





2.      The SPOT panchromatic image has been georeferenced.  What system (projection) has it been georeferenced to?  





3.  What is the approximate size of one pixel (in meters) on the SPOT image?





It is not obvious that the TM image has geometric distortion when comparing it to the already rectified SPOT image. Do not be fooled by appearances.  With satellite imagery, it is almost never apparent from a glance that there is geometric or locational distortion.


To assign a scale and coordinate system and remove geometric distortion from tmAtlanta, you need to find features on the image that correspond to well defined coordi­nates on SPOT image.  These will be your Ground Control Points (GCPs).  Ideally: (1) the features would be spread uniformly across the image to provide a clear indication of distortion in all direc­tions; (2) there will be features located across topographic gradients to indicate variations in distortion associated with elevation; (3) there will at least twice as many GCPs as the minimum required for the correction algorithm (minimum requirements are 3 for linear interpolation, 6 for bilinear, and 10 for cubic); and (4) GCPs will be clearly demarcated on the image and have precisely known coordinates.


An Editorial Moment from your Instructor: The following sequence has a large number of commands of the sort that read along the lines of “click this button, then click this button to open this window, then click OK to close this window, then select X and click OK, etc., etc. etc.”  If you think of this as a sequence where you have to remember the specific computer commands, you will be eaten alive by the remote sensing world.  These sequences are essentially impossible to remember and change with new versions of the software.  The key here is to remember the kinds of information you might need in order to select GCPs and assign their coordinates to another image.  All that the following list of commands does is to select a source for the GCPs (the SPOT image), allow you to select GCPs from the SPOT image, and then assign those GCPs from the SPOT image to the Landsat image.  Regardless of which software you use, a similar set of operations will be available in any remote sensing platform.  So try to remember the concept of assigning GCPs and don’t get hung up on remembering the specific buttons to push.


Select Raster/Geometric Correction from the Viewer’s menu bar for tmAtlanta.  On the Set Geometric Model window click Help and investigate the uses of the different geometric models. 


4.  What does the Affine geometric model do?





In the Set Geometric Model window select Polynomial.  This will open the GeoCorrection Tools and the Polynomial Properties windows.  Close the Polynomial Properties window for now, although we will revisit it later.


When you close the Polynomial Properties window, a GCP Tool Reference dialog opens (you can also get this dialog by clicking on the cross hair symbol in the GeoCorrections Tools window).  This lists all the ways that you could enter coordinates for ground control points.  Because we are going to take our GCP coordinates from the SPOT image, you can accept the default of Existing Viewer by clicking OK.  A Viewer Selection window opens up.


Click you mouse in the panAtlanta image (the SPOT image) to select this image as the one we wish to select GCP reference coordinates from.


The Reference Map Information window explains the projection information for the selected image.  This window simply provides a check for us to confirm that we have the correct image and projection for our GCP source.  Click OK in the Reference Map Information window.  The Chip Extraction Viewers (Viewers #3 and #4) are zooms of what is in the boxes in Viewers 1 and 2, respectively (Figure 2).  You can resize

and move the link boxes if you want to.   


Figure 2. The TM and SPOT images (modified from ERDAS Imagine Tour Guide, 2002, page 140)


You now need to select corresponding GCPs in the two images.


In the TM image on the left, move the box to the large freeway intersection in the upper left hand corner shown by the white circle on Figure 2 and left click on a point that is easy to identify as the intersection of two roads. (If you do not get a GPC established, make sure that the  symbol is clicked on in the GCP Tools window.)  Note that after establishing the GCP, you can drag it around to relocate it in the main Viewer or in the Chip Extraction Viewer.


In the GCP Tool Window, right click on the Color Column to the right of GCP#1 and choose a color that stands out more clearly against the gray background.

In the GCP Tool window, click on the Create GCP icon:          


On the rectified SPOT image, click on the same location that you selected on the TM image.  Change the color of the GCP in the SPOT image to be the same as that of the GCP on the TM image.  You should now have a GCP Tool window that looks something like this:



Figure 3. The GCP Tool window (from ERDAS Imagine Tour Guide, 2002, page 143)



After you have your GCP#1 aligned properly in both viewers, return to the GCP Tool window and click once again on the Create GCP icon shown above.  Then create a GCP in the TM image.  Click again on the Create GCP icon and create a corresponding GCP in the SPOT image.


NOTE !!!  Save your GCP input and reference file after every two or three entries (although it is one table on the screen, it is saved as separate files for: a)  your input GCPs from the tmAtlanta image and b) your reference GCPs on the panAtlanta image).  I have found through painful experience that the system often crashes and you lose all your work. If you have saved your files, then you can bring them back up using the File/Load command in the menu of the GCP Tool window.


Digitize at least 12 GCPs.  The GCPs should be spread around the image.  I recommend selecting a different color for each GCP.  This helps to avoid mixing up GCPs on the two images.


If you make mistakes, you can edit the GCPs by selecting them graphically. To do this, click on the Select icon (the arrow) in the GCP Tools window, then move the arrow to the desired GCP and drag the GCP to the correct location.


You can also edit GCPs directly in the table by clicking on the cell and changing the numbers.


Part II.  Error Checking


As you entered your GCPs, you probably had some moments of doubt as to whether your locations for the GCPs were correct.  You are not alone in this sensation.  There are two relatively quick ways to determine if one or more of your GCPs are significantly off in their locations: RMS Error and Image Matching approaches.


Root Mean Squared Error


The GCPs are used to create an equation indicating how far in the x and y directions each pixel should be moved to rectify the image.  This equation is a regression, which shows the overall trend of how far the GCPs were moved.  Below are two graph showing how far the GCPs were moved in the x and y directions relative to their initial coordinate location.  One would also do the same process to determine how far to remove the pixels from their original y coordinate location.














The regressions above are first order polynomials, meaning the regression line is linear.


You will notice that the GCPs (the data points) generally do not fall perfectly on the trend line.  The distance of the GCP from the regression lines is measured by the Root Mean Squared Error(RMS error).  If the RMS error is 1.5 for a given GCP on the TM image, that GCP is 1.5 pixels off the trend line (The units of the RMS error are the same units as the source image, which are pixels in this case.  If the source image was already georeferenced to meters, feet, or degrees, then the RMS Error would be expressed in those units of distance.)


Often you will see that  majority of GCPs have a similar RMS error, but that one or two have much larger RMS errors.  These GCPs with large RMS errors may have been incorrectly located and you should go back and recheck them.


5.  Assuming that the sensor platform is stable (no pitch, yaw, or roll), what non-sensor related factor might lead to large RMS error in one part of an image, but not in another?  If so, give an example of such a circumstance.











If you have large RMS errors, revisit the points and adjust the GCPs.  As a gage to check your errors, when I worked the lab, all my RMS errors were less than 1.5.


6.  After your have adjusted your GCPs to the point where you are comfortable with the results, record the RMS error for your first 6 GCPs in the 1st order column in the table below.




Order of Polynomial Transformation

1st, RMS Error

2nd, RMS Error

3rd RMS Error



























Spectral and Location Image Matching


There are two other approaches for error checking that we will not explore today in the lab.  One approach is to determine if the spectral characteristics of the GCPs on the source and reference images are similar.  For example, if you put the source image GCP#1 in a road, and the corresponding reference image GCP#1 in a tree, the spectra would be different, which should alert you that you have made an error.  Key to this approach is that the source and the reference image should cover the same spectral regions.  If the spectra are different, the spectral match tool will indicates no match of pixels, simply because you are looking at different spectra for the same location.


Another quick check on your results is to use Point Prediction in  the Edit menu option on the GCP Tools window.  In this approach, you select a feature you can clearly see on one image and check if the corresponding point is highlighted on the other image. 


Part III, Resampling and Rectification




You can now rectify the image using your ground control points.  We will use polynomial transformation to “move” the pixels.  A first order polynomial will shift each pixel by a distance that varies in a linear manner across the image.  The equations for the shift will be of the form:

xnew = ax + cx*xold + cx1*yold


ynew =  ay + cy*yold + cy1*xold


where a and c are constants.  A second order transformation has the form:


xnew = ax + (cx1*xold) + (cx2*yold) + (cx3*xold *yold) + (cx4*xold2 ) + (cx5*yold2 )


and likewise for Ynew.   A linear transformation allows for movement of pixels by constant rates across the image: for example, everything in the first row moves 2 pixels to the east, everything in the second row moves 4 pixels to the east, everything in the third row moves 6 pixels, and so on.  A second order transformation allows a shift across the image that follows the curve of the second order polynomial.  The higher the order, the more “curvy” the transformation can be.


Find your Geo Correction Tools window (it should still be open) and click on the Model Properties icon:


Click on the Polynomial Model Properties dialog, and make sure you have chosen Polynomial Order 1. 


7.      Write down the equation for your 1st order polynomial transformation (look under the Transformation tab on the Model Properties window to get the constants).






8.      Now change the polynomial order to 2nd order and click Apply.  Write down the changes in your RMS Error in column two of Table 1 above (question 6).  Do the same for a third order polynomial.  In general, how does the RMS Error changes going from 1st to 2nd to 3rd order? Speculate on why the change occurs in this manner.










Once you move the pixels, you need to assign values to each pixel.  This process is not always simple.  For example, imagine that in the process of removing geometric distortion, the scale has changed.  You might find, for example, that five pixels are moved to an area where only four pixel can fit.  How do you then reassign values from the five pixels to the four rectified pixels?


The process by which values are reassigned to the rectified pixels is known as Resampling.  ERDAS Imagine provides three classic approaches to resampling:


  • Nearest Neighbor Resampling, where the new pixel receives the value of the pixel centroid that is closest to it after being shifted.


  • Bilinear Interpolation, where the new pixel receives the distance weighted average value of the four pixels that were closest to it after being shifted.


  • Cubic Convolution, where the new pixel receives the distance weighted average value of the 16 pixels that were closest to it after being shifted.


These methods are described in more detail your text and in the ERDAS Imagine Field Guide, 2002, pages 365-372. 


Nearest neighbor resampling does not change the raw data and is computationally the fastest technique, but can lead to abrupt edges,  Because bilinear interpolation average the data, it can smooth out  extreme values, but it reduces the sharp edge effects of nearest neighbor approaches and also is more spatially accurate in assigning approximate values to locations.  Cubic convolution provides an overall resampled image that is closest statistically (in terms of mean and range) to the original image and is best for resampling when the scale is changing radically.  However, it dramatically alters individual pixel values relative to the original image, although it does the best job of maintaining the same distribution (average, standard deviation) of values throughout the image.


Creating Rectified Images


You are going to create five rectified images:


File name

Polynomial Order

Resampling Approach



Nearest neighbor



Nearest neighbor



Nearest neighbor

tm Atlanta_1st_bilinear



tmAtlanta_1st_ cubic


Cubic convolution



Remember, the polynomial order provides the distance and direction that the pixel is moved.  The resampling allocates a spectral value to that pixel.


First, go into your Geo Correction Tools window, click on the Transformation icon, and make sure you have chosen a 1st order polynomial transformation.

Now click on the Resample icon in the Geo Correction Tools window: 


A Resample dialog will open.  Enter the name of the new georeferenced image file (tmAtlanta_1st_near).  Be sure to enter the output file into your personal lab directory.


Under Resample Method, enter Nearest Neighbor.


Click Ignore Zero Stats, so that the pixels filled with zeros are excluded when statistics are calculated for the output file.


Click OK in the Resample dialog to start the resampling process.  Click OK when the job is 100% complete.


Now repeat this process to crate the other images listed in the table above.  You will have to change the polynomial order in the Transformation window, and the resampling routine in the Resample window.


  1. Compare tmAtlanta_1st_near to the original tmAtlanta image.  Describe how the image orientation and geometry has been changed.  Why has the image shifted in this particular manner?













  1. Compare tmAtlanta_1st_near, tmAtlanta_2nd_near, and tmAtlanta_3rd_near.  Which image or images seem to provide the best spatial portrayal of locations relative to the SPOT image? (Bring up the Spot image in a viewer, then link the images and zoom in on some road curves to get a good comparison)  How does this compare to what the RMS Errors from questions 6 and 8 suggested to you?










  1. Compare tmAtlanta_1st_near, tmAtlanta_1st_bilinear, and tmAtlanta_1st_cubic.  Can you detect any differences visually?  Try zooming in on some edges and straight lines.